summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common.py2
-rw-r--r--configs/autoconf.in1
-rw-r--r--configs/linux-llvm10
-rw-r--r--configure.ac8
-rw-r--r--docs/GL3.txt2
-rwxr-xr-xscons/gallium.py1
-rw-r--r--scons/llvm.py2
-rw-r--r--scons/udis86.py44
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c1
-rw-r--r--src/gallium/auxiliary/Makefile4
-rw-r--r--src/gallium/auxiliary/SConscript7
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c7
-rw-r--r--src/gallium/auxiliary/draw/draw_vs.h3
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos_io.c4
-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_misc.cpp60
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c5
-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/rbug/rbug_context.c4
-rw-r--r--src/gallium/auxiliary/rbug/rbug_context.h2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c2
-rw-r--r--src/gallium/auxiliary/util/u_blit.c156
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c7
-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_draw_quad.c4
-rw-r--r--src/gallium/auxiliary/util/u_format.csv6
-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_rgtc.c20
-rw-r--r--src/gallium/auxiliary/util/u_format_rgtc.h6
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py1
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c108
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h9
-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.c8
-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_transfer.c7
-rw-r--r--src/gallium/auxiliary/util/u_transfer.h12
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.c4
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.c15
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c2
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_context.c10
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c2
-rw-r--r--src/gallium/docs/d3d11ddi.txt4
-rw-r--r--src/gallium/docs/source/context.rst10
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c14
-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/failover/fo_context.c17
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c20
-rw-r--r--src/gallium/drivers/galahad/glhd_screen.c20
-rw-r--r--src/gallium/drivers/i915/TODO17
-rw-r--r--src/gallium/drivers/i915/i915_batch.h3
-rw-r--r--src/gallium/drivers/i915/i915_batchbuffer.h10
-rw-r--r--src/gallium/drivers/i915/i915_clear.c105
-rw-r--r--src/gallium/drivers/i915/i915_context.c24
-rw-r--r--src/gallium/drivers/i915/i915_context.h46
-rw-r--r--src/gallium/drivers/i915/i915_debug.c3
-rw-r--r--src/gallium/drivers/i915/i915_flush.c23
-rw-r--r--src/gallium/drivers/i915/i915_prim_emit.c1
-rw-r--r--src/gallium/drivers/i915/i915_prim_vbuf.c3
-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.c1
-rw-r--r--src/gallium/drivers/i915/i915_resource_texture.c9
-rw-r--r--src/gallium/drivers/i915/i915_screen.c29
-rw-r--r--src/gallium/drivers/i915/i915_screen.h1
-rw-r--r--src/gallium/drivers/i915/i915_state.c70
-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_emit.c37
-rw-r--r--src/gallium/drivers/i915/i915_state_static.c106
-rw-r--r--src/gallium/drivers/i915/i915_surface.c152
-rw-r--r--src/gallium/drivers/i965/brw_pipe_flush.c1
-rw-r--r--src/gallium/drivers/i965/brw_resource_buffer.c20
-rw-r--r--src/gallium/drivers/i965/brw_resource_texture.c43
-rw-r--r--src/gallium/drivers/i965/brw_screen.c16
-rw-r--r--src/gallium/drivers/identity/id_context.c20
-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/lp_context.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_query.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c17
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c16
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.h1
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_setup.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_surface.c2
-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.c13
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c1
-rw-r--r--src/gallium/drivers/nouveau/nouveau_fence.c9
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c34
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h4
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c47
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c1
-rw-r--r--src/gallium/drivers/nv50/nv50_resource.c17
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c5
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c11
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c42
-rw-r--r--src/gallium/drivers/nv50/nv50_stateobj.h2
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c4
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3d.xml.h9
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c54
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.h4
-rw-r--r--src/gallium/drivers/nvc0/nvc0_graph_macros.h2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_miptree.c1
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.c8
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.h14
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_emit.c7
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_optimize.c6
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_print.c16
-rw-r--r--src/gallium/drivers/nvc0/nvc0_program.c11
-rw-r--r--src/gallium/drivers/nvc0/nvc0_push.c89
-rw-r--r--src/gallium/drivers/nvc0/nvc0_resource.c20
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.c19
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.h2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_shader_state.c2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c33
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state_validate.c84
-rw-r--r--src/gallium/drivers/nvc0/nvc0_surface.c2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_vbo.c4
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.c7
-rw-r--r--src/gallium/drivers/nvfx/nvfx_miptree.c6
-rw-r--r--src/gallium/drivers/nvfx/nvfx_resource.c9
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.c2
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state_emit.c2
-rw-r--r--src/gallium/drivers/r300/r300_blit.c6
-rw-r--r--src/gallium/drivers/r300/r300_context.c10
-rw-r--r--src/gallium/drivers/r300/r300_context.h14
-rw-r--r--src/gallium/drivers/r300/r300_emit.c107
-rw-r--r--src/gallium/drivers/r300/r300_emit.h3
-rw-r--r--src/gallium/drivers/r300/r300_flush.c23
-rw-r--r--src/gallium/drivers/r300/r300_fs.c2
-rw-r--r--src/gallium/drivers/r300/r300_render.c259
-rw-r--r--src/gallium/drivers/r300/r300_resource.c8
-rw-r--r--src/gallium/drivers/r300/r300_screen.c53
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c16
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.h3
-rw-r--r--src/gallium/drivers/r300/r300_state.c69
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c4
-rw-r--r--src/gallium/drivers/r300/r300_texture.c15
-rw-r--r--src/gallium/drivers/r300/r300_texture_desc.c6
-rw-r--r--src/gallium/drivers/r300/r300_transfer.c23
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h13
-rw-r--r--src/gallium/drivers/r600/eg_asm.c12
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c54
-rw-r--r--src/gallium/drivers/r600/r600_asm.c96
-rw-r--r--src/gallium/drivers/r600/r600_asm.h2
-rw-r--r--src/gallium/drivers/r600/r600_buffer.c9
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c23
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h5
-rw-r--r--src/gallium/drivers/r600/r600_query.c2
-rw-r--r--src/gallium/drivers/r600/r600_resource.c1
-rw-r--r--src/gallium/drivers/r600/r600_shader.c238
-rw-r--r--src/gallium/drivers/r600/r600_state.c187
-rw-r--r--src/gallium/drivers/r600/r600_texture.c25
-rw-r--r--src/gallium/drivers/r600/r700_asm.c9
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c231
-rw-r--r--src/gallium/drivers/rbug/rbug_core.c2
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c20
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c26
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h9
-rw-r--r--src/gallium/drivers/softpipe/sp_fence.c13
-rw-r--r--src/gallium/drivers/softpipe/sp_flush.c80
-rw-r--r--src/gallium/drivers/softpipe/sp_flush.h9
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c6
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c54
-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.c3
-rw-r--r--src/gallium/drivers/svga/svga_pipe_draw.c14
-rw-r--r--src/gallium/drivers/svga/svga_pipe_flush.c33
-rw-r--r--src/gallium/drivers/svga/svga_resource.c1
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c287
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.h20
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c50
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.h4
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c68
-rw-r--r--src/gallium/drivers/svga/svga_screen.c22
-rw-r--r--src/gallium/drivers/svga/svga_screen.h4
-rw-r--r--src/gallium/drivers/svga/svga_state_vdecl.c9
-rw-r--r--src/gallium/drivers/svga/svga_winsys.h7
-rw-r--r--src/gallium/drivers/trace/tr_context.c30
-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_screen.c28
-rw-r--r--src/gallium/include/pipe/p_context.h24
-rw-r--r--src/gallium/include/pipe/p_defines.h31
-rw-r--r--src/gallium/include/pipe/p_format.h5
-rw-r--r--src/gallium/include/pipe/p_screen.h20
-rw-r--r--src/gallium/include/pipe/p_video_context.h3
-rw-r--r--src/gallium/include/state_tracker/st_api.h5
-rw-r--r--src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp2
-rw-r--r--src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h2
-rw-r--r--src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h20
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c4
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c24
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c2
-rw-r--r--src/gallium/state_trackers/dri/sw/drisw.c3
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c2
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_api.c19
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_sync.c4
-rw-r--r--src/gallium/state_trackers/egl/common/native_helper.c4
-rw-r--r--src/gallium/state_trackers/egl/drm/native_drm.c2
-rw-r--r--src/gallium/state_trackers/egl/fbdev/native_fbdev.c2
-rw-r--r--src/gallium/state_trackers/egl/gdi/native_gdi.c2
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c2
-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.i4
-rw-r--r--src/gallium/state_trackers/python/p_device.i6
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c19
-rw-r--r--src/gallium/state_trackers/vdpau/query.c3
-rw-r--r--src/gallium/state_trackers/vega/api_context.c7
-rw-r--r--src/gallium/state_trackers/vega/api_images.c5
-rw-r--r--src/gallium/state_trackers/vega/image.c10
-rw-r--r--src/gallium/state_trackers/vega/mask.c2
-rw-r--r--src/gallium/state_trackers/vega/renderer.c8
-rw-r--r--src/gallium/state_trackers/vega/vg_context.c2
-rw-r--r--src/gallium/state_trackers/vega/vg_manager.c4
-rw-r--r--src/gallium/state_trackers/wgl/stw_context.c8
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c20
-rw-r--r--src/gallium/state_trackers/wgl/stw_pixelformat.c4
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c11
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c8
-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.c9
-rw-r--r--src/gallium/state_trackers/xorg/xorg_xv.c16
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c20
-rw-r--r--src/gallium/targets/graw-gdi/graw_gdi.c4
-rw-r--r--src/gallium/tests/graw/SConscript2
-rw-r--r--src/gallium/tests/graw/clear.c2
-rw-r--r--src/gallium/tests/graw/fs-test.c2
-rw-r--r--src/gallium/tests/graw/gs-test.c2
-rw-r--r--src/gallium/tests/graw/quad-sample.c2
-rw-r--r--src/gallium/tests/graw/quad-tex.c2
-rw-r--r--src/gallium/tests/graw/shader-leak.c2
-rw-r--r--src/gallium/tests/graw/tri-gs.c2
-rw-r--r--src/gallium/tests/graw/tri-instanced.c2
-rw-r--r--src/gallium/tests/graw/tri.c2
-rw-r--r--src/gallium/tests/graw/vs-test.c2
-rw-r--r--src/gallium/tests/trivial/quad-tex.c2
-rw-r--r--src/gallium/tests/trivial/tri.c2
-rw-r--r--src/gallium/tests/unit/SConscript33
-rw-r--r--src/gallium/winsys/r600/drm/r600_bo.c2
-rw-r--r--src/gallium/winsys/r600/drm/r600_drm.c3
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c24
-rw-r--r--src/gallium/winsys/r600/drm/r600d.h3
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c11
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c17
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.h5
-rw-r--r--src/gallium/winsys/sw/dri/SConscript2
-rw-r--r--src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c2
-rw-r--r--src/gallium/winsys/sw/xlib/SConscript2
-rw-r--r--src/glsl/Makefile2
-rw-r--r--src/glsl/SConscript9
-rw-r--r--src/glsl/ast_to_hir.cpp31
-rw-r--r--src/glsl/builtin_variables.h5
-rwxr-xr-xsrc/glsl/builtins/tools/texture_builtins.py57
-rw-r--r--src/glsl/glsl_symbol_table.cpp1
-rw-r--r--src/glsl/glsl_types.h2
-rw-r--r--src/glsl/ir.cpp20
-rw-r--r--src/glsl/ir.h24
-rw-r--r--src/glsl/ir_print_visitor.cpp3
-rw-r--r--src/glsl/ir_reader.cpp17
-rw-r--r--src/glsl/ir_validate.cpp33
-rw-r--r--src/glsl/link_functions.cpp8
-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.cpp7
-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.cpp6
-rw-r--r--src/glx/Makefile1
-rw-r--r--src/glx/dri_common.c4
-rw-r--r--src/glx/glxconfig.c5
-rw-r--r--src/glx/glxconfig.h3
-rw-r--r--src/glx/glxcurrent.c10
-rw-r--r--src/glx/glxext.c4
-rw-r--r--src/glx/glxextensions.c2
-rw-r--r--src/glx/glxextensions.h2
-rw-r--r--src/glx/indirect.c4
-rw-r--r--src/mapi/glapi/gen/Makefile1
-rw-r--r--src/mapi/glapi/gen/NV_texture_barrier.xml13
-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/gl_API.xml2
-rw-r--r--src/mapi/glapi/glapi_mapi_tmp.h27
-rw-r--r--src/mapi/glapi/glapi_sparc.S9
-rw-r--r--src/mapi/glapi/glapi_x86-64.S87
-rw-r--r--src/mapi/glapi/glapi_x86.S13
-rw-r--r--src/mapi/glapi/glapitable.h15
-rw-r--r--src/mapi/glapi/glapitemp.h28
-rw-r--r--src/mapi/glapi/glprocs.h740
-rw-r--r--src/mapi/mapi/u_current.c12
-rw-r--r--src/mapi/mapi/u_thread.c9
-rw-r--r--src/mapi/mapi/u_thread.h2
-rw-r--r--src/mesa/Makefile2
-rw-r--r--src/mesa/SConscript5
-rw-r--r--src/mesa/drivers/common/driverfuncs.c3
-rw-r--r--src/mesa/drivers/dri/common/utils.c3
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c5
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c11
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c3
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c22
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h30
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp59
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c82
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c18
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c22
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c2
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c9
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.h1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c4
-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_state.c3
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c6
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c21
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog.c6
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.h2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_optimize.c13
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c11
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c99
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c6
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_state.c7
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c7
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c3
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c7
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_state.c3
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c3
-rw-r--r--src/mesa/main/api_exec.c4
-rw-r--r--src/mesa/main/bufferobj.c2
-rw-r--r--src/mesa/main/context.c18
-rw-r--r--src/mesa/main/context.h24
-rw-r--r--src/mesa/main/dd.h14
-rw-r--r--src/mesa/main/dlist.c22
-rw-r--r--src/mesa/main/drawpix.c2
-rw-r--r--src/mesa/main/enums.c2
-rw-r--r--src/mesa/main/extensions.c493
-rw-r--r--src/mesa/main/fbobject.c36
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp (renamed from src/mesa/main/texenvprogram.c)13
-rw-r--r--src/mesa/main/formats.c40
-rw-r--r--src/mesa/main/formats.h8
-rw-r--r--src/mesa/main/framebuffer.c2
-rw-r--r--src/mesa/main/get.c12
-rw-r--r--src/mesa/main/glapidispatch.h38
-rw-r--r--src/mesa/main/glheader.h4
-rw-r--r--src/mesa/main/image.c12
-rw-r--r--src/mesa/main/imports.c16
-rw-r--r--src/mesa/main/mipmap.c9
-rw-r--r--src/mesa/main/mtypes.h28
-rw-r--r--src/mesa/main/queryobj.c1
-rw-r--r--src/mesa/main/remap_helper.h3968
-rw-r--r--src/mesa/main/shaderapi.c5
-rw-r--r--src/mesa/main/shaderobj.c7
-rw-r--r--src/mesa/main/state.c6
-rw-r--r--src/mesa/main/state.h39
-rw-r--r--src/mesa/main/texcompress.c19
-rw-r--r--src/mesa/main/texcompress_rgtc.c68
-rw-r--r--src/mesa/main/texcompress_rgtc.h17
-rw-r--r--src/mesa/main/texenv.c33
-rw-r--r--src/mesa/main/texfetch.c28
-rw-r--r--src/mesa/main/texformat.c29
-rw-r--r--src/mesa/main/teximage.c22
-rw-r--r--src/mesa/main/texobj.c32
-rw-r--r--src/mesa/main/texstore.c21
-rw-r--r--src/mesa/main/texturebarrier.c54
-rw-r--r--src/mesa/main/texturebarrier.h44
-rw-r--r--src/mesa/main/uniforms.c16
-rw-r--r--src/mesa/program/ir_to_mesa.cpp76
-rw-r--r--src/mesa/program/prog_cache.c53
-rw-r--r--src/mesa/program/prog_cache.h9
-rw-r--r--src/mesa/program/program.c4
-rw-r--r--src/mesa/sources.mak13
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c2
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c6
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c14
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c54
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c6
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c11
-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_syncobj.c122
-rw-r--r--src/mesa/state_tracker/st_cb_syncobj.h38
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c13
-rw-r--r--src/mesa/state_tracker/st_cb_texturebarrier.c60
-rw-r--r--src/mesa/state_tracker/st_cb_texturebarrier.h37
-rw-r--r--src/mesa/state_tracker/st_context.c4
-rw-r--r--src/mesa/state_tracker/st_draw.c6
-rw-r--r--src/mesa/state_tracker/st_extensions.c67
-rw-r--r--src/mesa/state_tracker/st_format.c252
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c12
-rw-r--r--src/mesa/state_tracker/st_manager.c9
-rw-r--r--src/mesa/state_tracker/st_program.c2
-rw-r--r--src/mesa/state_tracker/st_texture.c2
-rw-r--r--src/mesa/swrast/s_aatriangle.c3
-rw-r--r--src/mesa/swrast/s_span.c3
-rw-r--r--src/mesa/swrast/s_texfilter.c67
-rw-r--r--src/mesa/swrast/s_triangle.c5
-rw-r--r--src/mesa/tnl/t_context.c3
-rw-r--r--src/mesa/vbo/vbo_exec_array.c13
428 files changed, 8989 insertions, 5967 deletions
diff --git a/common.py b/common.py
index 1d0c6a7..0a3dcdc 100644
--- a/common.py
+++ b/common.py
@@ -83,7 +83,7 @@ def AddOptions(opts):
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', host_platform,
- allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos5', 'freebsd8')))
+ 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))
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 9defba2..d493d64 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -149,6 +149,7 @@ 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
diff --git a/configs/linux-llvm b/configs/linux-llvm
index e699953..359bee2 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 -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 d0a67cc..bc548a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1400,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
@@ -1672,12 +1670,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"
diff --git a/docs/GL3.txt b/docs/GL3.txt
index 0c53bc4..ca265af 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -39,6 +39,8 @@ 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:
diff --git a/scons/gallium.py b/scons/gallium.py
index 34523d5..4dcb8d0 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -602,7 +602,6 @@ def generate(env):
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 3fef9e0..b89899b 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -142,7 +142,7 @@ 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
diff --git a/scons/udis86.py b/scons/udis86.py
deleted file mode 100644
index bb91d3c..0000000
--- 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/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 015b801..f7e063b 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -94,6 +94,7 @@ 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 */
};
struct dri2_egl_config *
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index f5fea1f..869b2d4 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -110,6 +110,7 @@ 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 \
@@ -130,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 \
@@ -159,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 \
@@ -187,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 f4ab8a5..84519cf 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -157,6 +157,7 @@ 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',
@@ -177,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',
@@ -199,16 +201,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/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index ea62c97..fe3627b 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -388,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);
diff --git a/src/gallium/auxiliary/draw/draw_vs.h b/src/gallium/auxiliary/draw/draw_vs.h
index bfb72d5..e6d187e 100644
--- a/src/gallium/auxiliary/draw/draw_vs.h
+++ b/src/gallium/auxiliary/draw/draw_vs.h
@@ -33,6 +33,7 @@
#include "draw_context.h"
#include "draw_private.h"
+#include "draw_vertex.h"
struct draw_context;
@@ -48,7 +49,7 @@ struct draw_variant_input
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 */
};
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos_io.c b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
index 8f8bbe7..f1dd448 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/gallivm/lp_bld_debug.c b/src/gallium/auxiliary/gallivm/lp_bld_debug.c
deleted file mode 100644
index 93e5655..0000000
--- 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 0000000..bb2c82f
--- /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 8a58f95..da873f3 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_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 46dd00d..843a14a 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.
*
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 1fec3ad..9961ba0 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -1108,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]);
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index a084310..8173d4c 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 c2322ee..5754f47 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/rbug/rbug_context.c b/src/gallium/auxiliary/rbug/rbug_context.c
index a3fd7e8..3682405 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 03126d6..4a865c2 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/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 1eac762..57622a0 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -137,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;
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index 76bd7ac..421726b 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
@@ -304,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);
@@ -326,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 &&
@@ -354,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,
@@ -361,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))
@@ -392,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;
@@ -439,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) {
@@ -460,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);
@@ -502,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);
@@ -517,41 +569,30 @@ 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);
@@ -576,6 +617,8 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_restore_vertex_buffers(ctx->cso);
pipe_sampler_view_reference(&sampler_view, NULL);
+ if (dst_surface != dst)
+ pipe_surface_reference(&dst_surface, NULL);
}
@@ -660,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);
@@ -706,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));
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index fd1c2b7..a4c3990 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -772,9 +772,9 @@ 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);
@@ -785,6 +785,7 @@ void util_blitter_copy_region(struct blitter_context *blitter,
/* 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;
@@ -823,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. */
diff --git a/src/gallium/auxiliary/util/u_cache.c b/src/gallium/auxiliary/util/u_cache.c
index 15f4a88..df08ec3 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 8a612c6..be3631b 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 e209a98..75677b2 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_draw_quad.c b/src/gallium/auxiliary/util/u_draw_quad.c
index 0defd91..8ed3b3c 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.c
+++ b/src/gallium/auxiliary/util/u_draw_quad.c
@@ -82,7 +82,7 @@ util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
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)
@@ -121,7 +121,7 @@ util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
vbuf = pipe_user_buffer_create(pipe->screen, v, vertexBytes,
PIPE_BIND_VERTEX_BUFFER);
- if (!vbuf)
+ if (!vbuf)
goto out;
util_draw_vertex_buffer(pipe, cso, vbuf, 0, PIPE_PRIM_TRIANGLE_FAN, 4, 2);
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 0ae15c9..22c63ae 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -141,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
@@ -156,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_latc.c b/src/gallium/auxiliary/util/u_format_latc.c
new file mode 100644
index 0000000..e84c493
--- /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 0000000..1f08887
--- /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_rgtc.c b/src/gallium/auxiliary/util/u_format_rgtc.c
index 6ffcd7e..c929fd4 100644
--- a/src/gallium/auxiliary/util/u_format_rgtc.c
+++ b/src/gallium/auxiliary/util/u_format_rgtc.c
@@ -281,7 +281,7 @@ util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
}
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(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;
@@ -294,7 +294,7 @@ util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c
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 + 1]);
+ 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);
@@ -306,6 +306,12 @@ util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c
}
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;
@@ -389,7 +395,7 @@ util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, c
}
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(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;
@@ -402,7 +408,7 @@ util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c
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 + 1]);
+ 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);
@@ -414,6 +420,12 @@ util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c
}
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;
diff --git a/src/gallium/auxiliary/util/u_format_rgtc.h b/src/gallium/auxiliary/util/u_format_rgtc.h
index 3e8636d..67ac472 100644
--- a/src/gallium/auxiliary/util/u_format_rgtc.h
+++ b/src/gallium/auxiliary/util/u_format_rgtc.h
@@ -77,6 +77,9 @@ 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
@@ -99,6 +102,9 @@ 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
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index 7468bc3..55e0f78 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -88,6 +88,7 @@ def write_format_table(formats):
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)
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 4f1b0e7..4a16624 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, *fs1da, *fs2da;
+ void *fs[TGSI_TEXTURE_COUNT]; /**< Not all are used, but simplifies code */
struct pipe_resource *vbuf; /**< quad vertices */
unsigned vbuf_slot;
@@ -1301,34 +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);
- if (pipe->screen->get_param(pipe->screen, PIPE_CAP_ARRAY_TEXTURES)) {
- ctx->fs1da = util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_1D_ARRAY,
- TGSI_INTERPOLATE_LINEAR);
- ctx->fs2da = util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_2D_ARRAY,
- TGSI_INTERPOLATE_LINEAR);
- }
-
-
/* vertex data that doesn't change */
for (i = 0; i < 4; i++) {
ctx->vertices[i][0][2] = 0.0f; /* z */
@@ -1343,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.
*/
@@ -1450,16 +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]);
- if (ctx->fs2da)
- pipe->delete_fs_state(pipe, ctx->fs2da);
- if (ctx->fs1da)
- pipe->delete_fs_state(pipe, ctx->fs1da);
- 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);
@@ -1498,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.
@@ -1515,31 +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:
- fs = ctx->fs1da;
+ type = TGSI_TEXTURE_1D_ARRAY;
break;
case PIPE_TEXTURE_2D_ARRAY:
- fs = ctx->fs2da;
+ 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;
}
@@ -1564,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));
@@ -1660,8 +1668,6 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
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_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index 98889fb..ddb81b5 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -299,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,
diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
new file mode 100644
index 0000000..f79a693
--- /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 0000000..1c2f5f4
--- /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 ea6896b..50a7cd4 100644
--- a/src/gallium/auxiliary/util/u_resource.c
+++ b/src/gallium/auxiliary/util/u_resource.c
@@ -24,14 +24,6 @@ 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,
diff --git a/src/gallium/auxiliary/util/u_simple_screen.h b/src/gallium/auxiliary/util/u_simple_screen.h
index 7139aaa..7caeb75 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 4eddd3f..9caf76c 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_transfer.c b/src/gallium/auxiliary/util/u_transfer.c
index b6c63d9..7e72a59 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,
diff --git a/src/gallium/auxiliary/util/u_transfer.h b/src/gallium/auxiliary/util/u_transfer.h
index 8cf9c41..5b5ddeb 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,
@@ -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,
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index dcf800a..9562acb 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -85,9 +85,9 @@ void u_upload_flush( struct u_upload_mgr *upload )
{
/* Unmap and unreference the upload buffer. */
if (upload->transfer) {
- if (upload->size) {
+ if (upload->offset) {
pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer,
- 0, upload->size);
+ 0, upload->offset);
}
pipe_transfer_unmap(upload->pipe, upload->transfer);
pipe_transfer_destroy(upload->pipe, upload->transfer);
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index 7d157c9..521ac07 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -87,27 +87,27 @@ static void u_vbuf_mgr_init_format_caps(struct u_vbuf_mgr_priv *mgr)
mgr->caps.format_fixed32 =
screen->is_format_supported(screen, PIPE_FORMAT_R32_FIXED, PIPE_BUFFER,
- 0, PIPE_BIND_VERTEX_BUFFER, 0);
+ 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, 0);
+ 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, 0);
+ 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, 0) &&
+ 0, PIPE_BIND_VERTEX_BUFFER) &&
screen->is_format_supported(screen, PIPE_FORMAT_R32_SNORM, PIPE_BUFFER,
- 0, PIPE_BIND_VERTEX_BUFFER, 0);
+ 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, 0) &&
+ 0, PIPE_BIND_VERTEX_BUFFER) &&
screen->is_format_supported(screen, PIPE_FORMAT_R32_SSCALED, PIPE_BUFFER,
- 0, PIPE_BIND_VERTEX_BUFFER, 0);
+ 0, PIPE_BIND_VERTEX_BUFFER);
}
struct u_vbuf_mgr *
@@ -170,6 +170,7 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr,
/* 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];
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index d1ba5fa..c54e547 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -618,7 +618,7 @@ void vl_compositor_render(struct vl_compositor *compositor,
draw_layers(compositor, src_surface, src_area, dst_area);
assert(!compositor->dirty_bg && !compositor->dirty_layers);
- compositor->pipe->flush(compositor->pipe, PIPE_FLUSH_RENDER_CACHE, fence);
+ compositor->pipe->flush(compositor->pipe, fence);
}
void vl_compositor_set_csc_matrix(struct vl_compositor *compositor, const float *mat)
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_context.c b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
index ce1c158..74893ab 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_context.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
@@ -265,13 +265,9 @@ vl_mpeg12_is_format_supported(struct pipe_video_context *vpipe,
assert(vpipe);
- /* XXX: Temporary; not all paths are NPOT-tested */
- if (geom & PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO)
- return FALSE;
-
-
- return ctx->pipe->screen->is_format_supported(ctx->pipe->screen, format, PIPE_TEXTURE_2D,
- 0, usage, geom);
+ return ctx->pipe->screen->is_format_supported(ctx->pipe->screen, format,
+ PIPE_TEXTURE_2D,
+ 0, usage);
}
static void
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
index 0e5a21c..d45b064 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
@@ -681,7 +681,7 @@ vl_mpeg12_mc_renderer_flush(struct vl_mpeg12_mc_renderer *renderer, struct vl_mp
util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4,
empty_start_instance, empty_num_instances);
- renderer->pipe->flush(renderer->pipe, PIPE_FLUSH_RENDER_CACHE, buffer->fence);
+ renderer->pipe->flush(renderer->pipe, buffer->fence);
/* Next time we get this surface it may have new ref frames */
pipe_surface_reference(&buffer->surface, NULL);
diff --git a/src/gallium/docs/d3d11ddi.txt b/src/gallium/docs/d3d11ddi.txt
index 0a9e7e5..b5a06b4 100644
--- a/src/gallium/docs/d3d11ddi.txt
+++ b/src/gallium/docs/d3d11ddi.txt
@@ -453,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 c6812cd..b0229c7 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -408,6 +408,16 @@ 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
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index f9b83c86..58e647a 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -104,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,
@@ -140,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 e7c9fc4..181fef4 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 536b4ba..3568230 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 8275c9d..463f4d0 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 8d2b4b9..0ee124a 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/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c
index d60718d..0fefec9 100644
--- a/src/gallium/drivers/failover/fo_context.c
+++ b/src/gallium/drivers/failover/fo_context.c
@@ -79,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 );
}
@@ -89,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 )
{
@@ -150,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/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index 75e4c25..813a21e 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -761,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,
@@ -1038,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;
diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index b4825be..b4edebe 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 f4e1423..fba1800 100644
--- a/src/gallium/drivers/i915/TODO
+++ b/src/gallium/drivers/i915/TODO
@@ -12,22 +12,19 @@ Random list of problems with i915g:
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 039c871..ce2691b 100644
--- a/src/gallium/drivers/i915/i915_batch.h
+++ b/src/gallium/drivers/i915/i915_batch.h
@@ -37,6 +37,9 @@
#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 9df8227..7855403 100644
--- a/src/gallium/drivers/i915/i915_batchbuffer.h
+++ b/src/gallium/drivers/i915/i915_batchbuffer.h
@@ -55,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)
{
diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c
index 6d824a5..4a97746 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 84c8cb5..7a98ef7 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -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);
@@ -137,7 +140,10 @@ 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;
@@ -145,6 +151,10 @@ i915_create_context(struct pipe_screen *screen, void *priv)
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.
*/
@@ -164,15 +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;
i915->immediate_dirty = ~0;
i915->dynamic_dirty = ~0;
+ i915->static_dirty = ~0;
i915->flush_dirty = 0;
- /* Batch stream debugging is a bit hacked up at the moment:
- */
- i915->batch = i915->iws->batchbuffer_create(i915->iws);
-
return &i915->base;
}
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index 1da637d..dacf50e 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -38,6 +38,7 @@
#include "tgsi/tgsi_scan.h"
#include "util/u_slab.h"
+#include "util/u_blitter.h"
struct i915_winsys;
@@ -185,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];
};
@@ -244,14 +245,35 @@ struct i915_context {
struct i915_state current;
unsigned hardware_dirty;
- unsigned immediate_dirty;
- unsigned dynamic_dirty;
- unsigned flush_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:
@@ -296,6 +318,12 @@ struct i915_context {
#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)
{
@@ -326,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 1713bf1..c4eed47 100644
--- a/src/gallium/drivers/i915/i915_debug.c
+++ b/src/gallium/drivers/i915/i915_debug.c
@@ -46,17 +46,18 @@ static const struct debug_named_value debug_options[] = {
};
unsigned i915_debug = 0;
-boolean i915_tiling = TRUE;
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_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();
}
diff --git a/src/gallium/drivers/i915/i915_flush.c b/src/gallium/drivers/i915/i915_flush.c
index f2044d6..b4e8114 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)) {
- FLUSH_BATCH(NULL);
- assert(BEGIN_BATCH(1));
- }
- OUT_BATCH( flush );
- }
-#endif
-
if (i915->batch->map == i915->batch->ptr) {
return;
}
@@ -96,6 +74,7 @@ void i915_flush(struct i915_context *i915, struct pipe_fence_handle **fence)
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_prim_emit.c b/src/gallium/drivers/i915/i915_prim_emit.c
index 276e33d..85656cd 100644
--- a/src/gallium/drivers/i915/i915_prim_emit.c
+++ b/src/gallium/drivers/i915/i915_prim_emit.c
@@ -149,7 +149,6 @@ emit_prim( struct draw_stage *stage,
/* 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)) {
diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c
index fb4c051..79db3b6 100644
--- a/src/gallium/drivers/i915/i915_prim_vbuf.c
+++ b/src/gallium/drivers/i915/i915_prim_vbuf.c
@@ -470,7 +470,6 @@ draw_arrays_fallback(struct vbuf_render *render,
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived(i915);
i915_emit_hardware_state(i915);
i915->vbo_flushed = 1;
@@ -519,7 +518,6 @@ i915_vbuf_render_draw_arrays(struct vbuf_render *render,
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived(i915);
i915_emit_hardware_state(i915);
i915->vbo_flushed = 1;
@@ -640,7 +638,6 @@ i915_vbuf_render_draw_elements(struct vbuf_render *render,
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived(i915);
i915_emit_hardware_state(i915);
i915->vbo_flushed = 1;
diff --git a/src/gallium/drivers/i915/i915_reg.h b/src/gallium/drivers/i915/i915_reg.h
index 5e4e80d..6fe032c 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 499233c..7f52ba1 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 51482f5..77c0345 100644
--- a/src/gallium/drivers/i915/i915_resource_buffer.c
+++ b/src/gallium/drivers/i915/i915_resource_buffer.c
@@ -123,7 +123,6 @@ struct u_resource_vtbl i915_buffer_vtbl =
{
i915_buffer_get_handle, /* get_handle */
i915_buffer_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
i915_get_transfer, /* get_transfer */
i915_transfer_destroy, /* transfer_destroy */
i915_buffer_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index aad5235..7816925 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -184,7 +184,10 @@ i915_texture_tiling(struct i915_screen *is, struct i915_texture *tex)
/* 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;
}
@@ -756,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)
@@ -781,7 +787,6 @@ 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 */
i915_transfer_destroy, /* transfer_destroy */
i915_texture_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 77febbf..e62b609 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -105,6 +105,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
switch (cap) {
/* Supported features (boolean caps). */
case PIPE_CAP_ANISOTROPIC_FILTER:
+ case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
case PIPE_CAP_NPOT_TEXTURES:
case PIPE_CAP_PRIMITIVE_RESTART: /* draw module */
case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
@@ -115,17 +116,18 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
/* Features that should be supported (boolean caps). */
/* XXX: Just test the code */
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
- return 0;
+ /* 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_DEPTHSTENCIL_CLEAR_SEPARATE: /* disable for now */
- case PIPE_CAP_GLSL:
case PIPE_CAP_INDEP_BLEND_ENABLE:
case PIPE_CAP_INDEP_BLEND_FUNC:
- case PIPE_CAP_INSTANCED_DRAWING: /* draw module? */
- case PIPE_CAP_POINT_SPRITE:
+ 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:
@@ -133,6 +135,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
return 0;
/* Features we can lie about (boolean caps). */
+ case PIPE_CAP_GLSL:
case PIPE_CAP_OCCLUSION_QUERY:
return is->debug.lie ? 1 : 0;
@@ -249,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,
@@ -317,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;
}
diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h
index 60f0e29..cfc585b 100644
--- a/src/gallium/drivers/i915/i915_screen.h
+++ b/src/gallium/drivers/i915/i915_screen.h
@@ -49,6 +49,7 @@ struct i915_screen
struct {
boolean tiling;
boolean lie;
+ boolean use_blitter;
} debug;
};
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 58bbbd1..1b57c57 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -287,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)
{
@@ -466,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);
@@ -505,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);
@@ -571,6 +595,27 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
}
+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)
@@ -642,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);
@@ -657,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;
@@ -687,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;
@@ -758,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;
@@ -778,6 +826,9 @@ static void i915_set_vertex_buffers(struct pipe_context *pipe,
struct draw_context *draw = i915->draw;
int i;
+ 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 */
@@ -818,6 +869,8 @@ 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;
+ i915->saved_velems = velems;
+
/* pass-through to draw module */
if (i915_velems) {
draw_set_vertex_elements(i915->draw,
@@ -896,3 +949,14 @@ i915_init_state_functions( struct i915_context *i915 )
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 b4074dc..3f4e402 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 1d4026a..59ac2f7 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_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index 15350c0..0155cd8 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -119,7 +119,7 @@ validate_immediate(struct i915_context *i915, unsigned *batch_space)
1 << I915_IMMEDIATE_S5 | 1 << I915_IMMEDIATE_S6) &
i915->immediate_dirty;
- if (i915->immediate_dirty & (1 << I915_IMMEDIATE_S0))
+ 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);
@@ -173,25 +173,31 @@ emit_dynamic(struct i915_context *i915)
static void
validate_static(struct i915_context *i915, unsigned *batch_space)
{
- *batch_space = 2 + 5; /* including DRAW_RECT */
+ *batch_space = 0;
- if (i915->current.cbuf_bo) {
+ 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;
}
- if (i915->current.depth_bo) {
+ 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;
}
+
+ if (i915->static_dirty & I915_DST_VARS)
+ *batch_space += 2;
+
+ if (i915->static_dirty & I915_DST_RECT)
+ *batch_space += 5;
}
static void
emit_static(struct i915_context *i915)
{
- if (i915->current.cbuf_bo) {
+ 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,
@@ -201,7 +207,7 @@ emit_static(struct i915_context *i915)
/* What happens if no zbuf??
*/
- if (i915->current.depth_bo) {
+ 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,
@@ -209,7 +215,7 @@ emit_static(struct i915_context *i915)
0);
}
- {
+ if (i915->static_dirty & I915_DST_VARS) {
OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
OUT_BATCH(i915->current.dst_buf_vars);
}
@@ -273,7 +279,7 @@ emit_sampler(struct i915_context *i915)
if (i915->current.sampler_enable_nr) {
int i;
- OUT_BATCH( _3DSTATE_SAMPLER_STATE |
+ OUT_BATCH( _3DSTATE_SAMPLER_STATE |
(3 * i915->current.sampler_enable_nr) );
OUT_BATCH( i915->current.sampler_enable_flags );
@@ -355,11 +361,13 @@ emit_program(struct i915_context *i915)
static void
emit_draw_rect(struct i915_context *i915)
{
- 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);
+ 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);
+ }
}
static boolean
@@ -405,6 +413,8 @@ i915_emit_hardware_state(struct i915_context *i915 )
unsigned batch_space;
uintptr_t save_ptr;
+ assert(i915->dirty == 0);
+
if (I915_DBG_ON(DBG_ATOMS))
i915_dump_hardware_dirty(i915, __FUNCTION__);
@@ -444,5 +454,6 @@ i915_emit_hardware_state(struct i915_context *i915 )
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_static.c b/src/gallium/drivers/i915/i915_state_static.c
index 20cd23f..2865298 100644
--- a/src/gallium/drivers/i915/i915_state_static.c
+++ b/src/gallium/drivers/i915/i915_state_static.c
@@ -28,6 +28,7 @@
#include "i915_context.h"
#include "i915_state.h"
#include "i915_resource.h"
+#include "i915_screen.h"
@@ -78,38 +79,13 @@ buf_3d_tiling_bits(enum i915_winsys_buffer_tile tiling)
return tiling_bits;
}
-/**
- * Examine framebuffer state to determine width, height.
- */
-static boolean
-framebuffer_size(const struct pipe_framebuffer_state *fb,
- uint *width, uint *height)
-{
- 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;
- }
-}
-
static void update_framebuffer(struct i915_context *i915)
{
struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0];
struct pipe_surface *depth_surface = i915->framebuffer.zsbuf;
- unsigned cformat, zformat;
- unsigned x, y, w, h;
+ unsigned x, y;
int layer;
- uint32_t draw_offset;
- boolean ret;
+ uint32_t draw_offset, draw_size;
if (cbuf_surface) {
struct i915_texture *tex = i915_texture(cbuf_surface->texture);
@@ -119,7 +95,6 @@ static void update_framebuffer(struct i915_context *i915)
i915->current.cbuf_flags = BUF_3D_ID_COLOR_BACK |
BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
buf_3d_tiling_bits(tex->tiling);
- cformat = cbuf_surface->format;
layer = cbuf_surface->u.tex.first_layer;
@@ -127,10 +102,9 @@ static void update_framebuffer(struct i915_context *i915)
y = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksy;
} else {
i915->current.cbuf_bo = NULL;
- cformat = PIPE_FORMAT_B8G8R8A8_UNORM; /* arbitrary */
x = y = 0;
}
- cformat = translate_format(cformat);
+ i915->static_dirty |= I915_DST_BUF_COLOR;
/* What happens if no zbuf??
*/
@@ -145,28 +119,23 @@ static void update_framebuffer(struct i915_context *i915)
i915->current.depth_flags = BUF_3D_ID_DEPTH |
BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
buf_3d_tiling_bits(tex->tiling);
- zformat = translate_depth_format(depth_surface->format);
- } else {
+ } else
i915->current.depth_bo = NULL;
- zformat = 0;
- }
-
- i915->current.dst_buf_vars = DSTORG_HORT_BIAS(0x8) | /* .5 */
- DSTORG_VERT_BIAS(0x8) | /* .5 */
- LOD_PRECLAMP_OGL |
- TEX_DEFAULT_COLOR_OGL |
- cformat |
- zformat;
+ i915->static_dirty |= I915_DST_BUF_DEPTH;
/* drawing rect calculations */
draw_offset = x | (y << 16);
- ret = framebuffer_size(&i915->framebuffer, &w, &h);
- assert(ret);
+ 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->current.draw_size = (w - 1 + x) | ((h - 1 + y) << 16);
i915->hardware_dirty |= I915_HW_STATIC;
@@ -179,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 becc6e9..d02c420 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/i965/brw_pipe_flush.c b/src/gallium/drivers/i965/brw_pipe_flush.c
index 0ae1a6b..3b4a99b 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_resource_buffer.c b/src/gallium/drivers/i965/brw_resource_buffer.c
index afb96ee..32dc54f 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 0cb895f..71a1829 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 */
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index bf805fd..25204fd 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -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;
}
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c
index b533abe..2a9d736 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,
@@ -931,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;
diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
index 644481b..9bf7fd4 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 e9374cc..1fc7746 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/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 644201d..8a5655d 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -136,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_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index 849db06..4243055 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[i]);
- }
-
- 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 579d24c..efff94c 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_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index 84c66dd..1e2401f 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_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 2c32aa9..521a52a 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -164,7 +164,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1;
case PIPE_CAP_DEPTH_CLAMP:
return 0;
- case PIPE_CAP_INSTANCED_DRAWING:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
default:
return 0;
@@ -224,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;
@@ -348,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);
@@ -361,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 7b7b272..3813e0e 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;
}
@@ -1114,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 0d6e161..8655259 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_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index ad751b9..9f1ec14 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_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c
index e7e46a6..f49638a 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_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 9753da5..fa4ce5b 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 b789c0f..b4a0dfd 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 3680f46..496b7f5 100644
--- a/src/gallium/drivers/noop/noop_pipe.c
+++ b/src/gallium/drivers/noop/noop_pipe.c
@@ -87,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)
{
@@ -267,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)
{
}
@@ -303,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;
@@ -453,8 +445,7 @@ 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;
}
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index d0cc291..01d3aa4 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -314,7 +314,6 @@ const struct u_resource_vtbl nouveau_buffer_vtbl =
{
u_default_resource_get_handle, /* get_handle */
nouveau_buffer_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
nouveau_buffer_transfer_get, /* get_transfer */
nouveau_buffer_transfer_destroy, /* transfer_destroy */
nouveau_buffer_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c
index 18bdb18..d8f59dc 100644
--- a/src/gallium/drivers/nouveau/nouveau_fence.c
+++ b/src/gallium/drivers/nouveau/nouveau_fence.c
@@ -90,6 +90,9 @@ nouveau_fence_emit(struct nouveau_fence *fence)
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;
@@ -100,8 +103,6 @@ nouveau_fence_emit(struct nouveau_fence *fence)
screen->fence.head = fence;
screen->fence.tail = fence;
-
- fence->state = NOUVEAU_FENCE_STATE_EMITTED;
}
void
@@ -215,6 +216,8 @@ nouveau_fence_wait(struct nouveau_fence *fence)
void
nouveau_fence_next(struct nouveau_screen *screen)
{
- nouveau_fence_emit(screen->fence.current);
+ 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_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index e6cd306..401155b 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include "nouveau/nouveau_bo.h"
+#include "nouveau/nouveau_mm.h"
#include "nouveau_winsys.h"
#include "nouveau_screen.h"
#include "nouveau_fence.h"
@@ -154,20 +155,19 @@ nouveau_screen_fence_ref(struct pipe_screen *pscreen,
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 !nouveau_fence_signalled(nouveau_fence(pfence));
+ 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 !nouveau_fence_wait(nouveau_fence(pfence));
+ return nouveau_fence_wait(nouveau_fence(pfence));
}
@@ -210,26 +210,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)
{
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index c091abf..186ada3 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -74,10 +74,6 @@ 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 *);
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 912367b..930cee7 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -30,25 +30,20 @@
#include "nouveau/nouveau_reloc.h"
static void
-nv50_flush(struct pipe_context *pipe, unsigned flags,
+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;
-
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
- BEGIN_RING(chan, RING_3D_(NV50_GRAPH_WAIT_FOR_IDLE), 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, RING_3D(TEX_CACHE_CTL), 1);
- OUT_RING (chan, 0x20);
- }
+ struct nouveau_screen *screen = &nv50_context(pipe)->screen->base;
if (fence)
- nouveau_fence_ref(nv50->screen->base.fence.current,
- (struct nouveau_fence **)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);
- if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_FRAME))
- FIRE_RING(chan);
+ FIRE_RING(screen->channel);
}
void
@@ -64,10 +59,34 @@ nv50_default_flush_notify(struct nouveau_channel *chan)
}
static void
+nv50_context_unreference_resources(struct nv50_context *nv50)
+{
+ unsigned s, i;
+
+ for (i = 0; i < NV50_BUFCTX_COUNT; ++i)
+ nv50_bufctx_reset(nv50, i);
+
+ for (i = 0; i < nv50->num_vtxbufs; ++i)
+ pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
+
+ pipe_resource_reference(&nv50->idxbuf.buffer, 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);
+
+ 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) {
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index ae6b26a..9eeca05 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -106,7 +106,6 @@ 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_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/nv50/nv50_resource.c b/src/gallium/drivers/nv50/nv50_resource.c
index 2a2fb0e..1ae4d70 100644
--- a/src/gallium/drivers/nv50/nv50_resource.c
+++ b/src/gallium/drivers/nv50/nv50_resource.c
@@ -3,22 +3,6 @@
#include "nv50_resource.h"
#include "nouveau/nouveau_screen.h"
-static unsigned
-nv50_resource_is_referenced(struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned face, int layer)
-{
- struct nv04_resource *res = nv04_resource(resource);
- unsigned flags = 0;
- unsigned bo_flags = nouveau_bo_pending(res->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;
-}
static struct pipe_resource *
nv50_resource_create(struct pipe_screen *screen,
@@ -52,7 +36,6 @@ nv50_init_resource_functions(struct pipe_context *pcontext)
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;
}
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index ae0365e..7690c80 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -40,7 +40,7 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bindings, unsigned geom_flags)
+ unsigned bindings)
{
if (sample_count > 1)
return FALSE;
@@ -127,7 +127,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_SHADER_STENCIL_EXPORT:
return 0;
case PIPE_CAP_PRIMITIVE_RESTART:
- case PIPE_CAP_INSTANCED_DRAWING:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 980bc36..db25715 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -796,10 +796,13 @@ nv50_set_index_buffer(struct pipe_context *pipe,
{
struct nv50_context *nv50 = nv50_context(pipe);
- if (ib)
+ if (ib) {
+ pipe_resource_reference(&nv50->idxbuf.buffer, ib->buffer);
+
memcpy(&nv50->idxbuf, ib, sizeof(nv50->idxbuf));
- else
- nv50->idxbuf.buffer = NULL;
+ } else {
+ pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
+ }
}
static void
@@ -866,5 +869,7 @@ nv50_init_state_functions(struct nv50_context *nv50)
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 bf46296..f3d45eb 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -43,8 +43,9 @@ nv50_validate_fb(struct nv50_context *nv50)
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_RDWR);
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
}
if (fb->zsbuf) {
@@ -74,7 +75,7 @@ nv50_validate_fb(struct nv50_context *nv50)
mt->base.status &= NOUVEAU_BUFFER_STATUS_GPU_READING;
nv50_bufctx_add_resident(nv50, NV50_BUFCTX_FRAME, &mt->base,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
} else {
BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
OUT_RING (chan, 0);
@@ -253,6 +254,35 @@ nv50_validate_rasterizer(struct nv50_context *nv50)
OUT_RINGp(chan, nv50->rast->state, nv50->rast->size);
}
+static void
+nv50_switch_pipe_context(struct nv50_context *ctx_to)
+{
+ struct nv50_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 &= ~(NV50_NEW_VERTEX | NV50_NEW_ARRAYS);
+
+ if (!ctx_to->vertprog)
+ ctx_to->dirty &= ~NV50_NEW_VERTPROG;
+ if (!ctx_to->fragprog)
+ ctx_to->dirty &= ~NV50_NEW_FRAGPROG;
+
+ 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;
+}
+
static struct state_validate {
void (*func)(struct nv50_context *);
uint32_t states;
@@ -292,11 +322,9 @@ boolean
nv50_state_validate(struct nv50_context *nv50)
{
unsigned i;
-#if 0
- if (nv50->screen->cur_ctx != nv50) /* FIXME: not everything is valid */
- nv50->dirty = 0xffffffff;
-#endif
- nv50->screen->cur_ctx = nv50;
+
+ if (nv50->screen->cur_ctx != nv50)
+ nv50_switch_pipe_context(nv50);
if (nv50->dirty) {
for (i = 0; i < validate_list_len; ++i) {
diff --git a/src/gallium/drivers/nv50/nv50_stateobj.h b/src/gallium/drivers/nv50/nv50_stateobj.h
index cf5b92e..515e3e7 100644
--- a/src/gallium/drivers/nv50/nv50_stateobj.h
+++ b/src/gallium/drivers/nv50/nv50_stateobj.h
@@ -49,7 +49,7 @@ struct nv50_vertex_stateobj {
boolean need_conversion;
unsigned vertex_size;
unsigned packet_vertex_limit;
- struct nv50_vertex_element element[1];
+ struct nv50_vertex_element element[0];
};
#endif
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index 4f0a501..abdb9ce 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -51,10 +51,8 @@ nv50_vertex_state_create(struct pipe_context *pipe,
struct translate_key transkey;
unsigned i;
- assert(num_elements);
-
so = MALLOC(sizeof(*so) +
- (num_elements - 1) * sizeof(struct nv50_vertex_element));
+ num_elements * sizeof(struct nv50_vertex_element));
if (!so)
return NULL;
so->num_elements = num_elements;
diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
index 5857f7c..94fa081 100644
--- a/src/gallium/drivers/nvc0/nvc0_3d.xml.h
+++ b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
@@ -927,6 +927,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#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
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index d6de979..5d2168e 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -30,29 +30,45 @@
#include "nouveau/nouveau_reloc.h"
static void
-nvc0_flush(struct pipe_context *pipe, unsigned flags,
+nvc0_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
- struct nvc0_context *nvc0 = nvc0_context(pipe);
- struct nouveau_channel *chan = nvc0->screen->base.channel;
-
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
- BEGIN_RING(chan, RING_3D(SERIALIZE), 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, RING_3D(TEX_CACHE_CTL), 1);
- OUT_RING (chan, 0x00);
- } else
- if ((flags & PIPE_FLUSH_RENDER_CACHE) && !(flags & PIPE_FLUSH_FRAME)) {
- BEGIN_RING(chan, RING_3D(SERIALIZE), 1);
- OUT_RING (chan, 0);
- }
+ struct nouveau_screen *screen = &nvc0_context(pipe)->screen->base;
if (fence)
- nouveau_fence_ref(nvc0->screen->base.fence.current,
- (struct nouveau_fence **)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);
- if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_FRAME))
- FIRE_RING(chan);
+ 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
@@ -60,6 +76,8 @@ 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) {
diff --git a/src/gallium/drivers/nvc0/nvc0_context.h b/src/gallium/drivers/nvc0/nvc0_context.h
index 67c5a12..102997e 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.h
+++ b/src/gallium/drivers/nvc0/nvc0_context.h
@@ -79,6 +79,7 @@ struct nvc0_context {
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];
@@ -135,6 +136,9 @@ struct nvc0_context {
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)
{
diff --git a/src/gallium/drivers/nvc0/nvc0_graph_macros.h b/src/gallium/drivers/nvc0/nvc0_graph_macros.h
index 8da963a..b7d0d3e 100644
--- a/src/gallium/drivers/nvc0/nvc0_graph_macros.h
+++ b/src/gallium/drivers/nvc0/nvc0_graph_macros.h
@@ -144,7 +144,7 @@ static const uint32_t nvc0_9097_poly_mode_back[] =
0x00180611, /* 0x05: mov $r6 0x60 */
0x0014bf10, /* 0x06: mov $r7 and $r7 $r2 */
0x0000f807, /* 0x07: braz $r7 0xa */
- 0x00dac021, /* 0x08: maddr 0x36b */
+ 0x00db0021, /* 0x08: maddr 0x36c */
0x00800611, /* 0x09: mov $r6 0x200 */
0x00131f10, /* 0x0a: mov $r7 or $r3 $r4 */
0x0014bf10, /* 0x0b: mov $r7 and $r7 $r2 */
diff --git a/src/gallium/drivers/nvc0/nvc0_miptree.c b/src/gallium/drivers/nvc0/nvc0_miptree.c
index db9117c..bced324 100644
--- a/src/gallium/drivers/nvc0/nvc0_miptree.c
+++ b/src/gallium/drivers/nvc0/nvc0_miptree.c
@@ -114,7 +114,6 @@ const struct u_resource_vtbl nvc0_miptree_vtbl =
{
nvc0_miptree_get_handle, /* get_handle */
nvc0_miptree_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
nvc0_miptree_transfer_new, /* get_transfer */
nvc0_miptree_transfer_del, /* transfer_destroy */
nvc0_miptree_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.c b/src/gallium/drivers/nvc0/nvc0_pc.c
index f51d289..bd85a7f 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc.c
@@ -25,6 +25,14 @@
#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)
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.h b/src/gallium/drivers/nvc0/nvc0_pc.h
index efa073a..3a5612a 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc.h
+++ b/src/gallium/drivers/nvc0/nvc0_pc.h
@@ -210,6 +210,8 @@
#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)
@@ -219,7 +221,7 @@ struct nv_op_info {
uint base; /* e.g. ADD_S32 -> ADD */
char name[12];
uint8_t type;
- uint8_t mods;
+ uint16_t mods;
unsigned flow : 1;
unsigned commutative : 1;
unsigned vector : 1;
@@ -234,12 +236,6 @@ 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 uint
-nv_op_base(uint opcode)
-{
- return nvc0_op_info_table[opcode].base;
-}
-
static INLINE boolean
nv_is_texture_op(uint opcode)
{
@@ -259,9 +255,9 @@ nv_op_commutative(uint opcode)
}
static INLINE uint8_t
-nv_op_supported_src_mods(uint opcode)
+nv_op_supported_src_mods(uint opcode, int s)
{
- return nvc0_op_info_table[opcode].mods;
+ return (nvc0_op_info_table[opcode].mods >> (s * 4)) & 0xf;
}
static INLINE uint
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_emit.c b/src/gallium/drivers/nvc0/nvc0_pc_emit.c
index c10f920..76ad40d 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc_emit.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc_emit.c
@@ -610,6 +610,8 @@ emit_selp(struct nv_pc *pc, struct nv_instruction *i)
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) {
@@ -627,7 +629,10 @@ emit_slct(struct nv_pc *pc, struct nv_instruction *i)
emit_form_0(pc, i);
- pc->emit[1] |= i->set_cond << 23;
+ if (i->src[2]->mod & NV_MOD_NEG)
+ cc = nvc0_ir_reverse_cc(cc);
+
+ pc->emit[1] |= cc << 23;
}
static void
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
index c5a7367..f7bf168 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
@@ -240,8 +240,6 @@ is_immd32_load(struct nv_instruction *nvi)
static INLINE void
check_swap_src_0_1(struct nv_instruction *nvi)
{
- static const uint8_t cc_swapped[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
-
struct nv_ref *src0 = nvi->src[0];
struct nv_ref *src1 = nvi->src[1];
@@ -270,7 +268,7 @@ check_swap_src_0_1(struct nv_instruction *nvi)
if (nvi->src[0] != src0) {
if (NV_BASEOP(nvi->opcode) == NV_OP_SET)
- nvi->set_cond = (nvi->set_cond & ~7) | cc_swapped[nvi->set_cond & 7];
+ 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);
@@ -363,7 +361,7 @@ nv_pass_lower_mods(struct nv_pass *ctx, struct nv_basic_block *b)
mod = 0;
}
- if ((nv_op_supported_src_mods(nvi->opcode) & mod) != mod)
+ if ((nv_op_supported_src_mods(nvi->opcode, j) & mod) != mod)
continue;
nv_reference(ctx->pc, nvi, j, mi->src[0]->value);
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_print.c b/src/gallium/drivers/nvc0/nvc0_pc_print.c
index 90c669c..1f37cb8 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc_print.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc_print.c
@@ -269,7 +269,11 @@ nvc0_print_instruction(struct nv_instruction *i)
PRINT(" %s\n", norm);
}
-#define NV_MOD_SGN NV_MOD_ABS | NV_MOD_NEG
+#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] =
{
@@ -292,8 +296,8 @@ struct nv_op_info nvc0_op_info_table[NV_OP_COUNT + 1] =
{ 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_SGN, 0, 1, 0, 1, 0, 2, 2 },
- { NV_OP_MAD, "mad", NV_TYPE_F32, NV_MOD_SGN, 0, 1, 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 },
@@ -363,9 +367,9 @@ struct nv_op_info nvc0_op_info_table[NV_OP_COUNT + 1] =
{ NV_OP_SELP, "selp", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 0, 0 },
- { NV_OP_SLCT, "slct", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 2, 2 },
- { NV_OP_SLCT, "slct", NV_TYPE_S32, 0, 0, 0, 0, 1, 0, 2, 2 },
- { NV_OP_SLCT, "slct", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 2, 2 },
+ { 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 },
diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c
index 899fe14..3c59213 100644
--- a/src/gallium/drivers/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nvc0/nvc0_program.c
@@ -202,6 +202,8 @@ nvc0_varying_location(unsigned sn, unsigned si)
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);
@@ -290,6 +292,8 @@ prog_decl(struct nvc0_translation_info *ti,
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: */
@@ -298,6 +302,7 @@ prog_decl(struct nvc0_translation_info *ti,
}
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;
@@ -426,6 +431,8 @@ nvc0_vp_gp_gen_header(struct nvc0_program *vp, struct nvc0_translation_info *ti)
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;
@@ -528,7 +535,7 @@ nvc0_fp_gen_header(struct nvc0_program *fp, struct nvc0_translation_info *ti)
}
for (i = 0; i <= ti->scan.file_max[TGSI_FILE_INPUT]; ++i) {
- m = ti->interp_mode[i];
+ m = ti->interp_mode[i] & 3;
for (c = 0; c < 4; ++c) {
if (!ti->input_access[i][c])
continue;
@@ -669,6 +676,8 @@ nvc0_program_translate(struct nvc0_program *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;
diff --git a/src/gallium/drivers/nvc0/nvc0_push.c b/src/gallium/drivers/nvc0/nvc0_push.c
index 68544c9..2e9f4c1 100644
--- a/src/gallium/drivers/nvc0/nvc0_push.c
+++ b/src/gallium/drivers/nvc0/nvc0_push.c
@@ -15,9 +15,6 @@ struct push_context {
void *idxbuf;
- float edgeflag;
- int edgeflag_attr;
-
uint32_t vertex_words;
uint32_t packet_vertex_limit;
@@ -27,8 +24,56 @@ struct push_context {
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)
{
@@ -62,7 +107,7 @@ prim_restart_search_i32(uint32_t *elts, unsigned push, uint32_t index)
static void
emit_vertices_i08(struct push_context *ctx, unsigned start, unsigned count)
{
- uint8_t *elts = (uint8_t *)ctx->idxbuf + start;
+ uint8_t *restrict elts = (uint8_t *)ctx->idxbuf + start;
while (count) {
unsigned push = MIN2(count, ctx->packet_vertex_limit);
@@ -72,6 +117,9 @@ emit_vertices_i08(struct push_context *ctx, unsigned start, unsigned count)
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);
@@ -97,7 +145,7 @@ emit_vertices_i08(struct push_context *ctx, unsigned start, unsigned count)
static void
emit_vertices_i16(struct push_context *ctx, unsigned start, unsigned count)
{
- uint16_t *elts = (uint16_t *)ctx->idxbuf + start;
+ uint16_t *restrict elts = (uint16_t *)ctx->idxbuf + start;
while (count) {
unsigned push = MIN2(count, ctx->packet_vertex_limit);
@@ -107,6 +155,9 @@ emit_vertices_i16(struct push_context *ctx, unsigned start, unsigned count)
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);
@@ -132,7 +183,7 @@ emit_vertices_i16(struct push_context *ctx, unsigned start, unsigned count)
static void
emit_vertices_i32(struct push_context *ctx, unsigned start, unsigned count)
{
- uint32_t *elts = (uint32_t *)ctx->idxbuf + start;
+ uint32_t *restrict elts = (uint32_t *)ctx->idxbuf + start;
while (count) {
unsigned push = MIN2(count, ctx->packet_vertex_limit);
@@ -142,6 +193,9 @@ emit_vertices_i32(struct push_context *ctx, unsigned start, unsigned count)
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);
@@ -171,6 +225,9 @@ emit_vertices_seq(struct push_context *ctx, unsigned start, unsigned 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,
@@ -219,10 +276,7 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
unsigned inst = info->instance_count;
boolean apply_bias = info->indexed && info->index_bias;
- ctx.chan = nvc0->screen->base.channel;
- ctx.translate = nvc0->vertex->translate;
- ctx.packet_vertex_limit = nvc0->vertex->vtx_per_packet_max;
- ctx.vertex_words = nvc0->vertex->vtx_size;
+ init_push_context(nvc0, &ctx);
for (i = 0; i < nvc0->num_vtxbufs; ++i) {
uint8_t *data;
@@ -236,12 +290,18 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
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);
+ 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;
@@ -283,6 +343,9 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
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));
diff --git a/src/gallium/drivers/nvc0/nvc0_resource.c b/src/gallium/drivers/nvc0/nvc0_resource.c
index fb5a496..44e6631 100644
--- a/src/gallium/drivers/nvc0/nvc0_resource.c
+++ b/src/gallium/drivers/nvc0/nvc0_resource.c
@@ -3,25 +3,6 @@
#include "nvc0_resource.h"
#include "nouveau/nouveau_screen.h"
-static unsigned
-nvc0_resource_is_referenced(struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned face, int layer)
-{
- struct nv04_resource *res = nv04_resource(resource);
- unsigned flags = 0;
-
-#ifdef NOUVEAU_USERSPACE_MM
- flags = res->status;
-#else
- unsigned bo_flags = nouveau_bo_pending(res->bo);
- if (bo_flags & NOUVEAU_BO_RD)
- flags = PIPE_REFERENCED_FOR_READ;
- if (bo_flags & NOUVEAU_BO_WR)
- flags |= PIPE_REFERENCED_FOR_WRITE;
-#endif
- return flags;
-}
static struct pipe_resource *
nvc0_resource_create(struct pipe_screen *screen,
@@ -55,7 +36,6 @@ nvc0_init_resource_functions(struct pipe_context *pcontext)
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 = nvc0_resource_is_referenced;
pcontext->create_surface = nvc0_miptree_surface_new;
pcontext->surface_destroy = nvc0_miptree_surface_del;
}
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index d430be9..1047ba3 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -34,7 +34,7 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bindings, unsigned geom_flags)
+ unsigned bindings)
{
if (sample_count > 1)
return FALSE;
@@ -111,7 +111,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_SHADER_STENCIL_EXPORT:
return 0;
case PIPE_CAP_PRIMITIVE_RESTART:
- case PIPE_CAP_INSTANCED_DRAWING:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
@@ -206,7 +207,7 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
nouveau_bo_ref(NULL, &screen->tls);
nouveau_bo_ref(NULL, &screen->txc);
nouveau_bo_ref(NULL, &screen->fence.bo);
- nouveau_bo_ref(NULL, &screen->mp_stack_bo);
+ nouveau_bo_ref(NULL, &screen->vfetch_cache);
nouveau_resource_destroy(&screen->text_heap);
@@ -495,14 +496,14 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
OUT_RING (chan, 0);
ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 20,
- &screen->mp_stack_bo);
+ &screen->vfetch_cache);
if (ret)
goto fail;
- BEGIN_RING(chan, RING_3D_(0x17bc), 3);
- OUT_RELOCh(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
- OUT_RELOCl(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
- OUT_RING (chan, 1);
+ 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)
@@ -634,7 +635,7 @@ nvc0_screen_make_buffers_resident(struct nvc0_screen *screen)
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->mp_stack_bo, 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);
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.h b/src/gallium/drivers/nvc0/nvc0_screen.h
index 81f404a..94bf0cf 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nvc0/nvc0_screen.h
@@ -26,7 +26,7 @@ struct nvc0_screen {
struct nouveau_bo *uniforms;
struct nouveau_bo *tls;
struct nouveau_bo *txc; /* TIC (offset 0) and TSC (65536) */
- struct nouveau_bo *mp_stack_bo;
+ struct nouveau_bo *vfetch_cache;
uint64_t tls_size;
diff --git a/src/gallium/drivers/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nvc0/nvc0_shader_state.c
index 79b5f3d..7294eaa 100644
--- a/src/gallium/drivers/nvc0/nvc0_shader_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_shader_state.c
@@ -111,8 +111,6 @@ nvc0_fragprog_validate(struct nvc0_context *nvc0)
return;
nvc0_program_update_context_state(nvc0, fp, 4);
- BEGIN_RING(chan, RING_3D(EARLY_FRAGMENT_TESTS), 1);
- OUT_RING (chan, fp->fp.early_z);
BEGIN_RING(chan, RING_3D(SP_SELECT(5)), 2);
OUT_RING (chan, 0x51);
OUT_RING (chan, fp->code_base);
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index f230292..ab68abc 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -166,6 +166,7 @@ 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)
@@ -202,6 +203,13 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
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);
@@ -268,14 +276,11 @@ nvc0_zsa_state_create(struct pipe_context *pipe,
so->pipe = *cso;
- SB_IMMED_3D(so, DEPTH_WRITE_ENABLE, cso->depth.writemask);
- SB_BEGIN_3D(so, DEPTH_TEST_ENABLE, 1);
+ SB_IMMED_3D(so, DEPTH_TEST_ENABLE, cso->depth.enabled);
if (cso->depth.enabled) {
- SB_DATA (so, 1);
+ 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));
- } else {
- SB_DATA (so, 0);
}
if (cso->stencil[0].enabled) {
@@ -307,15 +312,12 @@ nvc0_zsa_state_create(struct pipe_context *pipe,
if (cso->stencil[0].enabled) {
SB_IMMED_3D(so, STENCIL_TWO_SIDE_ENABLE, 0);
}
-
- SB_BEGIN_3D(so, ALPHA_TEST_ENABLE, 1);
+
+ SB_IMMED_3D(so, ALPHA_TEST_ENABLE, cso->alpha.enabled);
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])));
@@ -706,10 +708,13 @@ nvc0_set_index_buffer(struct pipe_context *pipe,
{
struct nvc0_context *nvc0 = nvc0_context(pipe);
- if (ib)
- memcpy(&nvc0->idxbuf, ib, sizeof(nvc0->idxbuf));
- else
- nvc0->idxbuf.buffer = NULL;
+ 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
diff --git a/src/gallium/drivers/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nvc0/nvc0_state_validate.c
index 6fd8808..bb81480 100644
--- a/src/gallium/drivers/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nvc0/nvc0_state_validate.c
@@ -93,8 +93,9 @@ nvc0_validate_fb(struct nvc0_context *nvc0)
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_RDWR);
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
}
if (fb->zsbuf) {
@@ -127,7 +128,7 @@ nvc0_validate_fb(struct nvc0_context *nvc0)
mt->base.status &= ~NOUVEAU_BUFFER_STATUS_GPU_READING;
nvc0_bufctx_add_resident(nvc0, NVC0_BUFCTX_FRAME, &mt->base,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
} else {
BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
OUT_RING (chan, 0);
@@ -294,32 +295,6 @@ nvc0_validate_rasterizer(struct nvc0_context *nvc0)
}
static void
-nvc0_validate_sprite_coords(struct nvc0_context *nvc0)
-{
- struct nouveau_channel *chan = nvc0->screen->base.channel;
- uint32_t reg;
-
- if (nvc0->rast->pipe.sprite_coord_mode == PIPE_SPRITE_COORD_UPPER_LEFT)
- reg = NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_UPPER_LEFT;
- else
- reg = NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_LOWER_LEFT;
-
- if (nvc0->rast->pipe.point_quad_rasterization) {
- uint32_t en = nvc0->rast->pipe.sprite_coord_enable;
-
- while (en) {
- int i = ffs(en) - 1;
- en &= ~(1 << i);
- if (i >= 0 && i < 8)
- reg |= 8 << i;
- }
- }
-
- BEGIN_RING(chan, RING_3D(POINT_COORD_REPLACE), 1);
- OUT_RING (chan, reg);
-}
-
-static void
nvc0_constbufs_validate(struct nvc0_context *nvc0)
{
struct nouveau_channel *chan = nvc0->screen->base.channel;
@@ -413,6 +388,49 @@ nvc0_constbufs_validate(struct nvc0_context *nvc0)
}
}
+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;
@@ -432,7 +450,7 @@ static struct state_validate {
{ nvc0_tevlprog_validate, NVC0_NEW_TEVLPROG },
{ nvc0_gmtyprog_validate, NVC0_NEW_GMTYPROG },
{ nvc0_fragprog_validate, NVC0_NEW_FRAGPROG },
- { nvc0_validate_sprite_coords, NVC0_NEW_RASTERIZER | 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 },
@@ -445,11 +463,9 @@ boolean
nvc0_state_validate(struct nvc0_context *nvc0)
{
unsigned i;
-#if 0
- if (nvc0->screen->cur_ctx != nvc0) /* FIXME: not everything is valid */
- nvc0->dirty = 0xffffffff;
-#endif
- nvc0->screen->cur_ctx = nvc0;
+
+ if (nvc0->screen->cur_ctx != nvc0)
+ nvc0_switch_pipe_context(nvc0);
if (nvc0->dirty) {
for (i = 0; i < validate_list_len; ++i) {
diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c
index 17fc51b..fc5f45e 100644
--- a/src/gallium/drivers/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nvc0/nvc0_surface.c
@@ -240,7 +240,7 @@ nvc0_resource_copy_region(struct pipe_context *pipe,
struct nvc0_m2mf_rect drect, srect;
unsigned i;
unsigned nx = util_format_get_nblocksx(src->format, src_box->width);
- unsigned ny = util_format_get_nblocksx(src->format, src_box->height);
+ 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,
diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c
index e7e7ce7..6bbcf24 100644
--- a/src/gallium/drivers/nvc0/nvc0_vbo.c
+++ b/src/gallium/drivers/nvc0/nvc0_vbo.c
@@ -51,8 +51,6 @@ nvc0_vertex_state_create(struct pipe_context *pipe,
struct translate_key transkey;
unsigned i;
- assert(num_elements);
-
so = MALLOC(sizeof(*so) +
num_elements * sizeof(struct nvc0_vertex_element));
if (!so)
@@ -265,7 +263,7 @@ nvc0_vertex_arrays_validate(struct nvc0_context *nvc0)
struct nvc0_vertex_element *ve;
unsigned i;
- if (unlikely(vertex->need_conversion)) {
+ if (unlikely(vertex->need_conversion || NVC0_USING_EDGEFLAG(nvc0))) {
nvc0->vbo_fifo = ~0;
nvc0->vbo_user = 0;
} else {
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c
index 6c8934d..2bcb93d 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_context.c
@@ -7,7 +7,7 @@
#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);
@@ -16,12 +16,13 @@ nvfx_flush(struct pipe_context *pipe, unsigned flags,
struct nouveau_grobj *eng3d = screen->eng3d;
/* XXX: we need to actually be intelligent here */
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ /* 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);
BEGIN_RING(chan, eng3d, 0x1fd8, 1);
OUT_RING(chan, 1);
- }
+ }*/
FIRE_RING(chan);
if (fence)
diff --git a/src/gallium/drivers/nvfx/nvfx_miptree.c b/src/gallium/drivers/nvfx/nvfx_miptree.c
index 8c043b8..1be84b9 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_resource.c b/src/gallium/drivers/nvfx/nvfx_resource.c
index c60a7bb..42e77c5 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 15db574..8742f60 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -203,7 +203,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);
diff --git a/src/gallium/drivers/nvfx/nvfx_state_emit.c b/src/gallium/drivers/nvfx/nvfx_state_emit.c
index 40ae4f5..ae9c314 100644
--- a/src/gallium/drivers/nvfx/nvfx_state_emit.c
+++ b/src/gallium/drivers/nvfx/nvfx_state_emit.c
@@ -426,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/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 6391ea7..37b635f 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -263,7 +263,7 @@ static void r300_clear(struct pipe_context* pipe,
/* 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. */
@@ -447,11 +447,11 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
!pipe->screen->is_format_supported(pipe->screen,
src->format, src->target,
src->nr_samples,
- PIPE_BIND_SAMPLER_VIEW, 0) ||
+ PIPE_BIND_SAMPLER_VIEW) ||
!pipe->screen->is_format_supported(pipe->screen,
dst->format, dst->target,
dst->nr_samples,
- PIPE_BIND_RENDER_TARGET, 0))) {
+ PIPE_BIND_RENDER_TARGET))) {
switch (util_format_get_blocksize(old_dst.format)) {
case 1:
new_dst.format = PIPE_FORMAT_I8_UNORM;
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index b8db6fb..720d666 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -78,10 +78,8 @@ 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);
/* If there are any queries pending or not destroyed, remove them now. */
@@ -141,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) \
@@ -455,7 +453,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300_init_render_functions(r300);
r300_init_states(&r300->context);
- rws->cs_set_flush(r300->cs, r300_flush_cb, r300);
+ 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
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 58e1094..e395f41 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -65,7 +65,10 @@ 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];
};
@@ -610,6 +613,8 @@ struct r300_context {
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) \
@@ -663,8 +668,6 @@ static INLINE void r300_mark_atom_dirty(struct r300_context *r300,
struct pipe_context* r300_create_context(struct pipe_screen* screen,
void *priv);
-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);
@@ -679,6 +682,11 @@ 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);
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index e3945b7..e17a907 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -45,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);
}
@@ -794,7 +797,8 @@ void r300_emit_textures_state(struct r300_context *r300,
END_CS;
}
-void r300_emit_vertex_arrays(struct r300_context* r300, int offset, boolean indexed)
+void r300_emit_vertex_arrays(struct r300_context* r300, int offset,
+ boolean indexed, int instance_id)
{
struct pipe_vertex_buffer *vbuf = r300->vbuf_mgr->vertex_buffer;
struct pipe_resource **valid_vbuf = r300->vbuf_mgr->real_vertex_buffer;
@@ -804,39 +808,92 @@ void r300_emit_vertex_arrays(struct r300_context* r300, int offset, boolean inde
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;
- unsigned size1, size2;
+ unsigned *hw_format_size = r300->velems->format_size;
+ unsigned size1, size2, offset1, offset2, stride1, stride2;
CS_LOCALS(r300);
BEGIN_CS(2 + packet_size + vertex_array_count * 2);
OUT_CS_PKT3(R300_PACKET3_3D_LOAD_VBPNTR, packet_size);
OUT_CS(vertex_array_count | (!indexed ? R300_VC_FORCE_PREFETCH : 0));
- hw_format_size = r300->velems->format_size;
+ 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];
+ size2 = hw_format_size[i+1];
+
+ OUT_CS(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(vb1->stride) |
+ R300_VBPNTR_SIZE1(size2) | R300_VBPNTR_STRIDE1(vb2->stride));
+ OUT_CS(vb1->buffer_offset + velem[i].src_offset + offset * vb1->stride);
+ OUT_CS(vb2->buffer_offset + velem[i+1].src_offset + offset * vb2->stride);
+ }
- 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 (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) |
- R300_VBPNTR_SIZE1(size2) | R300_VBPNTR_STRIDE1(vb2->stride));
- OUT_CS(vb1->buffer_offset + velem[i].src_offset + offset * vb1->stride);
- OUT_CS(vb2->buffer_offset + velem[i+1].src_offset + offset * vb2->stride);
- }
+ OUT_CS(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(vb1->stride));
+ OUT_CS(vb1->buffer_offset + velem[i].src_offset + offset * vb1->stride);
+ }
- if (vertex_array_count & 1) {
- vb1 = &vbuf[velem[i].vertex_buffer_index];
- size1 = hw_format_size[i];
+ 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(vb1->stride));
- OUT_CS(vb1->buffer_offset + velem[i].src_offset + offset * vb1->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;
+ }
- for (i = 0; i < vertex_array_count; i++) {
- buf = r300_resource(valid_vbuf[velem[i].vertex_buffer_index]);
- OUT_CS_RELOC(buf);
+ 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;
}
@@ -1164,7 +1221,7 @@ validate:
if (flushed)
return FALSE;
- r300->context.flush(&r300->context, 0, NULL);
+ r300_flush(&r300->context, R300_FLUSH_ASYNC, NULL);
flushed = TRUE;
goto validate;
}
diff --git a/src/gallium/drivers/r300/r300_emit.h b/src/gallium/drivers/r300/r300_emit.h
index acea51d..6c1c9d2 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_vertex_arrays(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);
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index 9c41a13..b3d0d34 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -31,9 +31,10 @@
#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_atom *atom;
@@ -61,7 +62,7 @@ static void r300_flush(struct pipe_context* pipe,
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. */
@@ -83,20 +84,22 @@ static void r300_flush(struct pipe_context* pipe,
* 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);
+ 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);
+ r300->rws->cs_flush(r300->cs, flags);
}
}
+}
- if (flags & PIPE_FLUSH_FRAME) {
- r300->rws->cs_sync_flush(r300->cs);
- }
+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 cec7473..4c502fe 100644
--- a/src/gallium/drivers/r300/r300_fs.c
+++ b/src/gallium/drivers/r300/r300_fs.c
@@ -149,6 +149,8 @@ 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];
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 0ec4a22..26594da 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -177,7 +177,7 @@ 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_vertex_arrays? */
PREP_EMIT_AOS_SWTCL = (1 << 3), /* call emit_vertex_arrays_swtcl? */
@@ -193,11 +193,11 @@ 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 first_draw = flags & PREP_EMIT_STATES;
boolean emit_vertex_arrays = flags & PREP_EMIT_AOS;
boolean emit_vertex_arrays_swtcl = flags & PREP_EMIT_AOS_SWTCL;
@@ -219,7 +219,7 @@ static boolean r300_reserve_cs_dwords(struct r300_context *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;
}
@@ -233,15 +233,16 @@ static boolean r300_reserve_cs_dwords(struct r300_context *r300,
* \param index_buffer The index buffer to validate. The parameter may be NULL.
* \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 buffer_offset,
- int index_bias)
+ int index_bias, int instance_id)
{
- boolean first_draw = flags & PREP_FIRST_DRAW;
+ 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;
@@ -267,12 +268,14 @@ static boolean r300_emit_states(struct r300_context *r300,
if (emit_vertex_arrays &&
(r300->vertex_arrays_dirty ||
r300->vertex_arrays_indexed != indexed ||
- r300->vertex_arrays_offset != buffer_offset)) {
- r300_emit_vertex_arrays(r300, buffer_offset, 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_vertex_arrays_swtcl)
@@ -291,6 +294,7 @@ static boolean r300_emit_states(struct r300_context *r300,
* \param cs_dwords The number of dwords to reserve in CS.
* \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,
@@ -298,13 +302,15 @@ static boolean r300_prepare_for_rendering(struct r300_context *r300,
struct pipe_resource *index_buffer,
unsigned cs_dwords,
int buffer_offset,
- int index_bias)
+ 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, buffer_offset,
- index_bias);
+ index_bias, instance_id);
}
static boolean immd_is_good_idea(struct r300_context *r300,
@@ -352,8 +358,7 @@ static boolean immd_is_good_idea(struct r300_context *r300,
****************************************************************************/
static void r300_draw_arrays_immediate(struct r300_context *r300,
- unsigned mode, unsigned start,
- unsigned count)
+ const struct pipe_draw_info *info)
{
struct pipe_vertex_element* velem;
struct pipe_vertex_buffer* vbuf;
@@ -364,7 +369,7 @@ static void r300_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 = 4 + count * vertex_size;
+ unsigned dwords = 4 + info->count * vertex_size;
/* Size of the vertex element, in dwords. */
unsigned size[PIPE_MAX_ATTRIBS];
@@ -379,7 +384,7 @@ static void r300_draw_arrays_immediate(struct r300_context *r300,
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. */
@@ -395,21 +400,21 @@ static void r300_draw_arrays_immediate(struct r300_context *r300,
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] * start;
+ map[vbi] += (vbuf->buffer_offset / 4) + stride[i] * info->start;
}
mapelem[i] = map[vbi] + (velem->src_offset / 4);
}
- r300_emit_draw_init(r300, mode, 0, count-1);
+ r300_emit_draw_init(r300, info->mode, 0, info->count-1);
BEGIN_CS(dwords);
OUT_CS_REG(R300_VAP_VTX_SIZE, vertex_size);
- 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]);
}
@@ -456,8 +461,8 @@ 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,
@@ -467,16 +472,16 @@ static void r300_emit_draw_elements(struct r300_context *r300,
boolean alt_num_verts = count > 65535;
CS_LOCALS(r300);
- if (count >= (1 << 24) || maxIndex >= (1 << 24)) {
+ if (count >= (1 << 24) || max_index >= (1 << 24)) {
fprintf(stderr, "r300: Got a huge number of vertices: %i, "
- "refusing to render (maxIndex: %i).\n", count, maxIndex);
+ "refusing to render (max_index: %i).\n", count, max_index);
return;
}
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, minIndex, maxIndex);
+ 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
@@ -527,24 +532,23 @@ static void r300_emit_draw_elements(struct r300_context *r300,
}
static void r300_draw_elements_immediate(struct r300_context *r300,
- int indexBias, unsigned minIndex,
- unsigned maxIndex, unsigned mode,
- unsigned start, unsigned count)
+ 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 ? count : (count + 1) / 2;
+ 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_FIRST_DRAW | PREP_VALIDATE_VBOS | PREP_EMIT_AOS |
- PREP_INDEXED, NULL, 2+count_dwords, 0, indexBias))
+ 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, mode, minIndex, maxIndex);
+ 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);
@@ -552,42 +556,42 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
switch (index_size) {
case 1:
ptr1 = r300_resource(r300->index_buffer.buffer)->b.user_ptr;
- ptr1 += start;
+ ptr1 += info->start;
- OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
- r300_translate_primitive(mode));
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
+ r300_translate_primitive(info->mode));
- if (indexBias && !r300->screen->caps.is_r500) {
- for (i = 0; i < count-1; i += 2)
- OUT_CS(((ptr1[i+1] + indexBias) << 16) |
- (ptr1[i] + indexBias));
+ 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 (count & 1)
- OUT_CS(ptr1[i] + indexBias);
+ if (info->count & 1)
+ OUT_CS(ptr1[i] + info->index_bias);
} else {
- for (i = 0; i < count-1; i += 2)
+ for (i = 0; i < info->count-1; i += 2)
OUT_CS(((ptr1[i+1]) << 16) |
(ptr1[i] ));
- if (count & 1)
+ if (info->count & 1)
OUT_CS(ptr1[i]);
}
break;
case 2:
ptr2 = (uint16_t*)r300_resource(r300->index_buffer.buffer)->b.user_ptr;
- ptr2 += start;
+ ptr2 += info->start;
- OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
- r300_translate_primitive(mode));
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
+ r300_translate_primitive(info->mode));
- if (indexBias && !r300->screen->caps.is_r500) {
- for (i = 0; i < count-1; i += 2)
- OUT_CS(((ptr2[i+1] + indexBias) << 16) |
- (ptr2[i] + indexBias));
+ 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 (count & 1)
- OUT_CS(ptr2[i] + indexBias);
+ if (info->count & 1)
+ OUT_CS(ptr2[i] + info->index_bias);
} else {
OUT_CS_TABLE(ptr2, count_dwords);
}
@@ -595,15 +599,15 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
case 4:
ptr4 = (uint32_t*)r300_resource(r300->index_buffer.buffer)->b.user_ptr;
- ptr4 += start;
+ ptr4 += info->start;
- OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) |
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
R300_VAP_VF_CNTL__INDEX_SIZE_32bit |
- r300_translate_primitive(mode));
+ r300_translate_primitive(info->mode));
- if (indexBias && !r300->screen->caps.is_r500) {
- for (i = 0; i < count; i++)
- OUT_CS(ptr4[i] + indexBias);
+ 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);
}
@@ -612,21 +616,23 @@ static void r300_draw_elements_immediate(struct r300_context *r300,
END_CS;
}
-static void r300_draw_elements(struct r300_context *r300, 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 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;
unsigned short_count;
int buffer_offset = 0, index_offset = 0; /* for index bias emulation */
uint16_t indices3[3];
- if (indexBias && !r300->screen->caps.is_r500) {
- 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,
@@ -641,7 +647,7 @@ static void r300_draw_elements(struct r300_context *r300, int indexBias,
PIPE_TRANSFER_READ |
PIPE_TRANSFER_UNSYNCHRONIZED);
- if (mode == PIPE_PRIM_TRIANGLES) {
+ if (info->mode == PIPE_PRIM_TRIANGLES) {
memcpy(indices3, ptr + start, 6);
} else {
/* Copy the mapped index buffer directly to the upload buffer.
@@ -660,13 +666,15 @@ static void r300_draw_elements(struct r300_context *r300, int indexBias,
/* 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, 19, 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, indices3);
+ r300_emit_draw_elements(r300, indexBuffer, indexSize, info->min_index,
+ info->max_index, info->mode, start, count,
+ indices3);
} else {
do {
if (indexSize == 2 && (start & 1))
@@ -675,8 +683,8 @@ static void r300_draw_elements(struct r300_context *r300, int indexBias,
short_count = MIN2(count, 65534);
r300_emit_draw_elements(r300, indexBuffer, indexSize,
- minIndex, maxIndex,
- mode, start, short_count, indices3);
+ info->min_index, info->max_index,
+ info->mode, start, short_count, indices3);
start += short_count;
count -= short_count;
@@ -685,7 +693,8 @@ static void r300_draw_elements(struct r300_context *r300, int indexBias,
if (count) {
if (!r300_prepare_for_rendering(r300,
PREP_VALIDATE_VBOS | PREP_EMIT_AOS | PREP_INDEXED,
- indexBuffer, 19, buffer_offset, indexBias))
+ indexBuffer, 19, buffer_offset, info->index_bias,
+ instance_id))
goto done;
}
} while (count);
@@ -697,25 +706,28 @@ done:
}
}
-static void r300_draw_arrays(struct r300_context *r300, unsigned mode,
- unsigned start, unsigned count)
+static void r300_draw_arrays(struct r300_context *r300,
+ const struct pipe_draw_info *info,
+ int instance_id)
{
boolean alt_num_verts = r300->screen->caps.is_r500 &&
- count > 65536;
+ info->count > 65536;
+ unsigned start = info->start;
+ unsigned count = info->count;
unsigned short_count;
/* 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))
+ PREP_EMIT_STATES | PREP_VALIDATE_VBOS | PREP_EMIT_AOS,
+ NULL, 9, start, 0, instance_id))
return;
if (alt_num_verts || count <= 65535) {
- r300_emit_draw_arrays(r300, mode, count);
+ r300_emit_draw_arrays(r300, info->mode, count);
} else {
do {
short_count = MIN2(count, 65535);
- r300_emit_draw_arrays(r300, mode, short_count);
+ r300_emit_draw_arrays(r300, info->mode, short_count);
start += short_count;
count -= short_count;
@@ -724,53 +736,78 @@ static void r300_draw_arrays(struct r300_context *r300, unsigned mode,
if (count) {
if (!r300_prepare_for_rendering(r300,
PREP_VALIDATE_VBOS | PREP_EMIT_AOS, NULL, 9,
- start, 0))
+ 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;
+ struct pipe_draw_info info = *dinfo;
boolean buffers_updated, uploader_flushed;
- boolean indexed = info->indexed && r300->index_buffer.buffer;
- unsigned start_indexed = info->start + r300->index_buffer.offset;
- int max_index = MIN2(r300->vbuf_mgr->max_index, info->max_index);
+
+ info.indexed = info.indexed && r300->index_buffer.buffer;
if (r300->skip_rendering ||
- !u_trim_pipe_prim(info->mode, &count)) {
+ !u_trim_pipe_prim(info.mode, &info.count)) {
return;
}
r300_update_derived_state(r300);
/* Start the vbuf manager and update buffers if needed. */
- u_vbuf_mgr_draw_begin(r300->vbuf_mgr, info,
+ u_vbuf_mgr_draw_begin(r300->vbuf_mgr, &info,
&buffers_updated, &uploader_flushed);
if (buffers_updated) {
r300->vertex_arrays_dirty = TRUE;
}
/* Draw. */
- if (indexed) {
- if (count <= 8 &&
- r300_resource(r300->index_buffer.buffer)->b.user_ptr) {
- r300_draw_elements_immediate(r300, info->index_bias,
- info->min_index, max_index,
- info->mode, start_indexed, count);
+ 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(r300, info->index_bias, info->min_index,
- max_index, info->mode, start_indexed, count);
+ r300_draw_elements_instanced(r300, &info);
}
} else {
- if (immd_is_good_idea(r300, count)) {
- r300_draw_arrays_immediate(r300, 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(r300, info->mode, info->start, count);
+ r300_draw_arrays_instanced(r300, &info);
}
}
@@ -805,7 +842,7 @@ 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);
@@ -987,13 +1024,13 @@ 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, dwords, 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;
}
@@ -1027,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;
}
@@ -1070,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);
@@ -1174,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");
diff --git a/src/gallium/drivers/r300/r300_resource.c b/src/gallium/drivers/r300/r300_resource.c
index f3d8c5b..6593474 100644
--- a/src/gallium/drivers/r300/r300_resource.c
+++ b/src/gallium/drivers/r300/r300_resource.c
@@ -38,13 +38,6 @@ r300_resource_create(struct pipe_screen *screen,
}
-static unsigned r300_resource_is_referenced_by_cs(struct pipe_context *context,
- struct pipe_resource *buf,
- unsigned level, int layer)
-{
- return r300_buffer_is_referenced(context, buf);
-}
-
void r300_init_resource_functions(struct r300_context *r300)
{
r300->context.get_transfer = u_get_transfer_vtbl;
@@ -53,7 +46,6 @@ void r300_init_resource_functions(struct r300_context *r300)
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 = r300_resource_is_referenced_by_cs;
r300->context.create_surface = r300_create_surface;
r300->context.surface_destroy = r300_surface_destroy;
}
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 52d0247..8a69628 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"
@@ -112,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;
@@ -124,12 +126,15 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_DEPTH_CLAMP:
case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
case PIPE_CAP_SHADER_STENCIL_EXPORT:
- case PIPE_CAP_STREAM_OUTPUT:
- case PIPE_CAP_PRIMITIVE_RESTART:
- case PIPE_CAP_INSTANCED_DRAWING:
case PIPE_CAP_ARRAY_TEXTURES:
return 0;
+ /* SWTCL-only features. */
+ case PIPE_CAP_STREAM_OUTPUT:
+ case PIPE_CAP_PRIMITIVE_RESTART:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ return !r300screen->caps.has_tcl;
+
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
case PIPE_CAP_MAX_COMBINED_SAMPLERS:
@@ -301,8 +306,7 @@ 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;
@@ -314,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 ||
@@ -414,25 +422,40 @@ static void r300_fence_reference(struct pipe_screen *screen,
(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_winsys_screen *rws = r300_screen(screen)->rws;
struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence;
- return !rws->buffer_is_busy(rfence) ? 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_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();
+
+ /* 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 0; /* 0 == success */
+ return TRUE;
}
struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws)
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 1045911..986ae38 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -33,21 +33,6 @@
#include "r300_screen_buffer.h"
#include "r300_winsys.h"
-unsigned r300_buffer_is_referenced(struct pipe_context *context,
- struct pipe_resource *buf)
-{
- struct r300_context *r300 = r300_context(context);
- struct r300_resource *rbuf = r300_resource(buf);
-
- if (rbuf->b.user_ptr || rbuf->constant_buffer)
- return PIPE_UNREFERENCED;
-
- if (r300->rws->cs_is_buffer_referenced(r300->cs, rbuf->cs_buf))
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-
- return PIPE_UNREFERENCED;
-}
-
void r300_upload_index_buffer(struct r300_context *r300,
struct pipe_resource **index_buffer,
unsigned index_size, unsigned *start,
@@ -181,7 +166,6 @@ static const struct u_resource_vtbl r300_buffer_vtbl =
{
NULL, /* get_handle */
r300_buffer_destroy, /* resource_destroy */
- NULL, /* is_buffer_referenced */
r300_buffer_get_transfer, /* get_transfer */
r300_buffer_transfer_destroy, /* transfer_destroy */
r300_buffer_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.h b/src/gallium/drivers/r300/r300_screen_buffer.h
index 14bee46..cdbc442 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.h
+++ b/src/gallium/drivers/r300/r300_screen_buffer.h
@@ -49,9 +49,6 @@ struct pipe_resource *r300_user_buffer_create(struct pipe_screen *screen,
void *ptr, unsigned size,
unsigned bind);
-unsigned r300_buffer_is_referenced(struct pipe_context *context,
- struct pipe_resource *buf);
-
/* Inline functions. */
static INLINE struct r300_buffer *r300_buffer(struct pipe_resource *buffer)
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 2b0c875..ecb4fc6 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -188,13 +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 */
- boolean clamp = TRUE;
CB_LOCALS;
+ blend->state = *state;
+
if (state->rt[0].blend_enable)
{
unsigned eqRGB = state->rt[0].rgb_func;
@@ -207,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, clamp) |
+ 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.
*
@@ -232,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
@@ -269,8 +277,7 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
*
* Equations other than ADD are rarely used and therefore won't be
* optimized. */
- if (clamp &&
- (eqRGB == PIPE_BLEND_ADD || eqRGB == PIPE_BLEND_REVERSE_SUBTRACT) &&
+ if ((eqRGB == PIPE_BLEND_ADD || eqRGB == PIPE_BLEND_REVERSE_SUBTRACT) &&
(eqA == PIPE_BLEND_ADD || eqA == PIPE_BLEND_REVERSE_SUBTRACT)) {
/* ADD: X+Y
* REVERSE_SUBTRACT: Y-X
@@ -308,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, clamp) |
+ 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);
}
}
@@ -348,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);
@@ -357,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);
@@ -377,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. */
@@ -836,10 +861,9 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
}
}
- /* 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);
- }
+ /* 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);
@@ -1593,12 +1617,6 @@ 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. */
@@ -1649,9 +1667,12 @@ 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)
return NULL;
@@ -1849,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;
@@ -1904,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 a1e116f..ec00e25 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -644,16 +644,20 @@ static uint32_t r300_get_border_color(enum pipe_format format,
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:
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 86ad0b8..c650fb7 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -174,9 +174,11 @@ uint32_t r300_translate_texformat(enum pipe_format format,
if (util_format_is_compressed(format) &&
dxtc_swizzle &&
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) {
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
- dxtc_swizzle);
+ TRUE);
} else {
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
FALSE);
@@ -209,13 +211,19 @@ uint32_t r300_translate_texformat(enum pipe_format format,
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. */
}
@@ -363,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;
@@ -742,7 +752,6 @@ static const struct u_resource_vtbl r300_texture_vtbl =
{
NULL, /* get_handle */
r300_texture_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
r300_texture_get_transfer, /* get_transfer */
r300_texture_transfer_destroy, /* transfer_destroy */
r300_texture_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c
index 3846fb8..2910666 100644
--- a/src/gallium/drivers/r300/r300_texture_desc.c
+++ b/src/gallium/drivers/r300/r300_texture_desc.c
@@ -315,7 +315,7 @@ static unsigned r300_pixels_to_dwords(unsigned stride,
unsigned height,
unsigned xblock, unsigned yblock)
{
- return (align(stride, xblock) * align(height, yblock)) / (xblock * yblock);
+ return (util_align_npot(stride, xblock) * align(height, yblock)) / (xblock * yblock);
}
static void r300_setup_hyperz_properties(struct r300_screen *screen,
@@ -390,7 +390,7 @@ static void r300_setup_hyperz_properties(struct r300_screen *screen,
tex->tex.zcomp8x8[i] = zcompsize == 8;
tex->tex.zmask_stride_in_pixels[i] =
- align(stride, zmask_blocks_x_per_dw[pipes-1] * zcompsize);
+ util_align_npot(stride, zmask_blocks_x_per_dw[pipes-1] * zcompsize);
} else {
tex->tex.zmask_dwords[i] = 0;
tex->tex.zcomp8x8[i] = FALSE;
@@ -398,7 +398,7 @@ static void r300_setup_hyperz_properties(struct r300_screen *screen,
}
/* Now setup HIZ. */
- stride = align(stride, hiz_align_x[pipes-1]);
+ 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. */
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index 30de9ec..65c5095 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -72,7 +72,8 @@ static void r300_copy_into_tiled_texture(struct pipe_context *ctx,
transfer->box.x, transfer->box.y, transfer->box.z,
&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*
@@ -100,7 +101,8 @@ r300_texture_get_transfer(struct pipe_context *ctx,
}
blittable = desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ||
- desc->layout == UTIL_FORMAT_LAYOUT_S3TC;
+ desc->layout == UTIL_FORMAT_LAYOUT_S3TC ||
+ desc->layout == UTIL_FORMAT_LAYOUT_RGTC;
trans = CALLOC_STRUCT(r300_transfer);
if (trans) {
@@ -151,7 +153,7 @@ r300_texture_get_transfer(struct pipe_context *ctx,
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_resource(
ctx->screen->resource_create(ctx->screen,
@@ -175,13 +177,7 @@ r300_texture_get_transfer(struct pipe_context *ctx,
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->tex.stride_in_bytes[0];
@@ -191,7 +187,7 @@ 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;
}
@@ -201,8 +197,9 @@ r300_texture_get_transfer(struct pipe_context *ctx,
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;
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index c0b6689..3a6798a 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -35,6 +35,7 @@
#include "pipe/p_state.h"
#define R300_MAX_CMDBUF_DWORDS (16 * 1024)
+#define R300_FLUSH_ASYNC (1 << 0)
struct winsys_handle;
struct r300_winsys_screen;
@@ -265,15 +266,9 @@ struct r300_winsys_screen {
* 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);
-
- /**
- * Wait until the last flush is completed.
- *
- * \param cs A command stream.
- */
- void (*cs_sync_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
@@ -284,7 +279,7 @@ 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);
/**
diff --git a/src/gallium/drivers/r600/eg_asm.c b/src/gallium/drivers/r600/eg_asm.c
index 8cb417f..20a319a 100644
--- a/src/gallium/drivers/r600/eg_asm.c
+++ b/src/gallium/drivers/r600/eg_asm.c
@@ -97,15 +97,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)
-{
- 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);
-}
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 4206b4a..7743266 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -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);
@@ -1329,7 +1328,7 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_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;
@@ -1337,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 */
@@ -1358,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;
@@ -1442,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);
@@ -1501,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;
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 996d9f7..45e6149 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -483,7 +483,9 @@ static int is_alu_mova_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
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);
+ 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);
}
/* alu instructions that can only execute on the trans unit */
@@ -525,8 +527,9 @@ static int is_alu_trans_unit_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
case CHIPREV_EVERGREEN:
default:
if (!alu->is_op3)
- /* Note that FLT_TO_INT* instructions are vector instructions
- * on Evergreen, despite what the documentation says. */
+ /* 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 ||
@@ -1314,6 +1317,24 @@ static void r600_bc_remove_alu(struct r600_bc_cf *cf, struct r600_bc_alu *alu)
cf->ndw -= 2;
}
+static unsigned r600_bc_num_tex_and_vtx_instructions(const struct r600_bc *bc)
+{
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ return 8;
+
+ case CHIPREV_R700:
+ return 16;
+
+ case CHIPREV_EVERGREEN:
+ return 64;
+
+ default:
+ R600_ERR("Unknown chiprev %d.\n", bc->chiprev);
+ return 8;
+ }
+}
+
int r600_bc_add_vtx(struct r600_bc *bc, const struct r600_bc_vtx *vtx)
{
struct r600_bc_vtx *nvtx = r600_bc_vtx();
@@ -1339,7 +1360,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->cf_last->ndw / 4) > 7)
+ if ((bc->cf_last->ndw / 4) >= r600_bc_num_tex_and_vtx_instructions(bc))
bc->force_add_cf = 1;
return 0;
}
@@ -1386,7 +1407,7 @@ int r600_bc_add_tex(struct r600_bc *bc, const struct r600_bc_tex *tex)
/* each texture fetch use 4 dwords */
bc->cf_last->ndw += 4;
bc->ndw += 4;
- if ((bc->cf_last->ndw / 4) > 7)
+ if ((bc->cf_last->ndw / 4) >= r600_bc_num_tex_and_vtx_instructions(bc))
bc->force_add_cf = 1;
return 0;
}
@@ -1406,31 +1427,7 @@ 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) |
@@ -1523,6 +1520,14 @@ static int r600_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsign
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);
+}
+
enum cf_class
{
CF_CLASS_ALU,
@@ -1596,11 +1601,10 @@ static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
break;
case CF_CLASS_TEXTURE:
case CF_CLASS_VERTEX:
- 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(cf->barrier) |
- S_SQ_CF_WORD1_COUNT((cf->ndw / 4) - 1) |
- S_SQ_CF_WORD1_END_OF_PROGRAM(end_of_program);
+ 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 CF_CLASS_EXPORT:
bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) |
@@ -2801,22 +2805,6 @@ void r600_bc_dump(struct r600_bc *bc)
fprintf(stderr, "--------------------------------------\n");
}
-static void r600_cf_vtx(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);
-}
-
static void r600_vertex_data_type(enum pipe_format pformat, unsigned *format,
unsigned *num_format, unsigned *format_comp)
{
@@ -2987,7 +2975,7 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
alu.src[0].chan = 3;
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
- alu.src[1].value = (1l << 32) / elements[i].instance_divisor + 1;
+ alu.src[1].value = (1ll << 32) / elements[i].instance_divisor + 1;
alu.dst.sel = i + 1;
alu.dst.chan = 3;
@@ -3075,9 +3063,9 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
r600_bc_clear(&bc);
if (rctx->family >= CHIP_CEDAR)
- eg_cf_vtx(ve);
+ evergreen_fetch_shader(ve);
else
- r600_cf_vtx(ve);
+ 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 dbd1e20..db8d0a4 100644
--- a/src/gallium/drivers/r600/r600_asm.h
+++ b/src/gallium/drivers/r600/r600_asm.h
@@ -188,7 +188,6 @@ 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);
/* r600_asm.c */
int r600_bc_init(struct r600_bc *bc, enum radeon_family family);
@@ -206,6 +205,7 @@ void r600_bc_dump(struct r600_bc *bc);
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_buffer.c b/src/gallium/drivers/r600/r600_buffer.c
index 2363cd1..6ced719 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -52,14 +52,6 @@ static void r600_buffer_destroy(struct pipe_screen *screen,
util_slab_free(&rscreen->pool_buffers, rbuffer);
}
-static unsigned r600_buffer_is_referenced_by_cs(struct pipe_context *context,
- struct pipe_resource *buf,
- unsigned level, int layer)
-{
- /* FIXME */
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
static struct pipe_transfer *r600_get_transfer(struct pipe_context *ctx,
struct pipe_resource *resource,
unsigned level,
@@ -160,7 +152,6 @@ static const struct u_resource_vtbl r600_buffer_vtbl =
{
u_default_resource_get_handle, /* get_handle */
r600_buffer_destroy, /* resource_destroy */
- r600_buffer_is_referenced_by_cs, /* is_buffer_referenced */
r600_get_transfer, /* get_transfer */
r600_transfer_destroy, /* transfer_destroy */
r600_buffer_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 651f994..4a30edd 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -49,7 +49,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;
@@ -281,18 +281,28 @@ 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_INSTANCED_DRAWING:
+ 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_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 */
@@ -394,7 +404,7 @@ 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 R600_MAX_CONST_BUFFERS;
case PIPE_SHADER_CAP_MAX_PREDS:
@@ -417,8 +427,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) {
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 5f701d8..396801e 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -38,6 +38,7 @@
#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,
@@ -175,6 +176,7 @@ void evergreen_init_state_functions(struct r600_pipe_context *rctx);
void evergreen_init_config(struct r600_pipe_context *rctx);
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_pipe_set_buffer_resource(struct r600_pipe_context *rctx,
@@ -214,6 +216,9 @@ int r600_find_vs_semantic_index(struct r600_shader *vs,
void r600_init_state_functions(struct r600_pipe_context *rctx);
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_pipe_set_buffer_resource(struct r600_pipe_context *rctx,
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index 343403f..181ea3f 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -62,7 +62,7 @@ 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);
}
diff --git a/src/gallium/drivers/r600/r600_resource.c b/src/gallium/drivers/r600/r600_resource.c
index 207642c..f3ab361 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_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 0b4dc75..12786da 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -34,55 +34,6 @@
#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)
{
@@ -97,104 +48,6 @@ 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->fs_write_all) {
- r600_pipe_state_add_reg(rstate, R_028808_CB_COLOR_CONTROL,
- S_028808_MULTIWRITE_ENABLE(1),
- S_028808_MULTIWRITE_ENABLE(1),
- 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);
-}
-
static int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *shader)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
@@ -1706,37 +1559,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;
- }
- r600_bc_src(&alu.src[0], &ctx->src[0], src_chan);
- r600_bc_src(&alu.src[1], &ctx->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)
@@ -2011,6 +1842,8 @@ static int tgsi_cmp(struct r600_shader_ctx *ctx)
static int tgsi_xpd(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
+ 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;
@@ -2021,33 +1854,12 @@ static int tgsi_xpd(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_MUL);
-
- switch (i) {
- case 0:
- r600_bc_src(&alu.src[0], &ctx->src[0], 2);
- break;
- case 1:
- r600_bc_src(&alu.src[0], &ctx->src[0], 0);
- break;
- case 2:
- r600_bc_src(&alu.src[0], &ctx->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;
- }
-
- switch (i) {
- case 0:
- r600_bc_src(&alu.src[1], &ctx->src[1], 1);
- break;
- case 1:
- r600_bc_src(&alu.src[1], &ctx->src[1], 2);
- break;
- case 2:
- r600_bc_src(&alu.src[1], &ctx->src[1], 0);
- break;
- case 3:
alu.src[1].sel = V_SQ_ALU_SRC_0;
alu.src[1].chan = i;
}
@@ -2067,32 +1879,12 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD);
- switch (i) {
- case 0:
- r600_bc_src(&alu.src[0], &ctx->src[0], 1);
- break;
- case 1:
- r600_bc_src(&alu.src[0], &ctx->src[0], 2);
- break;
- case 2:
- r600_bc_src(&alu.src[0], &ctx->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;
- }
-
- switch (i) {
- case 0:
- r600_bc_src(&alu.src[1], &ctx->src[1], 2);
- break;
- case 1:
- r600_bc_src(&alu.src[1], &ctx->src[1], 0);
- break;
- case 2:
- r600_bc_src(&alu.src[1], &ctx->src[1], 1);
- break;
- case 3:
alu.src[1].sel = V_SQ_ALU_SRC_0;
alu.src[1].chan = i;
}
@@ -2960,7 +2752,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},
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 1be6417..efb68cb 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -117,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;
@@ -129,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 {
@@ -152,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;
@@ -179,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;
}
@@ -200,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;
@@ -262,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);
@@ -501,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);
}
}
}
@@ -1232,6 +1238,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;
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 16b53a0..d079b57 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -68,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,
@@ -299,14 +299,14 @@ static boolean permit_hardware_blit(struct pipe_screen *screen,
res->format,
res->target,
res->nr_samples,
- bind, 0))
+ bind))
return FALSE;
if (!screen->is_format_supported(screen,
res->format,
res->target,
res->nr_samples,
- PIPE_BIND_SAMPLER_VIEW, 0))
+ PIPE_BIND_SAMPLER_VIEW))
return FALSE;
switch (res->usage) {
@@ -349,19 +349,10 @@ static void r600_texture_destroy(struct pipe_screen *screen,
FREE(rtex);
}
-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;
-}
-
static const 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 */
@@ -423,10 +414,12 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
/* Would like some magic "get_bool_option_once" routine.
*/
if (force_tiling == -1) {
- struct r600_screen *rscreen = (struct r600_screen *)screen;
+#if 0
/* reenable when 2D tiling is fixed better */
- /*if (r600_get_minor_version(rscreen->radeon) >= 9)
- force_tiling = debug_get_bool_option("R600_TILING", TRUE);*/
+ 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);
}
@@ -653,7 +646,7 @@ 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;
}
diff --git a/src/gallium/drivers/r600/r700_asm.c b/src/gallium/drivers/r600/r700_asm.c
index a7f2f54..b3c7d14 100644
--- a/src/gallium/drivers/r600/r700_asm.c
+++ b/src/gallium/drivers/r600/r700_asm.c
@@ -26,6 +26,15 @@
#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)
{
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 4a5d541..6e2d6ba 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,6 +645,9 @@ 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;
@@ -564,6 +670,8 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
pipe->set_framebuffer_state(pipe,
state);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -573,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
@@ -584,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
@@ -595,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
@@ -610,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));
@@ -626,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
@@ -639,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));
@@ -655,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
@@ -668,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++)
@@ -678,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
@@ -694,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
@@ -704,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
@@ -725,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,
@@ -734,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
@@ -746,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
@@ -765,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,
@@ -772,6 +909,7 @@ rbug_clear_render_target(struct pipe_context *_pipe,
dsty,
width,
height);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -788,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,
@@ -797,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 *
@@ -840,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);
@@ -868,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);
@@ -881,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);
}
@@ -900,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);
@@ -915,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 *
@@ -927,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;
}
@@ -944,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);
}
@@ -959,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);
}
@@ -979,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,
@@ -987,6 +1136,7 @@ rbug_context_transfer_inline_write(struct pipe_context *_context,
data,
stride,
layer_stride);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -999,7 +1149,9 @@ static void rbug_redefine_user_buffer(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->redefine_user_buffer(context, resource, offset, size);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -1077,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;
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index eb772d1..b80bcd4 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_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index d635ce5..7c8dfdc 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 70fdfb7..ce22f64 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -148,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)
@@ -163,19 +163,19 @@ 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;
}
}
@@ -183,20 +183,20 @@ softpipe_is_resource_referenced( struct pipe_context *pipe,
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
if (softpipe->fragment_tex_cache[i] &&
softpipe->fragment_tex_cache[i]->texture == texture)
- return PIPE_REFERENCED_FOR_READ;
+ 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;
}
@@ -255,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;
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index c91709a..a572ee8 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -198,4 +198,13 @@ 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 66c5214..7b79a0d 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 6f7addd..720fea8 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,7 +50,7 @@ softpipe_flush( struct pipe_context *pipe,
draw_flush(softpipe->draw);
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ if (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]);
}
@@ -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 22a5cee..ab01c24 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_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 401e317..26f5e1b 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -125,7 +125,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_SHADER_STENCIL_EXPORT:
return 1;
- case PIPE_CAP_INSTANCED_DRAWING:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
case PIPE_CAP_ARRAY_TEXTURES:
return 1;
@@ -181,8 +182,7 @@ 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;
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 8a4ef93..c09ce19 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -1795,6 +1795,7 @@ sample_compare(struct tgsi_sampler *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);
@@ -1804,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;
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c
index 05eab8a..1ed1d5d 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 0e568d7..223ab17 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 f0f875b..4782b4b 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -241,7 +241,8 @@ void svga_context_flush( struct svga_context *svga,
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)
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index d98b9b0..2093bca 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
@@ -73,12 +73,6 @@ retry_draw_range_elements( struct svga_context *svga,
if (ret)
goto retry;
- if (svga->curr.any_user_vertex_buffers) {
- ret = svga_hwtnl_flush( svga->hwtnl );
- if (ret)
- goto retry;
- }
-
return PIPE_OK;
retry:
@@ -122,12 +116,6 @@ retry_draw_arrays( struct svga_context *svga,
if (ret)
goto retry;
- if (svga->curr.any_user_vertex_buffers) {
- ret = svga_hwtnl_flush( svga->hwtnl );
- if (ret)
- goto retry;
- }
-
return 0;
retry:
@@ -161,7 +149,7 @@ svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
/* 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, ~0, NULL);
+ pipe->flush(pipe, NULL);
svga->prev_draw_swtnl = svga->state.sw.need_swtnl;
}
diff --git a/src/gallium/drivers/svga/svga_pipe_flush.c b/src/gallium/drivers/svga/svga_pipe_flush.c
index 9357d82..4578c13 100644
--- a/src/gallium/drivers/svga/svga_pipe_flush.c
+++ b/src/gallium/drivers/svga/svga_pipe_flush.c
@@ -32,7 +32,6 @@
static void svga_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
struct svga_context *svga = svga_context(pipe);
@@ -45,29 +44,27 @@ static void svga_flush( struct pipe_context *pipe,
*/
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) {
- if (flags & PIPE_FLUSH_FRAME) {
- struct pipe_framebuffer_state *fb = &svga->curr.framebuffer;
- static unsigned frame_no = 1;
- char filename[256];
- unsigned i;
+ 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);
- }
+ 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]);
+ }
- ++frame_no;
+ 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_resource.c b/src/gallium/drivers/svga/svga_resource.c
index bed15ec..6e0622a 100644
--- a/src/gallium/drivers/svga/svga_resource.c
+++ b/src/gallium/drivers/svga/svga_resource.c
@@ -33,7 +33,6 @@ 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;
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index e1f07d6..34ab9e1 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -51,53 +51,114 @@ 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)
+/**
+ * Create a buffer transfer.
+ *
+ * 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 struct pipe_transfer *
+svga_buffer_get_transfer(struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box)
{
+ struct svga_context *svga = svga_context(pipe);
struct svga_screen *ss = svga_screen(pipe->screen);
- struct svga_buffer *sbuf = svga_buffer(buf);
+ struct svga_buffer *sbuf = svga_buffer(resource);
+ struct pipe_transfer *transfer;
- /**
- * 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.
- */
+ transfer = CALLOC_STRUCT(pipe_transfer);
+ if (transfer == NULL) {
+ return NULL;
+ }
- if (!sbuf->handle || ss->sws->surface_is_flushed(ss->sws, sbuf->handle))
- return PIPE_UNREFERENCED;
+ transfer->resource = resource;
+ transfer->level = level;
+ transfer->usage = usage;
+ transfer->box = *box;
- /**
- * 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.
- */
+ 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.
+ */
- if (sbuf->b.b.bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
- return PIPE_REFERENCED_FOR_READ;
+ if (sbuf->dma.pending) {
+ svga_buffer_upload_flush(svga, sbuf);
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
+ /*
+ * 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.
+ */
+ 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.
+ */
+
+ FREE(transfer);
+ return NULL;
+ }
+
+ svga_context_flush(svga, NULL);
+ }
+ }
-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;
+ sbuf->dma.flags.unsynchronized = FALSE;
+ }
+ }
if (!sbuf->swbuf && !sbuf->hwbuf) {
if (svga_buffer_create_hw_storage(ss, sbuf) != PIPE_OK) {
@@ -113,86 +174,120 @@ svga_buffer_map_range( struct pipe_screen *screen,
}
sbuf->swbuf = align_malloc(sbuf->b.b.width0, 16);
+ if (!sbuf->swbuf) {
+ FREE(transfer);
+ return NULL;
+ }
}
}
+ return transfer;
+}
+
+
+/**
+ * Map a range of a buffer.
+ */
+static void *
+svga_buffer_transfer_map( struct pipe_context *pipe,
+ struct pipe_transfer *transfer )
+{
+ struct svga_buffer *sbuf = svga_buffer(transfer->resource);
+
+ uint8_t *map;
+
if (sbuf->swbuf) {
/* User/malloc buffer */
map = sbuf->swbuf;
}
else if (sbuf->hwbuf) {
- map = sws->buffer_map(sws, sbuf->hwbuf, usage);
+ struct svga_screen *ss = svga_screen(pipe->screen);
+ struct svga_winsys_screen *sws = ss->sws;
+
+ map = sws->buffer_map(sws, sbuf->hwbuf, transfer->usage);
}
else {
map = NULL;
}
- if(map) {
+ if (map) {
++sbuf->map.count;
-
- if (usage & PIPE_TRANSFER_WRITE) {
- assert(sbuf->map.count <= 1);
- sbuf->map.writing = TRUE;
- if (usage & PIPE_TRANSFER_FLUSH_EXPLICIT)
- sbuf->map.flush_explicit = TRUE;
- }
+ map += transfer->box.x;
}
return map;
}
-
-static void
-svga_buffer_flush_mapped_range( struct pipe_screen *screen,
- struct pipe_resource *buf,
- unsigned offset, unsigned length)
+static void
+svga_buffer_transfer_flush_region( struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box)
{
- struct svga_buffer *sbuf = svga_buffer( buf );
- struct svga_screen *ss = svga_screen(screen);
-
+ struct svga_screen *ss = svga_screen(pipe->screen);
+ struct svga_buffer *sbuf = svga_buffer(transfer->resource);
+
+ unsigned offset = transfer->box.x + box->x;
+ unsigned length = box->width;
+
+ assert(transfer->usage & PIPE_TRANSFER_WRITE);
+ assert(transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT);
+
pipe_mutex_lock(ss->swc_mutex);
- assert(sbuf->map.writing);
- if(sbuf->map.writing) {
- assert(sbuf->map.flush_explicit);
- svga_buffer_add_range(sbuf, offset, offset + length);
- }
+ svga_buffer_add_range(sbuf, offset, offset + length);
pipe_mutex_unlock(ss->swc_mutex);
}
-static void
-svga_buffer_unmap( struct pipe_screen *screen,
- struct pipe_resource *buf)
+
+static void
+svga_buffer_transfer_unmap( struct pipe_context *pipe,
+ struct pipe_transfer *transfer )
{
- 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 );
+ struct svga_buffer *sbuf = svga_buffer(transfer->resource);
pipe_mutex_lock(ss->swc_mutex);
assert(sbuf->map.count);
- if(sbuf->map.count)
+ if (sbuf->map.count) {
--sbuf->map.count;
+ }
- if(sbuf->hwbuf)
+ if (sbuf->hwbuf) {
sws->buffer_unmap(sws, sbuf->hwbuf);
+ }
+
+ if (transfer->usage & PIPE_TRANSFER_WRITE) {
+ if (!(transfer->usage & PIPE_TRANSFER_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.
+ */
- if(sbuf->map.writing) {
- if(!sbuf->map.flush_explicit) {
- /* No mapped range was flushed -- flush the whole buffer */
SVGA_DBG(DEBUG_DMA, "flushing the whole buffer\n");
+ sbuf->dma.flags.discard = TRUE;
+
svga_buffer_add_range(sbuf, 0, sbuf->b.b.width0);
}
-
- sbuf->map.writing = FALSE;
- sbuf->map.flush_explicit = FALSE;
}
pipe_mutex_unlock(ss->swc_mutex);
}
+/**
+ * Destroy transfer
+ */
+static void
+svga_buffer_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ FREE(transfer);
+}
+
static void
svga_buffer_destroy( struct pipe_screen *screen,
@@ -221,62 +316,12 @@ svga_buffer_destroy( struct pipe_screen *screen,
}
-/* Keep the original code more or less intact, implement transfers in
- * terms of the old functions.
- */
-static void *
-svga_buffer_transfer_map( struct pipe_context *pipe,
- struct pipe_transfer *transfer )
-{
- uint8_t *map = svga_buffer_map_range( pipe->screen,
- transfer->resource,
- transfer->box.x,
- transfer->box.width,
- 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 svga_buffer_transfer_flush_region( struct pipe_context *pipe,
- struct pipe_transfer *transfer,
- const struct pipe_box *box)
-{
- assert(box->x + box->width <= transfer->box.width);
-
- svga_buffer_flush_mapped_range(pipe->screen,
- transfer->resource,
- transfer->box.x + box->x,
- box->width);
-}
-
-static void svga_buffer_transfer_unmap( struct pipe_context *pipe,
- struct pipe_transfer *transfer )
-{
- svga_buffer_unmap(pipe->screen,
- transfer->resource);
-}
-
-
-
-
-
-
-
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_get_transfer, /* get_transfer */
+ svga_buffer_transfer_destroy, /* transfer_destroy */
svga_buffer_transfer_map, /* transfer_map */
svga_buffer_transfer_flush_region, /* transfer_flush_region */
svga_buffer_transfer_unmap, /* transfer_unmap */
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h
index c559f70..9503221 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -90,7 +90,9 @@ struct svga_buffer
* Host surface handle.
*
* This is a platform independent abstraction for host SID. We create when
- * trying to bind
+ * trying to bind.
+ *
+ * Only set for non-user buffers.
*/
struct svga_winsys_surface *handle;
@@ -100,24 +102,10 @@ struct svga_buffer
struct {
/**
* Number of concurrent mappings.
- *
- * XXX: It is impossible to guarantee concurrent maps work in all
- * circumstances -- pipe_buffers really need transfer objects too.
*/
unsigned count;
/**
- * Whether this buffer is currently mapped for writing.
- */
- boolean writing;
-
- /**
- * Whether the application will tell us explicity which ranges it touched
- * or not.
- */
- boolean flush_explicit;
-
- /**
* Dirty ranges.
*
* Ranges that were touched by the application and need to be uploaded to
@@ -149,6 +137,8 @@ struct svga_buffer
* A piece of GMR memory, with the same size of the buffer. It is created
* when mapping the buffer, and will be used to upload vertex data to the
* host.
+ *
+ * Only set for non-user buffers.
*/
struct svga_winsys_buffer *hwbuf;
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index b7d5460..e5fcec0 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -131,6 +131,8 @@ enum pipe_error
svga_buffer_create_host_surface(struct svga_screen *ss,
struct svga_buffer *sbuf)
{
+ assert(!sbuf->user);
+
if(!sbuf->handle) {
sbuf->key.flags = 0;
@@ -252,7 +254,7 @@ 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)
{
@@ -260,6 +262,10 @@ svga_buffer_upload_flush(struct svga_context *svga,
unsigned i;
struct pipe_resource *dummy;
+ if (!sbuf->dma.pending) {
+ return;
+ }
+
assert(sbuf->handle);
assert(sbuf->hwbuf);
assert(sbuf->map.num_ranges);
@@ -296,6 +302,8 @@ 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;
@@ -306,7 +314,6 @@ svga_buffer_upload_flush(struct svga_context *svga,
}
-
/**
* Note a dirty range.
*
@@ -337,12 +344,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) {
@@ -357,6 +358,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);
@@ -380,8 +386,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);
@@ -662,6 +667,9 @@ svga_redefine_user_buffer(struct pipe_context *pipe,
struct svga_buffer *sbuf = svga_buffer(resource);
assert(sbuf->user);
+ assert(!sbuf->dma.pending);
+ assert(!sbuf->handle);
+ assert(!sbuf->hwbuf);
/*
* Release any uploaded user buffer.
@@ -674,29 +682,9 @@ svga_redefine_user_buffer(struct pipe_context *pipe,
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;
- }
+ 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 11df306..13d8f3e 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 994f307..b61f859 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
*/
@@ -156,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;
@@ -192,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_context_flush(svga, NULL);
- ret = SVGA3D_SurfaceDMA(svga->swc, st, transfer, &box, 1);
+ ret = SVGA3D_SurfaceDMA(svga->swc, st, transfer, &box, 1, flags);
assert(ret == PIPE_OK);
}
}
@@ -204,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);
@@ -223,7 +200,9 @@ svga_transfer_dma(struct svga_context *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);
@@ -269,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);
@@ -398,8 +384,11 @@ svga_texture_get_transfer(struct pipe_context *pipe,
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;
@@ -458,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)
@@ -481,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 */
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index ef1d309..6c987ab 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -342,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;
@@ -412,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;
}
@@ -498,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 86ec89d..6d8d287 100644
--- a/src/gallium/drivers/svga/svga_screen.h
+++ b/src/gallium/drivers/svga/svga_screen.h
@@ -39,8 +39,6 @@ struct svga_winsys_screen;
struct svga_winsys_context;
struct SVGACmdMemory;
-#define SVGA_COMBINE_USERBUFFERS 1
-
/**
* Subclass of pipe_screen
*/
@@ -49,6 +47,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_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c
index 958d003..7c393a1 100644
--- a/src/gallium/drivers/svga/svga_state_vdecl.c
+++ b/src/gallium/drivers/svga/svga_state_vdecl.c
@@ -78,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;
}
}
@@ -110,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 );
@@ -127,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 );
}
@@ -148,14 +149,10 @@ static int emit_hw_vdecl( struct svga_context *svga,
* userbuffers now and try to combine multiple userbuffers from
* multiple draw calls into a single host buffer for performance.
*/
- if (svga->curr.any_user_vertex_buffers &&
- SVGA_COMBINE_USERBUFFERS)
- {
+ if (svga->curr.any_user_vertex_buffers) {
ret = upload_user_buffers( svga );
if (ret)
return ret;
-
- svga->curr.any_user_vertex_buffers = FALSE;
}
return emit_hw_vs_vdecl( svga, dirty );
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index 5e4bdef..ae61cea 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/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index d24cc62..4db7619 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
@@ -1520,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;
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c
index 51a4ea9..8a4ec20 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 74c5e83..62b4fe4 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_screen.c b/src/gallium/drivers/trace/tr_screen.c
index c2de2da..42180c4 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_context.h b/src/gallium/include/pipe/p_context.h
index 24ee3fe..d8de3ba 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,
@@ -407,6 +390,11 @@ 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 8cf738f..e9d4798 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -337,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
*/
@@ -426,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().
@@ -478,7 +461,8 @@ enum pipe_cap {
PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER,
PIPE_CAP_DEPTH_CLAMP,
PIPE_CAP_SHADER_STENCIL_EXPORT,
- PIPE_CAP_INSTANCED_DRAWING,
+ PIPE_CAP_TGSI_INSTANCEID,
+ PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR,
};
/* Shader caps not specific to any single stage */
@@ -504,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)
enum pipe_video_codec
{
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index e2cc322..f3b1e55 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -218,6 +218,11 @@ enum pipe_format {
PIPE_FORMAT_A16_UNORM = 148,
PIPE_FORMAT_I16_UNORM = 149,
+ 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 2a6acec..0d1b109 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -104,14 +104,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.
@@ -188,21 +186,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_video_context.h b/src/gallium/include/pipe/p_video_context.h
index 73f03d5..2d59741 100644
--- a/src/gallium/include/pipe/p_video_context.h
+++ b/src/gallium/include/pipe/p_video_context.h
@@ -69,8 +69,7 @@ struct pipe_video_context
*/
boolean (*is_format_supported)(struct pipe_video_context *vpipe,
enum pipe_format format,
- unsigned usage,
- unsigned geom);
+ unsigned usage);
void (*destroy)(struct pipe_video_context *vpipe);
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 1c2148b..d4973a1 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/d3d1x/dxgi/src/dxgi_native.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
index 2e45f3f..741a97f 100644
--- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
+++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
@@ -1234,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 542d659..12f2aad 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
+++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
@@ -1823,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 9cfdc83..f678ac7 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/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index fc68ee1..e23c1bc 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -149,7 +149,7 @@ dri_unbind_context(__DRIcontext * cPriv)
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->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
stapi->make_current(stapi, NULL, NULL, NULL);
draw->context = NULL;
read->context = NULL;
@@ -171,7 +171,7 @@ 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;
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 69c2e7e..5931df9 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++;
}
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index a5c94b4..30326a2 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -270,7 +270,7 @@ dri2_allocate_buffer(__DRIscreen *sPriv,
struct pipe_resource templ;
enum st_attachment_type statt;
enum pipe_format pf;
- unsigned bind;
+ unsigned bind = 0;
struct winsys_handle whandle;
switch (attachment) {
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 30088b0..ac11f7c 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/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index e60a560..2c7f3bde 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -368,7 +368,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;
}
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 2068256..f156832 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -528,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) {
@@ -606,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,
@@ -652,8 +650,7 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
/* 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);
}
pipe = ndpy_get_copy_context(gdpy->native);
@@ -667,7 +664,7 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
u_box_origin_2d(ptex->width0, ptex->height0, &src_box);
pipe->resource_copy_region(pipe, ptex, 0, 0, 0, 0,
gsurf->render_texture, 0, &src_box);
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ pipe->flush(pipe, NULL);
nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
pipe_resource_reference(&ptex, NULL);
@@ -686,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);
}
@@ -758,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);
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 4e6d944..dd07af1 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_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
index be6713d..ee18cb2 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.c
+++ b/src/gallium/state_trackers/egl/common/native_helper.c
@@ -333,7 +333,7 @@ resource_surface_throttle(struct resource_surface *rsurf)
struct pipe_fence_handle *fence = swap_fences_pop_front(rsurf);
if (fence) {
- (void) screen->fence_finish(screen, fence, 0);
+ (void) screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
return TRUE;
}
@@ -352,7 +352,7 @@ resource_surface_flush(struct resource_surface *rsurf,
if (!pipe)
return FALSE;
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, &fence);
+ pipe->flush(pipe, &fence);
if (fence == NULL)
return FALSE;
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c
index cdbb304..9863329 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 **
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
index 4a96039..e2fde00 100644
--- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
+++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
@@ -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;
}
diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c
index 3c2475f..5d0045f 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];
}
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index b18c313..5afca67 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -541,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
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 205a7e3..351267b 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 7c47a25..3b35cbc 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 b30050b..17d25ad 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -400,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 cc67da9..61f6b3b 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 *
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 8bc54d7..048cfe8 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -134,24 +134,15 @@ vlVdpCreateSurfaceTarget(vlVdpDecoder *vldecoder, vlVdpSurface *vlsurf)
vctx = vldecoder->vctx->vpipe;
+ if (!vctx->is_format_supported(vctx, tmplt.format, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
+ return VDP_STATUS_RESOURCES;
+
memset(&tmplt, 0, sizeof(struct pipe_resource));
tmplt.target = PIPE_TEXTURE_2D;
tmplt.format = vctx->get_param(vctx,PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT);
tmplt.last_level = 0;
-
- if (vctx->is_format_supported(vctx, tmplt.format,
- PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET,
- PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO)) {
- tmplt.width0 = vlsurf->width;
- tmplt.height0 = vlsurf->height;
- } else {
- assert(vctx->is_format_supported(vctx, tmplt.format,
- PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET,
- PIPE_TEXTURE_GEOM_NON_SQUARE));
- tmplt.width0 = util_next_power_of_two(vlsurf->width);
- tmplt.height0 = util_next_power_of_two(vlsurf->height);
- }
-
+ tmplt.width0 = vlsurf->width;
+ tmplt.height0 = vlsurf->height;
tmplt.depth0 = 1;
tmplt.usage = PIPE_USAGE_DEFAULT;
tmplt.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c
index 74a3bd9..e971b6d 100644
--- a/src/gallium/state_trackers/vdpau/query.c
+++ b/src/gallium/state_trackers/vdpau/query.c
@@ -123,8 +123,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
FormatToPipe(bits_ycbcr_format),
PIPE_TEXTURE_2D,
1,
- PIPE_BIND_RENDER_TARGET,
- PIPE_TEXTURE_GEOM_NON_SQUARE);
+ PIPE_BIND_RENDER_TARGET);
vl_screen_destroy(vlscreen);
diff --git a/src/gallium/state_trackers/vega/api_context.c b/src/gallium/state_trackers/vega/api_context.c
index d6bbda5..19e42dd 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_images.c b/src/gallium/state_trackers/vega/api_images.c
index b993ba6..2cb5622 100644
--- a/src/gallium/state_trackers/vega/api_images.c
+++ b/src/gallium/state_trackers/vega/api_images.c
@@ -356,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);
@@ -387,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,
@@ -421,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);
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 73351b6..4448087 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;
@@ -518,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);
}
@@ -569,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*/);
@@ -595,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 dfd0600..10590e2 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/renderer.c b/src/gallium/state_trackers/vega/renderer.c
index 9de2cb1..5715073 100644
--- a/src/gallium/state_trackers/vega/renderer.c
+++ b/src/gallium/state_trackers/vega/renderer.c
@@ -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);
}
/**
@@ -1463,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/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c
index 83b4260..c2ab564 100644
--- a/src/gallium/state_trackers/vega/vg_context.c
+++ b/src/gallium/state_trackers/vega/vg_context.c
@@ -69,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;
}
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
index 44d2996..eeea686 100644
--- a/src/gallium/state_trackers/vega/vg_manager.c
+++ b/src/gallium/state_trackers/vega/vg_manager.c
@@ -142,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);
}
diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_context.c
index cd4f3c8..5608d4f 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 4ece4e4..e65e71d 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,8 +176,6 @@ 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();
diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c
index 5ede1d4..333f50c 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_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index 17c34b7..6f2c52e 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 33bcacd..19e9bf8 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -334,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);
}
}
@@ -547,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);
@@ -555,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
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 718a345..e7d6a93 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 1f78f60..30b6f0c 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 3b3ae45..6b799af 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -450,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;
@@ -519,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;
diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
index c72ba9e..234574b 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/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index c90ad40..799dac2 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -226,20 +226,14 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
memset(&template, 0, sizeof(struct pipe_resource));
template.target = PIPE_TEXTURE_2D;
template.format = (enum pipe_format)vpipe->get_param(vpipe, PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT);
- template.last_level = 0;
- if (vpipe->is_format_supported(vpipe, template.format,
- PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET,
- PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO)) {
- template.width0 = context->width;
- template.height0 = context->height;
- }
- else {
- assert(vpipe->is_format_supported(vpipe, template.format,
- PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET,
- PIPE_TEXTURE_GEOM_NON_SQUARE));
- template.width0 = util_next_power_of_two(context->width);
- template.height0 = util_next_power_of_two(context->height);
+ if (!vpipe->is_format_supported(vpipe, template.format,
+ PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET)) {
+ FREE(surface_priv);
+ return BadAlloc;
}
+ template.last_level = 0;
+ template.width0 = util_next_power_of_two(context->width);
+ template.height0 = util_next_power_of_two(context->height);
template.depth0 = 1;
template.array_size = 1;
template.usage = PIPE_USAGE_DEFAULT;
diff --git a/src/gallium/targets/graw-gdi/graw_gdi.c b/src/gallium/targets/graw-gdi/graw_gdi.c
index 17ca2a7..99d8641 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/tests/graw/SConscript b/src/gallium/tests/graw/SConscript
index 565fa52..ad44d54 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':
diff --git a/src/gallium/tests/graw/clear.c b/src/gallium/tests/graw/clear.c
index 55cc008..392d150 100644
--- a/src/gallium/tests/graw/clear.c
+++ b/src/gallium/tests/graw/clear.c
@@ -29,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);
diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index ff82b60..fda23bd 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -276,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);
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
index cc05889..ebb26d2 100644
--- a/src/gallium/tests/graw/gs-test.c
+++ b/src/gallium/tests/graw/gs-test.c
@@ -339,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);
diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c
index 3c6458b..6903046 100644
--- a/src/gallium/tests/graw/quad-sample.c
+++ b/src/gallium/tests/graw/quad-sample.c
@@ -150,7 +150,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);
diff --git a/src/gallium/tests/graw/quad-tex.c b/src/gallium/tests/graw/quad-tex.c
index 4e66813..fd01cb3 100644
--- a/src/gallium/tests/graw/quad-tex.c
+++ b/src/gallium/tests/graw/quad-tex.c
@@ -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);
diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c
index a23ca73..004b169 100644
--- a/src/gallium/tests/graw/shader-leak.c
+++ b/src/gallium/tests/graw/shader-leak.c
@@ -149,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);
diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c
index 47b7653..ab0116b 100644
--- a/src/gallium/tests/graw/tri-gs.c
+++ b/src/gallium/tests/graw/tri-gs.c
@@ -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);
}
diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c
index 259b3d9..bed3437 100644
--- a/src/gallium/tests/graw/tri-instanced.c
+++ b/src/gallium/tests/graw/tri-instanced.c
@@ -211,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);
diff --git a/src/gallium/tests/graw/tri.c b/src/gallium/tests/graw/tri.c
index 4266c03..30ead99 100644
--- a/src/gallium/tests/graw/tri.c
+++ b/src/gallium/tests/graw/tri.c
@@ -140,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);
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
index dd64d8b..18e056d 100644
--- a/src/gallium/tests/graw/vs-test.c
+++ b/src/gallium/tests/graw/vs-test.c
@@ -227,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);
diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c
index af93e09..3a64b1c 100644
--- a/src/gallium/tests/trivial/quad-tex.c
+++ b/src/gallium/tests/trivial/quad-tex.c
@@ -335,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 b89cfe0..bfd2f3c 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -264,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
new file mode 100644
index 0000000..49f28c0
--- /dev/null
+++ b/src/gallium/tests/unit/SConscript
@@ -0,0 +1,33 @@
+Import('*')
+
+env = env.Clone()
+
+env.Prepend(LIBS = [gallium])
+
+if env['platform'] in ('freebsd8', 'sunos'):
+ env.Append(LIBS = ['m'])
+
+if env['platform'] == 'freebsd8':
+ env.Append(LIBS = ['pthread'])
+
+progs = [
+ 'pipe_barrier_test',
+ 'u_cache_test',
+ 'u_format_test',
+ 'u_format_compatible_test',
+ 'u_half_test',
+ 'translate_test'
+]
+
+for prog in progs:
+ prog = env.Program(
+ target = prog,
+ source = prog + '.c',
+ )
+
+ env.InstallProgram(prog)
+
+ # http://www.scons.org/wiki/UnitTests
+ test_alias = env.Alias('unit', [prog], prog[0].abspath)
+ AlwaysBuild(test_alias)
+
diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c
index 06e8f69..40d6ec4 100644
--- a/src/gallium/winsys/r600/drm/r600_bo.c
+++ b/src/gallium/winsys/r600/drm/r600_bo.c
@@ -133,7 +133,7 @@ void *r600_bo_map(struct radeon *radeon, struct r600_bo *bo, unsigned usage, voi
return NULL;
}
if (ctx) {
- pctx->flush(pctx, 0, NULL);
+ pctx->flush(pctx, NULL);
}
}
diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c
index cd0aa31..c081abb 100644
--- a/src/gallium/winsys/r600/drm/r600_drm.c
+++ b/src/gallium/winsys/r600/drm/r600_drm.c
@@ -363,9 +363,6 @@ struct radeon *radeon_decref(struct radeon *radeon)
if (radeon->bomgr)
r600_bomgr_destroy(radeon->bomgr);
- if (radeon->fd >= 0)
- drmClose(radeon->fd);
-
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 6b3baa2..a7c2178 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -760,6 +760,17 @@ out_err:
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)
{
@@ -991,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;
@@ -1013,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) {
@@ -1043,10 +1059,14 @@ 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->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_index_type;
diff --git a/src/gallium/winsys/r600/drm/r600d.h b/src/gallium/winsys/r600/drm/r600d.h
index cb12865..8042481 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
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 3094337..9eb8334 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -172,7 +172,7 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf,
/* 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);
+ cs->flush_cs(cs->flush_data, R300_FLUSH_ASYNC);
return NULL;
}
@@ -181,7 +181,11 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf,
}
} else {
if (radeon_bo_is_referenced_by_cs(cs, bo)) {
- cs->flush_cs(cs->flush_data);
+ 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);
@@ -406,8 +410,7 @@ static void radeon_bo_set_tiling(struct r300_winsys_bo *_buf,
/* 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)) {
- radeon_drm_cs_flush(rcs);
- radeon_drm_cs_sync_flush(rcs);
+ cs->flush_cs(cs->flush_data, 0);
}
while (p_atomic_read(&bo->num_active_ioctls)) {
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index 9ee800f..951791a 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -355,10 +355,8 @@ static PIPE_THREAD_ROUTINE(radeon_drm_cs_emit_ioctl, param)
return NULL;
}
-void radeon_drm_cs_sync_flush(struct r300_winsys_cs *rcs)
+void radeon_drm_cs_sync_flush(struct radeon_drm_cs *cs)
{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
-
/* Wait for any pending ioctl to complete. */
if (cs->thread) {
pipe_thread_wait(cs->thread);
@@ -368,12 +366,12 @@ void radeon_drm_cs_sync_flush(struct r300_winsys_cs *rcs)
DEBUG_GET_ONCE_BOOL_OPTION(thread, "RADEON_THREAD", TRUE)
-void radeon_drm_cs_flush(struct r300_winsys_cs *rcs)
+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(rcs);
+ radeon_drm_cs_sync_flush(cs);
/* If the CS is not empty, emit it in a newly-spawned thread. */
if (cs->base.cdw) {
@@ -384,7 +382,8 @@ void radeon_drm_cs_flush(struct r300_winsys_cs *rcs)
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()) {
+ 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 {
@@ -407,7 +406,7 @@ void radeon_drm_cs_flush(struct r300_winsys_cs *rcs)
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(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);
@@ -417,7 +416,8 @@ static void radeon_drm_cs_destroy(struct r300_winsys_cs *rcs)
}
static void radeon_drm_cs_set_flush(struct r300_winsys_cs *rcs,
- void (*flush)(void *), void *user)
+ void (*flush)(void *ctx, unsigned flags),
+ void *user)
{
struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
cs->flush_cs = flush;
@@ -441,7 +441,6 @@ void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws)
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_sync_flush = radeon_drm_cs_sync_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
index 4cc97f3..dfaa161 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.h
@@ -70,7 +70,7 @@ struct radeon_drm_cs {
struct radeon_drm_winsys *ws;
/* Flush CS. */
- void (*flush_cs)(void *);
+ void (*flush_cs)(void *ctx, unsigned flags);
void *flush_data;
pipe_thread thread;
@@ -96,8 +96,7 @@ static INLINE boolean radeon_bo_is_referenced_by_any_cs(struct radeon_bo *bo)
return bo->num_cs_references;
}
-void radeon_drm_cs_flush(struct r300_winsys_cs *rcs);
-void radeon_drm_cs_sync_flush(struct r300_winsys_cs *rcs);
+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/sw/dri/SConscript b/src/gallium/winsys/sw/dri/SConscript
index b255d72..f8e1fa6 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 4ecfdbf..5124576 100644
--- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
+++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
@@ -246,7 +246,7 @@ wsw_dt_unmap(struct sw_winsys *ws,
pipe->transfer_unmap(pipe, wdt->transfer);
pipe->transfer_destroy(pipe, wdt->transfer);
- pipe->flush(pipe, 0, NULL);
+ pipe->flush(pipe, NULL);
wdt->transfer = NULL;
}
diff --git a/src/gallium/winsys/sw/xlib/SConscript b/src/gallium/winsys/sw/xlib/SConscript
index df01a9e..e9c2740 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/glsl/Makefile b/src/glsl/Makefile
index cd7c41a..e4b992d 100644
--- a/src/glsl/Makefile
+++ b/src/glsl/Makefile
@@ -204,7 +204,7 @@ glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
bison -v -o "$@" --defines=glcpp/glcpp-parse.h $<
builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o
- $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(GLSL2_OBJECTS) builtin_stubs.o -o $@
+ $(APP_CXX) $(INCLUDES) $(CXXFLAGS) $(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...
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index 9ecc155..c325583 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -105,11 +105,16 @@ if env['msvc']:
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([
- '#src/mesa/program/hash_table.c',
- '#src/mesa/program/symbol_table.c',
+ 'hash_table.c',
+ 'symbol_table.c',
])
builtin_compiler = env.Program(
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 651fae8..cdb16fd 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -603,7 +603,8 @@ 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)
{
/* 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.
@@ -617,12 +618,13 @@ validate_assignment(struct _mesa_glsl_parse_state *state,
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;
@@ -639,7 +641,7 @@ 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;
@@ -665,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 {
@@ -918,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;
@@ -1245,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());
@@ -1271,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();
@@ -1287,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;
@@ -1303,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;
@@ -1419,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();
@@ -1448,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;
@@ -2234,7 +2237,7 @@ process_initializer(ir_variable *var, ast_declaration *decl,
*/
if (type->qualifier.flags.q.constant
|| type->qualifier.flags.q.uniform) {
- ir_rvalue *new_rhs = validate_assignment(state, var->type, rhs);
+ ir_rvalue *new_rhs = validate_assignment(state, var->type, rhs, true);
if (new_rhs != NULL) {
rhs = new_rhs;
@@ -2276,7 +2279,7 @@ process_initializer(ir_variable *var, ast_declaration *decl,
const glsl_type *initializer_type;
if (!type->qualifier.flags.q.uniform) {
result = do_assignment(initializer_instructions, state,
- lhs, rhs,
+ lhs, rhs, true,
type->get_location());
initializer_type = result->type;
} else
diff --git a/src/glsl/builtin_variables.h b/src/glsl/builtin_variables.h
index a34c67e..9b4f5d9 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/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
index 8017e94..2fbe790 100755
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ b/src/glsl/builtins/tools/texture_builtins.py
@@ -6,6 +6,7 @@ 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:
@@ -48,8 +49,13 @@ def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
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)",
@@ -67,7 +73,7 @@ def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
if tex_inst == "txb":
print "\n (declare (in) float bias)",
- print ")\n ((return (" + tex_inst + " (var_ref sampler)",
+ print ")\n ((return (" + tex_inst, return_type, "(var_ref sampler)",
# Coordinate
if extra_dim > 0:
@@ -131,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")
@@ -138,6 +149,11 @@ 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")
@@ -146,12 +162,16 @@ def generate_texture_functions(fs):
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")
@@ -161,6 +181,9 @@ 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")
@@ -169,6 +192,9 @@ def generate_texture_functions(fs):
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")
@@ -177,12 +203,18 @@ def generate_texture_functions(fs):
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")
@@ -207,12 +239,16 @@ def generate_texture_functions(fs):
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")
@@ -221,6 +257,8 @@ def generate_texture_functions(fs):
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")
@@ -229,6 +267,8 @@ def generate_texture_functions(fs):
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")
@@ -238,6 +278,11 @@ 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")
@@ -247,6 +292,10 @@ def generate_texture_functions(fs):
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")
@@ -255,6 +304,8 @@ def generate_texture_functions(fs):
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")
@@ -263,6 +314,8 @@ def generate_texture_functions(fs):
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")
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index 2f291d4..bcb65d3 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -137,6 +137,7 @@ void glsl_symbol_table::add_global_function(ir_function *f)
symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);
int added = _mesa_symbol_table_add_global_symbol(table, -1, f->name, entry);
assert(added == 0);
+ (void)added;
}
ir_variable *glsl_symbol_table::get_variable(const char *name)
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index 3c2672c..1b069df 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -70,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.
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index fc356ba..a3623b3 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -1150,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);
}
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index f2f902c..39d4ebc 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1191,16 +1191,16 @@ enum ir_texture_opcode {
* selected from \c ir_texture_opcodes. In the printed IR, these will
* appear as:
*
- * Texel offset (0 or an expression)
- * | Projection divisor
- * | | Shadow comparitor
- * | | |
- * v v v
- * (tex <sampler> <coordinate> 0 1 ( ))
- * (txb <sampler> <coordinate> 0 1 ( ) <bias>)
- * (txl <sampler> <coordinate> 0 1 ( ) <lod>)
- * (txd <sampler> <coordinate> 0 1 ( ) (dPdx dPdy))
- * (txf <sampler> <coordinate> 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:
@@ -1226,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.
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index 82ccc72..a84f8df 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -187,6 +187,9 @@ void ir_print_visitor::visit(ir_texture *ir)
{
printf("(%s ", ir->opcode_string());
+ print_type(ir->type);
+ printf(" ");
+
ir->sampler->accept(this);
printf(" ");
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index af85e06..30df257 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -869,6 +869,7 @@ ir_texture *
ir_reader::read_texture(s_expression *expr)
{
s_symbol *tag = NULL;
+ s_expression *s_type = NULL;
s_expression *s_sampler = NULL;
s_expression *s_coord = NULL;
s_expression *s_offset = NULL;
@@ -879,11 +880,11 @@ ir_reader::read_texture(s_expression *expr)
ir_texture_opcode op = ir_tex; /* silence warning */
s_pattern tex_pattern[] =
- { "tex", s_sampler, s_coord, s_offset, s_proj, s_shadow };
+ { "tex", s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow };
s_pattern txf_pattern[] =
- { "txf", s_sampler, s_coord, s_offset, s_lod };
+ { "txf", s_type, s_sampler, s_coord, s_offset, s_lod };
s_pattern other_pattern[] =
- { tag, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod };
+ { tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod };
if (MATCH(expr, tex_pattern)) {
op = ir_tex;
@@ -900,6 +901,14 @@ ir_reader::read_texture(s_expression *expr)
ir_texture *tex = new(mem_ctx) ir_texture(op);
+ // 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;
+ }
+
// Read sampler (must be a deref)
ir_dereference *sampler = read_dereference(s_sampler);
if (sampler == NULL) {
@@ -907,7 +916,7 @@ ir_reader::read_texture(s_expression *expr)
tex->opcode_string());
return NULL;
}
- tex->set_sampler(sampler);
+ tex->set_sampler(sampler, type);
// Read coordinate (any rvalue)
tex->coordinate = read_rvalue(s_coord);
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 44d7549..0fc3baf 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,6 +174,19 @@ 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;
}
@@ -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;
@@ -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/link_functions.cpp b/src/glsl/link_functions.cpp
index 5851c14..ae8818b 100644
--- a/src/glsl/link_functions.cpp
+++ b/src/glsl/link_functions.cpp
@@ -99,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) {
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp
index ceb7908..7c64c61 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 = ralloc_context(NULL);
- }
-
- ~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);
-
- /* 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 0e577c4..7c2928d 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 2e7831d..8fef358 100644
--- a/src/glsl/opt_function_inlining.cpp
+++ b/src/glsl/opt_function_inlining.cpp
@@ -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);
@@ -209,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.
diff --git a/src/glsl/opt_if_simplification.cpp b/src/glsl/opt_if_simplification.cpp
index 618bacf..29b1d18 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 edf4bb6..f350fa9 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 014407c..2c1f6bb 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -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) {
diff --git a/src/glx/Makefile b/src/glx/Makefile
index 3d92ebb..dd96973 100644
--- a/src/glx/Makefile
+++ b/src/glx/Makefile
@@ -64,6 +64,7 @@ INCLUDES = -I. \
-I$(TOP)/src/mapi/glapi \
$(LIBDRM_CFLAGS) \
$(DRI2PROTO_CFLAGS) \
+ $(GLPROTO_CFLAGS) \
$(X11_INCLUDES)
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 83d6e3c..06a73e4 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/glxconfig.c b/src/glx/glxconfig.c
index 1d9678f..c3e1d5a 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 f7ee958e..2f1074c 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 9a64990..1f845ce 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);
}
@@ -235,12 +235,12 @@ 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;
}
@@ -284,7 +284,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
__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 25d266e..e35dcb7 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -546,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++;
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index ffd4664..d6eb408 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 },
@@ -190,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 333b3f9..4fa7a61 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -40,6 +40,7 @@ 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,
@@ -118,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 f79175b..b2675c2 100644
--- a/src/glx/indirect.c
+++ b/src/glx/indirect.c
@@ -10717,5 +10717,5 @@ __indirect_get_proc_address(const char *name)
#endif /* GLX_SHARED_GLAPI */
-#undef FASTCALL
-#undef NOINLINE
+# undef FASTCALL
+# undef NOINLINE
diff --git a/src/mapi/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile
index 51eaf7e..1f4642a 100644
--- a/src/mapi/glapi/gen/Makefile
+++ b/src/mapi/glapi/gen/Makefile
@@ -98,6 +98,7 @@ API_XML = \
EXT_transform_feedback.xml \
NV_conditional_render.xml \
NV_primitive_restart.xml \
+ NV_texture_barrier.xml \
OES_EGL_image.xml \
GL3x.xml
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 0000000..52b1a3c
--- /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/glX_API.xml b/src/mapi/glapi/gen/glX_API.xml
index 9e02aa4..b7f4a77 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 887f631..31745fce 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/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 834b6d6..56c0ec7 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -7971,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"/>
diff --git a/src/mapi/glapi/glapi_mapi_tmp.h b/src/mapi/glapi/glapi_mapi_tmp.h
index 286e779..c3f9cd2 100644
--- a/src/mapi/glapi/glapi_mapi_tmp.h
+++ b/src/mapi/glapi/glapi_mapi_tmp.h
@@ -1295,11 +1295,12 @@ GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectUnpurgeableAPPLE)(GLenum objectType, GL
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);
-void APIENTRY GLAPI_PREFIX(_dispatch_stub_943)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-void APIENTRY GLAPI_PREFIX(_dispatch_stub_944)(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+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)(GLuint id, GLenum pname, GLint64EXT *params);
-void APIENTRY GLAPI_PREFIX(_dispatch_stub_947)(GLuint id, GLenum pname, GLuint64EXT *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
@@ -9538,17 +9539,24 @@ GLAPI void APIENTRY GLAPI_PREFIX(UseShaderProgramEXT)(GLenum type, GLuint progra
((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)[948];
+ 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)[949];
+ mapi_func _func = ((const mapi_func *) _tbl)[950];
((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
}
@@ -13094,11 +13102,14 @@ STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShaderProgramEXT))"\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("948")"\n"
+"\t"STUB_ASM_CODE("949")"\n"
STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EGLImageTargetTexture2DOES))"\n"
-"\t"STUB_ASM_CODE("949")"\n"
+"\t"STUB_ASM_CODE("950")"\n"
);
#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
diff --git a/src/mapi/glapi/glapi_sparc.S b/src/mapi/glapi/glapi_sparc.S
index 099adb1..ca39b17 100644
--- a/src/mapi/glapi/glapi_sparc.S
+++ b/src/mapi/glapi/glapi_sparc.S
@@ -1109,8 +1109,7 @@ gl_dispatch_functions_start:
GL_STUB(glActiveProgramEXT, 881)
GL_STUB(glCreateShaderProgramEXT, 882)
GL_STUB(glUseShaderProgramEXT, 883)
- GL_STUB(gl_dispatch_stub_884, 884)
- HIDDEN(gl_dispatch_stub_884)
+ GL_STUB(glTextureBarrierNV, 884)
GL_STUB(gl_dispatch_stub_885, 885)
HIDDEN(gl_dispatch_stub_885)
GL_STUB(gl_dispatch_stub_886, 886)
@@ -1119,8 +1118,10 @@ gl_dispatch_functions_start:
HIDDEN(gl_dispatch_stub_887)
GL_STUB(gl_dispatch_stub_888, 888)
HIDDEN(gl_dispatch_stub_888)
- GL_STUB(glEGLImageTargetRenderbufferStorageOES, 889)
- GL_STUB(glEGLImageTargetTexture2DOES, 890)
+ 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 c42646f..2dec611 100644
--- a/src/mapi/glapi/glapi_x86-64.S
+++ b/src/mapi/glapi/glapi_x86-64.S
@@ -33494,26 +33494,17 @@ GL_PREFIX(UseShaderProgramEXT):
.size GL_PREFIX(UseShaderProgramEXT), .-GL_PREFIX(UseShaderProgramEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_884)
- .type GL_PREFIX(_dispatch_stub_884), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_884))
-GL_PREFIX(_dispatch_stub_884):
+ .globl GL_PREFIX(TextureBarrierNV)
+ .type GL_PREFIX(TextureBarrierNV), @function
+GL_PREFIX(TextureBarrierNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 7072(%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 7072(%rax), %r11
jmp *%r11
#else
@@ -33523,21 +33514,13 @@ GL_PREFIX(_dispatch_stub_884):
movq 7072(%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 7072(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_884), .-GL_PREFIX(_dispatch_stub_884)
+ .size GL_PREFIX(TextureBarrierNV), .-GL_PREFIX(TextureBarrierNV)
.p2align 4,,15
.globl GL_PREFIX(_dispatch_stub_885)
@@ -33644,7 +33627,11 @@ GL_PREFIX(_dispatch_stub_887):
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
@@ -33660,7 +33647,11 @@ GL_PREFIX(_dispatch_stub_887):
pushq %rdi
pushq %rsi
pushq %rdx
+ pushq %rcx
+ pushq %rbp
call _glapi_get_dispatch
+ popq %rbp
+ popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -33708,12 +33699,50 @@ GL_PREFIX(_dispatch_stub_888):
.size GL_PREFIX(_dispatch_stub_888), .-GL_PREFIX(_dispatch_stub_888)
.p2align 4,,15
+ .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 7112(%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 7112(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 7112(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 7112(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(_dispatch_stub_889), .-GL_PREFIX(_dispatch_stub_889)
+
+ .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 7112(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33723,13 +33752,13 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7112(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7112(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33739,7 +33768,7 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7112(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EGLImageTargetRenderbufferStorageOES), .-GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
@@ -33750,7 +33779,7 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
GL_PREFIX(EGLImageTargetTexture2DOES):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7120(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33760,13 +33789,13 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7120(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7120(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33776,7 +33805,7 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7120(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EGLImageTargetTexture2DOES), .-GL_PREFIX(EGLImageTargetTexture2DOES)
diff --git a/src/mapi/glapi/glapi_x86.S b/src/mapi/glapi/glapi_x86.S
index 8d85f61..2ef45f3 100644
--- a/src/mapi/glapi/glapi_x86.S
+++ b/src/mapi/glapi/glapi_x86.S
@@ -1064,18 +1064,19 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB(ActiveProgramEXT, 881, ActiveProgramEXT@4)
GL_STUB(CreateShaderProgramEXT, 882, CreateShaderProgramEXT@8)
GL_STUB(UseShaderProgramEXT, 883, UseShaderProgramEXT@8)
- GL_STUB(_dispatch_stub_884, 884, _dispatch_stub_884@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_884, _dispatch_stub_884@16))
+ 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@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_887, _dispatch_stub_887@12))
+ 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(EGLImageTargetRenderbufferStorageOES, 889, EGLImageTargetRenderbufferStorageOES@8)
- GL_STUB(EGLImageTargetTexture2DOES, 890, EGLImageTargetTexture2DOES@8)
+ 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)
diff --git a/src/mapi/glapi/glapitable.h b/src/mapi/glapi/glapitable.h
index 1834987..1de71b9 100644
--- a/src/mapi/glapi/glapitable.h
+++ b/src/mapi/glapi/glapitable.h
@@ -924,13 +924,14 @@ struct _glapi_table
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 StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 884 */
- void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 885 */
- void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 886 */
- void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 887 */
- void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 888 */
- void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 889 */
- void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 890 */
+ 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 f45ca85..9415320 100644
--- a/src/mapi/glapi/glapitemp.h
+++ b/src/mapi/glapi/glapitemp.h
@@ -6288,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_884)(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_884)(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_885)(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_885)(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_886)(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_886)(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_887)(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_887)(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_888)(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_888)(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));
}
@@ -7370,11 +7375,12 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(ActiveProgramEXT),
TABLE_ENTRY(CreateShaderProgramEXT),
TABLE_ENTRY(UseShaderProgramEXT),
- TABLE_ENTRY(_dispatch_stub_884),
+ 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
diff --git a/src/mapi/glapi/glprocs.h b/src/mapi/glapi/glprocs.h
index 9b2457c..b66ae38 100644
--- a/src/mapi/glapi/glprocs.h
+++ b/src/mapi/glapi/glprocs.h
@@ -936,6 +936,7 @@ static const char gl_string_table[] =
"glActiveProgramEXT\0"
"glCreateShaderProgramEXT\0"
"glUseShaderProgramEXT\0"
+ "glTextureBarrierNV\0"
"glStencilFuncSeparateATI\0"
"glProgramEnvParameters4fvEXT\0"
"glProgramLocalParameters4fvEXT\0"
@@ -1349,11 +1350,11 @@ static const char gl_string_table[] =
#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_884 mgl_dispatch_stub_884
#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 */
@@ -1401,11 +1402,11 @@ 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_884(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_885(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+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(GLuint id, GLenum pname, GLint64EXT * params);
-void GLAPIENTRY gl_dispatch_stub_888(GLuint id, GLenum pname, GLuint64EXT * 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[] = {
@@ -2293,372 +2294,373 @@ static const glprocs_table_t static_functions[] = {
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, gl_dispatch_stub_884, gl_dispatch_stub_884, NULL, 884),
- NAME_FUNC_OFFSET(16018, gl_dispatch_stub_885, gl_dispatch_stub_885, NULL, 885),
- NAME_FUNC_OFFSET(16047, gl_dispatch_stub_886, gl_dispatch_stub_886, NULL, 886),
- NAME_FUNC_OFFSET(16078, gl_dispatch_stub_887, gl_dispatch_stub_887, NULL, 887),
- NAME_FUNC_OFFSET(16102, gl_dispatch_stub_888, gl_dispatch_stub_888, NULL, 888),
- NAME_FUNC_OFFSET(16127, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 889),
- NAME_FUNC_OFFSET(16166, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 890),
- NAME_FUNC_OFFSET(16195, glArrayElement, glArrayElement, NULL, 306),
- NAME_FUNC_OFFSET(16213, glBindTexture, glBindTexture, NULL, 307),
- NAME_FUNC_OFFSET(16230, glDrawArrays, glDrawArrays, NULL, 310),
- NAME_FUNC_OFFSET(16246, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, 322),
- NAME_FUNC_OFFSET(16271, glCopyTexImage1D, glCopyTexImage1D, NULL, 323),
- NAME_FUNC_OFFSET(16291, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
- NAME_FUNC_OFFSET(16311, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325),
- NAME_FUNC_OFFSET(16334, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
- NAME_FUNC_OFFSET(16357, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, 327),
- NAME_FUNC_OFFSET(16377, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, 328),
- NAME_FUNC_OFFSET(16394, glGetPointerv, glGetPointerv, NULL, 329),
- NAME_FUNC_OFFSET(16411, glIsTexture, glIsTextureEXT, glIsTextureEXT, 330),
- NAME_FUNC_OFFSET(16426, glPrioritizeTextures, glPrioritizeTextures, NULL, 331),
- NAME_FUNC_OFFSET(16450, glTexSubImage1D, glTexSubImage1D, NULL, 332),
- NAME_FUNC_OFFSET(16469, glTexSubImage2D, glTexSubImage2D, NULL, 333),
- NAME_FUNC_OFFSET(16488, glBlendColor, glBlendColor, NULL, 336),
- NAME_FUNC_OFFSET(16504, glBlendEquation, glBlendEquation, NULL, 337),
- NAME_FUNC_OFFSET(16523, glDrawRangeElements, glDrawRangeElements, NULL, 338),
- NAME_FUNC_OFFSET(16546, glColorTable, glColorTable, NULL, 339),
- NAME_FUNC_OFFSET(16562, glColorTable, glColorTable, NULL, 339),
- NAME_FUNC_OFFSET(16578, glColorTableParameterfv, glColorTableParameterfv, NULL, 340),
- NAME_FUNC_OFFSET(16605, glColorTableParameteriv, glColorTableParameteriv, NULL, 341),
- NAME_FUNC_OFFSET(16632, glCopyColorTable, glCopyColorTable, NULL, 342),
- NAME_FUNC_OFFSET(16652, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
+ 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, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
- NAME_FUNC_OFFSET(16720, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
- NAME_FUNC_OFFSET(16750, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
- NAME_FUNC_OFFSET(16780, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
- NAME_FUNC_OFFSET(16810, glColorSubTable, glColorSubTable, NULL, 346),
- NAME_FUNC_OFFSET(16829, glCopyColorSubTable, glCopyColorSubTable, NULL, 347),
- NAME_FUNC_OFFSET(16852, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348),
- NAME_FUNC_OFFSET(16877, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349),
- NAME_FUNC_OFFSET(16902, glConvolutionParameterf, glConvolutionParameterf, NULL, 350),
- NAME_FUNC_OFFSET(16929, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351),
- NAME_FUNC_OFFSET(16957, glConvolutionParameteri, glConvolutionParameteri, NULL, 352),
- NAME_FUNC_OFFSET(16984, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353),
- NAME_FUNC_OFFSET(17012, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354),
- NAME_FUNC_OFFSET(17041, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355),
- NAME_FUNC_OFFSET(17070, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, 356),
- NAME_FUNC_OFFSET(17096, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, 357),
- NAME_FUNC_OFFSET(17127, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, 358),
- NAME_FUNC_OFFSET(17158, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, 359),
- NAME_FUNC_OFFSET(17182, glSeparableFilter2D, glSeparableFilter2D, NULL, 360),
- NAME_FUNC_OFFSET(17205, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, 361),
- NAME_FUNC_OFFSET(17223, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, 362),
- NAME_FUNC_OFFSET(17252, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, 363),
- NAME_FUNC_OFFSET(17281, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, 364),
- NAME_FUNC_OFFSET(17296, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, 365),
- NAME_FUNC_OFFSET(17322, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, 366),
- NAME_FUNC_OFFSET(17348, glHistogram, glHistogram, NULL, 367),
- NAME_FUNC_OFFSET(17363, glMinmax, glMinmax, NULL, 368),
- NAME_FUNC_OFFSET(17375, glResetHistogram, glResetHistogram, NULL, 369),
- NAME_FUNC_OFFSET(17395, glResetMinmax, glResetMinmax, NULL, 370),
- NAME_FUNC_OFFSET(17412, glTexImage3D, glTexImage3D, NULL, 371),
- NAME_FUNC_OFFSET(17428, glTexSubImage3D, glTexSubImage3D, NULL, 372),
- NAME_FUNC_OFFSET(17447, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373),
- NAME_FUNC_OFFSET(17470, glActiveTextureARB, glActiveTextureARB, NULL, 374),
- NAME_FUNC_OFFSET(17486, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375),
- NAME_FUNC_OFFSET(17508, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376),
- NAME_FUNC_OFFSET(17526, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377),
- NAME_FUNC_OFFSET(17545, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378),
- NAME_FUNC_OFFSET(17563, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379),
- NAME_FUNC_OFFSET(17582, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380),
- NAME_FUNC_OFFSET(17600, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381),
- NAME_FUNC_OFFSET(17619, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382),
- NAME_FUNC_OFFSET(17637, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383),
- NAME_FUNC_OFFSET(17656, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384),
- NAME_FUNC_OFFSET(17674, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385),
- NAME_FUNC_OFFSET(17693, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386),
- NAME_FUNC_OFFSET(17711, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387),
- NAME_FUNC_OFFSET(17730, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388),
- NAME_FUNC_OFFSET(17748, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389),
- NAME_FUNC_OFFSET(17767, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390),
- NAME_FUNC_OFFSET(17785, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391),
- NAME_FUNC_OFFSET(17804, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392),
- NAME_FUNC_OFFSET(17822, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393),
- NAME_FUNC_OFFSET(17841, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394),
- NAME_FUNC_OFFSET(17859, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395),
- NAME_FUNC_OFFSET(17878, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396),
- NAME_FUNC_OFFSET(17896, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397),
- NAME_FUNC_OFFSET(17915, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398),
- NAME_FUNC_OFFSET(17933, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399),
- NAME_FUNC_OFFSET(17952, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400),
- NAME_FUNC_OFFSET(17970, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401),
- NAME_FUNC_OFFSET(17989, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402),
- NAME_FUNC_OFFSET(18007, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403),
- NAME_FUNC_OFFSET(18026, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404),
- NAME_FUNC_OFFSET(18044, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405),
- NAME_FUNC_OFFSET(18063, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406),
- NAME_FUNC_OFFSET(18081, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407),
- NAME_FUNC_OFFSET(18100, glStencilOpSeparate, glStencilOpSeparate, NULL, 423),
- NAME_FUNC_OFFSET(18123, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441),
- NAME_FUNC_OFFSET(18146, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442),
- NAME_FUNC_OFFSET(18169, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443),
- NAME_FUNC_OFFSET(18192, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444),
- NAME_FUNC_OFFSET(18215, glSampleCoverageARB, glSampleCoverageARB, NULL, 445),
- NAME_FUNC_OFFSET(18232, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446),
- NAME_FUNC_OFFSET(18255, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447),
- NAME_FUNC_OFFSET(18278, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448),
- NAME_FUNC_OFFSET(18301, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449),
- NAME_FUNC_OFFSET(18327, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450),
- NAME_FUNC_OFFSET(18353, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451),
- NAME_FUNC_OFFSET(18379, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452),
- NAME_FUNC_OFFSET(18403, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453),
- NAME_FUNC_OFFSET(18430, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454),
- NAME_FUNC_OFFSET(18456, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461),
- NAME_FUNC_OFFSET(18476, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462),
- NAME_FUNC_OFFSET(18496, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463),
- NAME_FUNC_OFFSET(18516, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464),
- NAME_FUNC_OFFSET(18539, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465),
- NAME_FUNC_OFFSET(18563, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466),
- NAME_FUNC_OFFSET(18586, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467),
- NAME_FUNC_OFFSET(18610, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473),
- NAME_FUNC_OFFSET(18627, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474),
- NAME_FUNC_OFFSET(18645, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475),
- NAME_FUNC_OFFSET(18662, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476),
- NAME_FUNC_OFFSET(18680, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477),
- NAME_FUNC_OFFSET(18697, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478),
- NAME_FUNC_OFFSET(18715, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479),
- NAME_FUNC_OFFSET(18732, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480),
- NAME_FUNC_OFFSET(18750, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481),
- NAME_FUNC_OFFSET(18767, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482),
- NAME_FUNC_OFFSET(18785, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483),
- NAME_FUNC_OFFSET(18802, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484),
- NAME_FUNC_OFFSET(18820, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485),
- NAME_FUNC_OFFSET(18837, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486),
- NAME_FUNC_OFFSET(18855, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487),
- NAME_FUNC_OFFSET(18872, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488),
- NAME_FUNC_OFFSET(18890, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489),
- NAME_FUNC_OFFSET(18907, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490),
- NAME_FUNC_OFFSET(18925, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491),
- NAME_FUNC_OFFSET(18944, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492),
- NAME_FUNC_OFFSET(18963, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493),
- NAME_FUNC_OFFSET(18982, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494),
- NAME_FUNC_OFFSET(19001, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495),
- NAME_FUNC_OFFSET(19021, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496),
- NAME_FUNC_OFFSET(19041, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497),
- NAME_FUNC_OFFSET(19061, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498),
- NAME_FUNC_OFFSET(19079, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499),
- NAME_FUNC_OFFSET(19096, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500),
- NAME_FUNC_OFFSET(19114, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501),
- NAME_FUNC_OFFSET(19131, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502),
- NAME_FUNC_OFFSET(19149, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503),
- NAME_FUNC_OFFSET(19167, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504),
- NAME_FUNC_OFFSET(19184, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505),
- NAME_FUNC_OFFSET(19202, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506),
- NAME_FUNC_OFFSET(19221, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507),
- NAME_FUNC_OFFSET(19240, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508),
- NAME_FUNC_OFFSET(19259, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509),
- NAME_FUNC_OFFSET(19281, glBindBufferARB, glBindBufferARB, NULL, 510),
- NAME_FUNC_OFFSET(19294, glBufferDataARB, glBufferDataARB, NULL, 511),
- NAME_FUNC_OFFSET(19307, glBufferSubDataARB, glBufferSubDataARB, NULL, 512),
- NAME_FUNC_OFFSET(19323, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513),
- NAME_FUNC_OFFSET(19339, glGenBuffersARB, glGenBuffersARB, NULL, 514),
- NAME_FUNC_OFFSET(19352, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515),
- NAME_FUNC_OFFSET(19375, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516),
- NAME_FUNC_OFFSET(19395, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517),
- NAME_FUNC_OFFSET(19414, glIsBufferARB, glIsBufferARB, NULL, 518),
- NAME_FUNC_OFFSET(19425, glMapBufferARB, glMapBufferARB, NULL, 519),
- NAME_FUNC_OFFSET(19437, glUnmapBufferARB, glUnmapBufferARB, NULL, 520),
- NAME_FUNC_OFFSET(19451, glBeginQueryARB, glBeginQueryARB, NULL, 521),
- NAME_FUNC_OFFSET(19464, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522),
- NAME_FUNC_OFFSET(19480, glEndQueryARB, glEndQueryARB, NULL, 523),
- NAME_FUNC_OFFSET(19491, glGenQueriesARB, glGenQueriesARB, NULL, 524),
- NAME_FUNC_OFFSET(19504, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525),
- NAME_FUNC_OFFSET(19523, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526),
- NAME_FUNC_OFFSET(19543, glGetQueryivARB, glGetQueryivARB, NULL, 527),
- NAME_FUNC_OFFSET(19556, glIsQueryARB, glIsQueryARB, NULL, 528),
- NAME_FUNC_OFFSET(19566, glCompileShaderARB, glCompileShaderARB, NULL, 530),
- NAME_FUNC_OFFSET(19582, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535),
- NAME_FUNC_OFFSET(19601, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541),
- NAME_FUNC_OFFSET(19619, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542),
- NAME_FUNC_OFFSET(19640, glGetUniformfvARB, glGetUniformfvARB, NULL, 543),
- NAME_FUNC_OFFSET(19655, glGetUniformivARB, glGetUniformivARB, NULL, 544),
- NAME_FUNC_OFFSET(19670, glLinkProgramARB, glLinkProgramARB, NULL, 545),
- NAME_FUNC_OFFSET(19684, glShaderSourceARB, glShaderSourceARB, NULL, 546),
- NAME_FUNC_OFFSET(19699, glUniform1fARB, glUniform1fARB, NULL, 547),
- NAME_FUNC_OFFSET(19711, glUniform1fvARB, glUniform1fvARB, NULL, 548),
- NAME_FUNC_OFFSET(19724, glUniform1iARB, glUniform1iARB, NULL, 549),
- NAME_FUNC_OFFSET(19736, glUniform1ivARB, glUniform1ivARB, NULL, 550),
- NAME_FUNC_OFFSET(19749, glUniform2fARB, glUniform2fARB, NULL, 551),
- NAME_FUNC_OFFSET(19761, glUniform2fvARB, glUniform2fvARB, NULL, 552),
- NAME_FUNC_OFFSET(19774, glUniform2iARB, glUniform2iARB, NULL, 553),
- NAME_FUNC_OFFSET(19786, glUniform2ivARB, glUniform2ivARB, NULL, 554),
- NAME_FUNC_OFFSET(19799, glUniform3fARB, glUniform3fARB, NULL, 555),
- NAME_FUNC_OFFSET(19811, glUniform3fvARB, glUniform3fvARB, NULL, 556),
- NAME_FUNC_OFFSET(19824, glUniform3iARB, glUniform3iARB, NULL, 557),
- NAME_FUNC_OFFSET(19836, glUniform3ivARB, glUniform3ivARB, NULL, 558),
- NAME_FUNC_OFFSET(19849, glUniform4fARB, glUniform4fARB, NULL, 559),
- NAME_FUNC_OFFSET(19861, glUniform4fvARB, glUniform4fvARB, NULL, 560),
- NAME_FUNC_OFFSET(19874, glUniform4iARB, glUniform4iARB, NULL, 561),
- NAME_FUNC_OFFSET(19886, glUniform4ivARB, glUniform4ivARB, NULL, 562),
- NAME_FUNC_OFFSET(19899, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563),
- NAME_FUNC_OFFSET(19918, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564),
- NAME_FUNC_OFFSET(19937, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565),
- NAME_FUNC_OFFSET(19956, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566),
- NAME_FUNC_OFFSET(19969, glValidateProgramARB, glValidateProgramARB, NULL, 567),
- NAME_FUNC_OFFSET(19987, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568),
- NAME_FUNC_OFFSET(20008, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569),
- NAME_FUNC_OFFSET(20026, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570),
- NAME_FUNC_OFFSET(20046, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
- NAME_FUNC_OFFSET(20060, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
- NAME_FUNC_OFFSET(20077, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
- NAME_FUNC_OFFSET(20102, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
- NAME_FUNC_OFFSET(20124, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
- NAME_FUNC_OFFSET(20151, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
- NAME_FUNC_OFFSET(20175, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 574),
- NAME_FUNC_OFFSET(20211, gl_dispatch_stub_617, gl_dispatch_stub_617, NULL, 617),
- NAME_FUNC_OFFSET(20227, gl_dispatch_stub_618, gl_dispatch_stub_618, NULL, 618),
- NAME_FUNC_OFFSET(20246, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
- NAME_FUNC_OFFSET(20264, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
- NAME_FUNC_OFFSET(20285, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
- NAME_FUNC_OFFSET(20307, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ 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(20348, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
- NAME_FUNC_OFFSET(20371, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 629),
- NAME_FUNC_OFFSET(20390, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 630),
- NAME_FUNC_OFFSET(20410, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 631),
- NAME_FUNC_OFFSET(20429, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 632),
- NAME_FUNC_OFFSET(20449, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 633),
- NAME_FUNC_OFFSET(20468, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 634),
- NAME_FUNC_OFFSET(20488, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 635),
- NAME_FUNC_OFFSET(20507, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 636),
- NAME_FUNC_OFFSET(20527, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 637),
- NAME_FUNC_OFFSET(20546, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 638),
- NAME_FUNC_OFFSET(20566, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 639),
- NAME_FUNC_OFFSET(20586, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 640),
- NAME_FUNC_OFFSET(20607, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 641),
- NAME_FUNC_OFFSET(20627, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 642),
- NAME_FUNC_OFFSET(20648, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 643),
- NAME_FUNC_OFFSET(20668, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 644),
- NAME_FUNC_OFFSET(20689, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 645),
- NAME_FUNC_OFFSET(20713, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 646),
- NAME_FUNC_OFFSET(20731, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 647),
- NAME_FUNC_OFFSET(20751, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 648),
- NAME_FUNC_OFFSET(20769, glFogCoorddEXT, glFogCoorddEXT, NULL, 649),
- NAME_FUNC_OFFSET(20781, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 650),
- NAME_FUNC_OFFSET(20794, glFogCoordfEXT, glFogCoordfEXT, NULL, 651),
- NAME_FUNC_OFFSET(20806, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 652),
- NAME_FUNC_OFFSET(20819, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
- NAME_FUNC_OFFSET(20839, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
- NAME_FUNC_OFFSET(20863, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
- NAME_FUNC_OFFSET(20877, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
- NAME_FUNC_OFFSET(20894, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
- NAME_FUNC_OFFSET(20909, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
- NAME_FUNC_OFFSET(20927, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
- NAME_FUNC_OFFSET(20941, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
- NAME_FUNC_OFFSET(20958, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
- NAME_FUNC_OFFSET(20973, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
- NAME_FUNC_OFFSET(20991, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
- NAME_FUNC_OFFSET(21005, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
- NAME_FUNC_OFFSET(21022, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
- NAME_FUNC_OFFSET(21037, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
- NAME_FUNC_OFFSET(21055, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
- NAME_FUNC_OFFSET(21069, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
- NAME_FUNC_OFFSET(21086, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
- NAME_FUNC_OFFSET(21101, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
- NAME_FUNC_OFFSET(21119, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
- NAME_FUNC_OFFSET(21133, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
- NAME_FUNC_OFFSET(21150, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
- NAME_FUNC_OFFSET(21165, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
- NAME_FUNC_OFFSET(21183, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
- NAME_FUNC_OFFSET(21197, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
- NAME_FUNC_OFFSET(21214, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
- NAME_FUNC_OFFSET(21229, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
- NAME_FUNC_OFFSET(21247, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
- NAME_FUNC_OFFSET(21261, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
- NAME_FUNC_OFFSET(21278, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
- NAME_FUNC_OFFSET(21293, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
- NAME_FUNC_OFFSET(21311, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
- NAME_FUNC_OFFSET(21325, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
- NAME_FUNC_OFFSET(21342, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
- NAME_FUNC_OFFSET(21357, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
- NAME_FUNC_OFFSET(21375, glBindProgramNV, glBindProgramNV, NULL, 705),
- NAME_FUNC_OFFSET(21392, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 706),
- NAME_FUNC_OFFSET(21412, glGenProgramsNV, glGenProgramsNV, NULL, 708),
- NAME_FUNC_OFFSET(21429, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
- NAME_FUNC_OFFSET(21455, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
- NAME_FUNC_OFFSET(21484, glIsProgramNV, glIsProgramNV, NULL, 718),
- NAME_FUNC_OFFSET(21499, glPointParameteriNV, glPointParameteriNV, NULL, 782),
- NAME_FUNC_OFFSET(21517, glPointParameterivNV, glPointParameterivNV, NULL, 783),
- NAME_FUNC_OFFSET(21536, gl_dispatch_stub_786, gl_dispatch_stub_786, NULL, 786),
- NAME_FUNC_OFFSET(21557, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
- NAME_FUNC_OFFSET(21573, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 795),
- NAME_FUNC_OFFSET(21597, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
- NAME_FUNC_OFFSET(21621, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
- NAME_FUNC_OFFSET(21648, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 799),
- NAME_FUNC_OFFSET(21666, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 800),
- NAME_FUNC_OFFSET(21685, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 801),
- NAME_FUNC_OFFSET(21710, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 802),
- NAME_FUNC_OFFSET(21731, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 803),
- NAME_FUNC_OFFSET(21753, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 804),
- NAME_FUNC_OFFSET(21779, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 805),
- NAME_FUNC_OFFSET(21802, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 806),
- NAME_FUNC_OFFSET(21825, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 807),
- NAME_FUNC_OFFSET(21848, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 808),
- NAME_FUNC_OFFSET(21866, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 809),
- NAME_FUNC_OFFSET(21885, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 810),
- NAME_FUNC_OFFSET(21902, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 811),
- NAME_FUNC_OFFSET(21940, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 812),
- NAME_FUNC_OFFSET(21969, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 813),
- NAME_FUNC_OFFSET(21985, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 814),
- NAME_FUNC_OFFSET(22002, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 815),
- NAME_FUNC_OFFSET(22024, gl_dispatch_stub_816, gl_dispatch_stub_816, NULL, 816),
- NAME_FUNC_OFFSET(22042, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 819),
- NAME_FUNC_OFFSET(22065, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 820),
- NAME_FUNC_OFFSET(22087, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 821),
- NAME_FUNC_OFFSET(22103, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 822),
- NAME_FUNC_OFFSET(22124, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 823),
- NAME_FUNC_OFFSET(22146, glUniform1uiEXT, glUniform1uiEXT, NULL, 824),
- NAME_FUNC_OFFSET(22159, glUniform1uivEXT, glUniform1uivEXT, NULL, 825),
- NAME_FUNC_OFFSET(22173, glUniform2uiEXT, glUniform2uiEXT, NULL, 826),
- NAME_FUNC_OFFSET(22186, glUniform2uivEXT, glUniform2uivEXT, NULL, 827),
- NAME_FUNC_OFFSET(22200, glUniform3uiEXT, glUniform3uiEXT, NULL, 828),
- NAME_FUNC_OFFSET(22213, glUniform3uivEXT, glUniform3uivEXT, NULL, 829),
- NAME_FUNC_OFFSET(22227, glUniform4uiEXT, glUniform4uiEXT, NULL, 830),
- NAME_FUNC_OFFSET(22240, glUniform4uivEXT, glUniform4uivEXT, NULL, 831),
- NAME_FUNC_OFFSET(22254, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 832),
- NAME_FUNC_OFFSET(22272, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 833),
- NAME_FUNC_OFFSET(22291, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 834),
- NAME_FUNC_OFFSET(22310, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 835),
- NAME_FUNC_OFFSET(22330, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 836),
- NAME_FUNC_OFFSET(22348, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 837),
- NAME_FUNC_OFFSET(22367, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 838),
- NAME_FUNC_OFFSET(22386, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 839),
- NAME_FUNC_OFFSET(22406, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 840),
- NAME_FUNC_OFFSET(22424, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 841),
- NAME_FUNC_OFFSET(22443, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 842),
- NAME_FUNC_OFFSET(22462, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 843),
- NAME_FUNC_OFFSET(22482, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 844),
- NAME_FUNC_OFFSET(22501, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 845),
- NAME_FUNC_OFFSET(22519, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 846),
- NAME_FUNC_OFFSET(22538, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 847),
- NAME_FUNC_OFFSET(22557, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 848),
- NAME_FUNC_OFFSET(22577, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 849),
- NAME_FUNC_OFFSET(22596, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 850),
- NAME_FUNC_OFFSET(22616, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 851),
- NAME_FUNC_OFFSET(22636, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 852),
- NAME_FUNC_OFFSET(22659, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 853),
- NAME_FUNC_OFFSET(22685, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 854),
- NAME_FUNC_OFFSET(22698, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 855),
- NAME_FUNC_OFFSET(22709, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 856),
- NAME_FUNC_OFFSET(22719, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 857),
- NAME_FUNC_OFFSET(22735, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 858),
- NAME_FUNC_OFFSET(22751, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 859),
- NAME_FUNC_OFFSET(22764, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 862),
- NAME_FUNC_OFFSET(22785, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 863),
- NAME_FUNC_OFFSET(22807, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 864),
- NAME_FUNC_OFFSET(22825, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 865),
- NAME_FUNC_OFFSET(22844, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 866),
- NAME_FUNC_OFFSET(22869, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 867),
- NAME_FUNC_OFFSET(22892, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 868),
- NAME_FUNC_OFFSET(22917, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 869),
- NAME_FUNC_OFFSET(22934, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 871),
- NAME_FUNC_OFFSET(22952, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 872),
- NAME_FUNC_OFFSET(22975, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 873),
- NAME_FUNC_OFFSET(23005, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 874),
- NAME_FUNC_OFFSET(23033, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 875),
+ 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/mapi/u_current.c b/src/mapi/mapi/u_current.c
index 7946d2a..21a07ab 100644
--- a/src/mapi/mapi/u_current.c
+++ b/src/mapi/mapi/u_current.c
@@ -144,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
@@ -167,7 +159,7 @@ u_current_init(void)
if (ThreadSafe)
return;
- CHECK_MULTITHREAD_LOCK();
+ u_mutex_lock(ThreadCheckMutex);
if (firstCall) {
u_current_init_tsd();
@@ -179,7 +171,7 @@ u_current_init(void)
u_current_set(NULL);
u_current_set_user(NULL);
}
- CHECK_MULTITHREAD_UNLOCK();
+ u_mutex_unlock(ThreadCheckMutex);
}
#else
diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
index 138db47..12e748f 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);
}
}
diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h
index 92a0a39..1cc8be3 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/mesa/Makefile b/src/mesa/Makefile
index 10d73f0..03962e9 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -43,7 +43,7 @@ endef
define mesa-cxx-c
@mkdir -p $(dir $@)
- $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS) $($(1)_CXXFLAGS)
+ $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CXXFLAGS)
endef
$(MESA_OBJ_DIR)/%.o: %.c
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index 7e8bb24..261242f 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -68,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',
@@ -111,7 +112,6 @@ main_sources = [
'main/texcompress_s3tc.c',
'main/texcompress_fxt1.c',
'main/texenv.c',
- 'main/texenvprogram.c',
'main/texfetch.c',
'main/texformat.c',
'main/texgen.c',
@@ -123,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',
@@ -197,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',
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 5389a50..854dea9 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"
@@ -188,6 +189,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
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;
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 42be77f..083edfa 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/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index ef5b8d9..9fecab1 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 |
@@ -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/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 25f4fc3..2bfe665 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,7 +304,7 @@ 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;
@@ -344,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];
@@ -365,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)
@@ -1166,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");
}
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 58d4f5d..3b1af4c 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"
@@ -209,7 +210,7 @@ i915EvalLogicOpBlendState(struct gl_context * ctx)
dw0 = i915->state.Ctx[I915_CTXREG_LIS5];
dw1 = i915->state.Ctx[I915_CTXREG_LIS6];
- if (RGBA_LOGICOP_ENABLED(ctx)) {
+ if (_mesa_rgba_logicop_enabled(ctx)) {
dw0 |= S5_LOGICOP_ENABLE;
dw1 &= ~S6_CBUF_BLEND_ENABLE;
}
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index cf9291c..7bcb72f 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -490,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);
@@ -500,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);
}
@@ -513,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);
@@ -521,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);
}
@@ -531,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/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 26a6388..7b0551a 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -701,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];
};
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 5496b4f..6c61aef 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -688,13 +688,13 @@
#define BRW_SAMPLER_MESSAGE_SIMD8_LD 3
#define BRW_SAMPLER_MESSAGE_SIMD16_LD 3
-#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
+#define GEN5_SAMPLER_MESSAGE_SAMPLE 0
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS 1
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_LOD 2
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE 3
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS 4
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE 5
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE 6
/* for GEN5 only */
#define BRW_SAMPLER_SIMD_MODE_SIMD4X2 0
@@ -752,14 +752,14 @@
#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 GEN6_DATAPORT_WRITE_MESSAGE_DWORD_ATOMIC_WRITE 7
+#define GEN6_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE 8
+#define GEN6_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE 9
+#define GEN6_DATAPORT_WRITE_MESSAGE_MEDIA_BLOCK_WRITE 10
+#define GEN6_DATAPORT_WRITE_MESSAGE_DWORLD_SCATTERED_WRITE 11
+#define GEN6_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE 12
+#define GEN6_DATAPORT_WRITE_MESSAGE_STREAMED_VB_WRITE 13
+#define GEN6_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_UNORM_WRITE 14
#define BRW_MATH_FUNCTION_INV 1
#define BRW_MATH_FUNCTION_LOG 2
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index e96c32a..f1d0069 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -291,7 +291,7 @@ 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);
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 119ffc7..2d2ed9d 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -939,8 +939,8 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
*/
struct brw_instruction *brw_IF(struct brw_compile *p,
GLuint execute_size);
-struct brw_instruction *brw_IF_gen6(struct brw_compile *p, uint32_t conditional,
- struct brw_reg src0, struct brw_reg src1);
+struct brw_instruction *gen6_IF(struct brw_compile *p, uint32_t conditional,
+ struct brw_reg src0, struct brw_reg src1);
struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *if_insn);
@@ -958,9 +958,9 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p,
struct brw_instruction *patch_insn);
struct brw_instruction *brw_BREAK(struct brw_compile *p, int pop_count);
-struct brw_instruction *brw_CONT_gen6(struct brw_compile *p,
- struct brw_instruction *do_insn);
struct brw_instruction *brw_CONT(struct brw_compile *p, int pop_count);
+struct brw_instruction *gen6_CONT(struct brw_compile *p,
+ struct brw_instruction *do_insn);
/* Forward jumps:
*/
void brw_land_fwd_jump(struct brw_compile *p,
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 88131c4..21ce92c 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -874,8 +874,8 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size)
}
struct brw_instruction *
-brw_IF_gen6(struct brw_compile *p, uint32_t conditional,
- struct brw_reg src0, struct brw_reg src1)
+gen6_IF(struct brw_compile *p, uint32_t conditional,
+ struct brw_reg src0, struct brw_reg src1)
{
struct brw_instruction *insn;
@@ -1061,8 +1061,8 @@ struct brw_instruction *brw_BREAK(struct brw_compile *p, int pop_count)
return insn;
}
-struct brw_instruction *brw_CONT_gen6(struct brw_compile *p,
- struct brw_instruction *do_insn)
+struct brw_instruction *gen6_CONT(struct brw_compile *p,
+ struct brw_instruction *do_insn)
{
struct brw_instruction *insn;
int br = 2;
@@ -1844,7 +1844,7 @@ void brw_fb_WRITE(struct brw_compile *p,
/* headerless version, just submit color payload */
src0 = brw_message_reg(msg_reg_nr);
- msg_type = BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE_GEN6;
+ msg_type = GEN6_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE;
} else {
insn->header.destreg__conditionalmod = msg_reg_nr;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ce7959b..8b3f5ad 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -78,15 +78,6 @@ brw_new_shader_program(struct gl_context *ctx, GLuint name)
}
GLboolean
-brw_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
-{
- if (!_mesa_ir_compile_shader(ctx, shader))
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-GLboolean
brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
struct brw_context *brw = brw_context(ctx);
@@ -120,6 +111,14 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
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;
@@ -134,16 +133,6 @@ 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);
@@ -1452,7 +1441,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++) {
@@ -2139,6 +2131,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;
@@ -2301,23 +2304,23 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
switch (inst->opcode) {
case FS_OPCODE_TEX:
if (inst->shadow_compare) {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE;
} else {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE;
}
break;
case FS_OPCODE_TXB:
if (inst->shadow_compare) {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE;
} else {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
}
break;
case FS_OPCODE_TXL:
if (inst->shadow_compare) {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE;
} else {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_LOD_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LOD;
}
break;
case FS_OPCODE_TXD:
@@ -3542,7 +3545,7 @@ fs_visitor::generate_code()
case BRW_OPCODE_IF:
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]);
+ if_stack[if_stack_depth] = gen6_IF(p, inst->conditional_mod, src[0], src[1]);
} else {
if_stack[if_stack_depth] = brw_IF(p, BRW_EXECUTE_8);
}
@@ -3584,7 +3587,7 @@ fs_visitor::generate_code()
case BRW_OPCODE_CONTINUE:
/* FINISHME: We need to write the loop instruction support still. */
if (intel->gen >= 6)
- brw_CONT_gen6(p, loop_stack[loop_stack_depth - 1]);
+ gen6_CONT(p, loop_stack[loop_stack_depth - 1]);
else
brw_CONT(p, if_depth_in_loop[loop_stack_depth]);
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 7d65332..ee68095 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -243,7 +243,6 @@ void brwInitFragProgFuncs( struct dd_function_table *functions )
functions->NewShader = brw_new_shader;
functions->NewShaderProgram = brw_new_shader_program;
- functions->CompileShader = brw_compile_shader;
functions->LinkShader = brw_link_shader;
}
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 2d6fb37..6f521be 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,7 +169,32 @@ 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));
}
@@ -186,7 +211,7 @@ static GLuint check_state( const struct brw_state_flags *a,
{
return ((a->mesa & b->mesa) |
(a->brw & b->brw) |
- (a->cache & b->cache));
+ (a->cache & b->cache)) != 0;
}
static void accumulate_state( struct brw_state_flags *a,
@@ -342,9 +367,9 @@ 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);
@@ -353,14 +378,6 @@ void brw_validate_state( struct brw_context *brw )
brw_add_validated_bo(brw, intel->batch.bo);
- if (intel->gen >= 6) {
- atoms = gen6_atoms;
- num_atoms = ARRAY_SIZE(gen6_atoms);
- } else {
- atoms = gen4_atoms;
- num_atoms = ARRAY_SIZE(gen4_atoms);
- }
-
if (brw->emit_state_always) {
state->mesa |= ~0;
state->brw |= ~0;
@@ -384,15 +401,13 @@ void brw_validate_state( struct brw_context *brw )
/* 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;
}
}
@@ -415,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);
@@ -442,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);
@@ -471,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_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 6ec6255..acacf37 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -2109,7 +2109,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
case OPCODE_CONT:
brw_set_predicate_control(p, get_predicate(inst));
if (intel->gen >= 6) {
- brw_CONT_gen6(p, loop_inst[loop_depth - 1]);
+ gen6_CONT(p, loop_inst[loop_depth - 1]);
} else {
brw_CONT(p, if_depth_in_loop[loop_depth]);
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index ee8212f..ca51d15 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
@@ -379,9 +378,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
} 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_ZERO;
+ swizzles[3] = SWIZZLE_ONE;
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index d9cae75..c40d7bf 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;
@@ -467,8 +468,6 @@ void emit_xpd(struct brw_compile *p,
const struct brw_reg *arg0,
const struct brw_reg *arg1);
-GLboolean 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 gl_shader *brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type);
struct gl_shader_program *brw_new_shader_program(struct gl_context *ctx, GLuint name);
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index 2336e27..ecfd21d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -1134,9 +1134,9 @@ void emit_tex(struct brw_wm_compile *c,
if (intel->gen >= 5) {
if (shadow)
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE;
else
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE;
} else {
/* Note that G45 and older determines shadow compare and dispatch width
* from message length for most messages.
@@ -1186,14 +1186,14 @@ void emit_txb(struct brw_wm_compile *c,
*/
if (c->dispatch_width == 16 || intel->gen < 5) {
if (intel->gen >= 5)
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
else
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
mrf_per_channel = 2;
dst_retyped = retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW);
response_length = 8;
} else {
- msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
+ msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
mrf_per_channel = 1;
dst_retyped = retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW);
response_length = 4;
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index d398775..43cdd0d 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -208,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);
}
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index 0857fa8..a4da1ce 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
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 5c95c72..64a21a1 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -25,6 +25,7 @@
*
**************************************************************************/
+#include <errno.h>
#include "main/glheader.h"
#include "main/context.h"
#include "main/framebuffer.h"
@@ -302,7 +303,8 @@ 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;
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index 6b7f13f..d0f8294 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -90,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 8537e7f..a11b07e 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -140,6 +140,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
cpp,
comp_byte,
GL_TRUE);
+ if (!intelObj->mt)
+ return GL_FALSE;
}
/* Pull in any images not in the object's tree:
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 2fac2b4..bfc55f4 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 );
@@ -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_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
index c5ac128..158aec8 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"
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 988208f..1a1e10e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -30,6 +30,7 @@
#include "nouveau_fbo.h"
#include "nouveau_util.h"
+#include "main/pbo.h"
#include "main/texobj.h"
#include "main/texstore.h"
#include "main/texformat.h"
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index ecfbdfe..78d29fc 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -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. */
@@ -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_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index e8bd12e..96d1b32 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 4677198..4f7ddd8 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_state.c b/src/mesa/drivers/dri/r128/r128_state.c
index d6725cd..7ce082e 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"
@@ -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/r300/compiler/r300_fragprog_swizzle.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
index fa906f2..5223aaa 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) {
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index 1616306..9286733 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},
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
index ef81be4..140eeed 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 1febc19..301b444 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
@@ -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 d145166..35360aa 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -173,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;
};
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index 5caff91..c4e6a5e 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -311,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)
@@ -325,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_translate.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
index 6d7263b..9e03eb1 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
@@ -214,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);
@@ -236,7 +241,7 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c,
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;
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 f9d9f34..1cf77d9 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/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 9df9101..51989c6 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -214,7 +214,7 @@ 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;
}
@@ -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/r600/evergreen_state.c b/src/mesa/drivers/dri/r600/evergreen_state.c
index 006e500..309c93f 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,
@@ -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);
}
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index f877069..4d285b3 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,
@@ -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/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index e88e984..a93e618 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"
@@ -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 );
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 1feffa0..21ebf5d 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"
@@ -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 9708f63..9ca5829 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_state.c b/src/mesa/drivers/dri/sis/sis_state.c
index e53c326..828772e 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/main/api_exec.c b/src/mesa/main/api_exec.c
index 546cdd6..4da4893 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"
@@ -719,6 +720,9 @@ _mesa_create_exec_table(void)
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/bufferobj.c b/src/mesa/main/bufferobj.c
index 35d9261..3343bb2 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -558,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,
@@ -748,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)");
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 5d581c8..ca74284 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -486,7 +486,6 @@ 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) {
@@ -494,23 +493,19 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
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()");
@@ -619,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) {
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 4e391dd..33a3631 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -286,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.Blend[0].EquationRGB == GL_LOGIC_OP))
-
-
#endif /* CONTEXT_H */
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 749c30a..34d67b5 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -602,15 +602,6 @@ struct dd_function_table {
*/
/*@{*/
/**
- * Called when a shader is compiled.
- *
- * Note that not all shader objects get ShaderCompile called on
- * them. Notably, the shaders containing builtin functions do not
- * have CompileShader() called, so if lowering passes are done they
- * need to also be performed in LinkShader().
- */
- GLboolean (*CompileShader)(struct gl_context *ctx, struct gl_shader *shader);
- /**
* Called when a shader program is linked.
*
* This gives drivers an opportunity to clone the IR and make their
@@ -1025,6 +1016,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/dlist.c b/src/mesa/main/dlist.c
index 4e463dd..0112d9d 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -431,6 +431,9 @@ typedef enum
/* 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,
@@ -7031,6 +7034,18 @@ save_VertexAttribDivisor(GLuint index, GLuint 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.
@@ -8207,6 +8222,10 @@ execute_list(struct gl_context *ctx, GLuint list)
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;
@@ -9881,6 +9900,9 @@ _mesa_create_save_table(void)
/* 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);
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 98e82ef..fb86036 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -136,8 +136,6 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_finish(ctx);
-
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx,
"glCopyPixels(%d, %d, %d, %d, %s) // from %s to %s at %d, %d\n",
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 83d7fb6..e9d6b6b 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -6268,7 +6268,7 @@ static const char *prim_names[PRIM_UNKNOWN + 1] = {
* GL_FALSE/GL_POINTS ambiguity and others.
*/
const char *
-_mesa_lookup_prim_by_nr(unsigned nr)
+_mesa_lookup_prim_by_nr(GLuint nr)
{
if (nr < Elements(prim_names))
return prim_names[nr];
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 3840cdc..4b6e91c 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -56,6 +56,10 @@ struct extension {
/** Set of API's in which the extension exists, as a bitset. */
uint8_t api_set;
+
+ /** Year the extension was proposed or approved. Used to sort the
+ * extension string chronologically. */
+ uint16_t year;
};
@@ -73,226 +77,229 @@ struct extension {
*/
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 },
- { "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 },
+ { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 },
+ { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 },
+ { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL, 2008 },
+ { "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL, 2008 },
+ { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 },
+ { "GL_ARB_depth_texture", o(ARB_depth_texture), GL, 2001 },
+ { "GL_ARB_draw_buffers", o(ARB_draw_buffers), GL, 2002 },
+ { "GL_ARB_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 },
+ { "GL_ARB_draw_elements_base_vertex", o(ARB_draw_elements_base_vertex), GL, 2009 },
+ { "GL_ARB_draw_instanced", o(ARB_draw_instanced), GL, 2008 },
+ { "GL_ARB_explicit_attrib_location", o(ARB_explicit_attrib_location), GL, 2009 },
+ { "GL_ARB_fragment_coord_conventions", o(ARB_fragment_coord_conventions), GL, 2009 },
+ { "GL_ARB_fragment_program", o(ARB_fragment_program), GL, 2002 },
+ { "GL_ARB_fragment_program_shadow", o(ARB_fragment_program_shadow), GL, 2003 },
+ { "GL_ARB_fragment_shader", o(ARB_fragment_shader), GL, 2002 },
+ { "GL_ARB_framebuffer_object", o(ARB_framebuffer_object), GL, 2005 },
+ { "GL_ARB_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 },
+ { "GL_ARB_half_float_pixel", o(ARB_half_float_pixel), GL, 2003 },
+ { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), GL, 2008 },
+ { "GL_ARB_instanced_arrays", o(ARB_instanced_arrays), GL, 2008 },
+ { "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), GL, 2008 },
+ { "GL_ARB_multisample", o(ARB_multisample), GL, 1994 },
+ { "GL_ARB_multitexture", o(ARB_multitexture), GL, 1998 },
+ { "GL_ARB_occlusion_query2", o(ARB_occlusion_query2), GL, 2003 },
+ { "GL_ARB_occlusion_query", o(ARB_occlusion_query), GL, 2001 },
+ { "GL_ARB_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 },
+ { "GL_ARB_point_parameters", o(EXT_point_parameters), GL, 1997 },
+ { "GL_ARB_point_sprite", o(ARB_point_sprite), GL, 2003 },
+ { "GL_ARB_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 },
+ { "GL_ARB_sampler_objects", o(ARB_sampler_objects), GL, 2009 },
+ { "GL_ARB_seamless_cube_map", o(ARB_seamless_cube_map), GL, 2009 },
+ { "GL_ARB_shader_objects", o(ARB_shader_objects), GL, 2002 },
+ { "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
+ { "GL_ARB_shading_language_100", o(ARB_shading_language_100), GL, 2003 },
+ { "GL_ARB_shadow_ambient", o(ARB_shadow_ambient), GL, 2001 },
+ { "GL_ARB_shadow", o(ARB_shadow), GL, 2001 },
+ { "GL_ARB_sync", o(ARB_sync), GL, 2003 },
+ { "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GL, 2000 },
+ { "GL_ARB_texture_buffer_object", o(ARB_texture_buffer_object), GL, 2008 },
+ { "GL_ARB_texture_compression", o(ARB_texture_compression), GL, 2000 },
+ { "GL_ARB_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 },
+ { "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), GL, 1999 },
+ { "GL_ARB_texture_env_add", o(EXT_texture_env_add), GL, 1999 },
+ { "GL_ARB_texture_env_combine", o(ARB_texture_env_combine), GL, 2001 },
+ { "GL_ARB_texture_env_crossbar", o(ARB_texture_env_crossbar), GL, 2001 },
+ { "GL_ARB_texture_env_dot3", o(ARB_texture_env_dot3), GL, 2001 },
+ { "GL_ARB_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL, 2001 },
+ { "GL_ARB_texture_multisample", o(ARB_texture_multisample), GL, 2009 },
+ { "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), GL, 2003 },
+ { "GL_ARB_texture_rectangle", o(NV_texture_rectangle), GL, 2004 },
+ { "GL_ARB_texture_rgb10_a2ui", o(ARB_texture_rgb10_a2ui), GL, 2009 },
+ { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 },
+ { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 },
+ { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 },
+ { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL, 1999 },
+ { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2002 },
+ { "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 },
+ { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), GL, 2006 },
+ { "GL_ARB_vertex_buffer_object", o(ARB_vertex_buffer_object), GL, 2003 },
+ { "GL_ARB_vertex_program", o(ARB_vertex_program), GL, 2002 },
+ { "GL_ARB_vertex_shader", o(ARB_vertex_shader), GL, 2002 },
+ { "GL_ARB_vertex_type_2_10_10_10_rev", o(ARB_vertex_type_2_10_10_10_rev), GL, 2009 },
+ { "GL_ARB_window_pos", o(ARB_window_pos), GL, 2001 },
/* 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_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 },
+ { "GL_EXT_abgr", o(EXT_abgr), GL, 1995 },
+ { "GL_EXT_bgra", o(EXT_bgra), GL, 1995 },
+ { "GL_EXT_blend_color", o(EXT_blend_color), GL, 1995 },
+ { "GL_EXT_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 },
+ { "GL_EXT_blend_func_separate", o(EXT_blend_func_separate), GL, 1999 },
+ { "GL_EXT_blend_logic_op", o(EXT_blend_logic_op), GL, 1995 },
+ { "GL_EXT_blend_minmax", o(EXT_blend_minmax), GL | ES1 | ES2, 1995 },
+ { "GL_EXT_blend_subtract", o(EXT_blend_subtract), GL, 1995 },
+ { "GL_EXT_clip_volume_hint", o(EXT_clip_volume_hint), GL, 1996 },
+ { "GL_EXT_compiled_vertex_array", o(EXT_compiled_vertex_array), GL, 1996 },
+ { "GL_EXT_copy_texture", o(EXT_copy_texture), GL, 1995 },
+ { "GL_EXT_depth_bounds_test", o(EXT_depth_bounds_test), GL, 2002 },
+ { "GL_EXT_draw_buffers2", o(EXT_draw_buffers2), GL, 2006 },
+ { "GL_EXT_draw_instanced", o(ARB_draw_instanced), GL, 2006 },
+ { "GL_EXT_draw_range_elements", o(EXT_draw_range_elements), GL, 1997 },
+ { "GL_EXT_fog_coord", o(EXT_fog_coord), GL, 1999 },
+ { "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), GL, 2005 },
+ { "GL_EXT_framebuffer_multisample", o(EXT_framebuffer_multisample), GL, 2005 },
+ { "GL_EXT_framebuffer_object", o(EXT_framebuffer_object), GL, 2000 },
+ { "GL_EXT_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 },
+ { "GL_EXT_gpu_program_parameters", o(EXT_gpu_program_parameters), GL, 2006 },
+ { "GL_EXT_gpu_shader4", o(EXT_gpu_shader4), GL, 2006 },
+ { "GL_EXT_multi_draw_arrays", o(EXT_multi_draw_arrays), GL | ES1 | ES2, 1999 },
+ { "GL_EXT_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2005 },
+ { "GL_EXT_packed_float", o(EXT_packed_float), GL, 2004 },
+ { "GL_EXT_packed_pixels", o(EXT_packed_pixels), GL, 1997 },
+ { "GL_EXT_paletted_texture", o(EXT_paletted_texture), GL, 1995 },
+ { "GL_EXT_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 },
+ { "GL_EXT_point_parameters", o(EXT_point_parameters), GL, 1997 },
+ { "GL_EXT_polygon_offset", o(EXT_polygon_offset), GL, 1995 },
+ { "GL_EXT_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 },
+ { "GL_EXT_rescale_normal", o(EXT_rescale_normal), GL, 1997 },
+ { "GL_EXT_secondary_color", o(EXT_secondary_color), GL, 1999 },
+ { "GL_EXT_separate_shader_objects", o(EXT_separate_shader_objects), GL, 2008 },
+ { "GL_EXT_separate_specular_color", o(EXT_separate_specular_color), GL, 1997 },
+ { "GL_EXT_shadow_funcs", o(EXT_shadow_funcs), GL, 2002 },
+ { "GL_EXT_shared_texture_palette", o(EXT_shared_texture_palette), GL, 2000 },
+ { "GL_EXT_stencil_two_side", o(EXT_stencil_two_side), GL, 2001 },
+ { "GL_EXT_stencil_wrap", o(EXT_stencil_wrap), GL, 2002 },
+ { "GL_EXT_subtexture", o(EXT_subtexture), GL, 1995 },
+ { "GL_EXT_texture3D", o(EXT_texture3D), GL, 1996 },
+ { "GL_EXT_texture_array", o(EXT_texture_array), GL, 2006 },
+ { "GL_EXT_texture_compression_dxt1", o(EXT_texture_compression_s3tc), GL | ES1 | ES2, 2004 },
+ { "GL_EXT_texture_compression_latc", o(EXT_texture_compression_latc), GL, 2006 },
+ { "GL_EXT_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 },
+ { "GL_EXT_texture_compression_s3tc", o(EXT_texture_compression_s3tc), GL, 2000 },
+ { "GL_EXT_texture_cube_map", o(ARB_texture_cube_map), GL, 2001 },
+ { "GL_EXT_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL, 1997 },
+ { "GL_EXT_texture_env_add", o(EXT_texture_env_add), GL, 1999 },
+ { "GL_EXT_texture_env_combine", o(EXT_texture_env_combine), GL, 2006 },
+ { "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL, 2000 },
+ { "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2, 1999 },
+ { "GL_EXT_texture_format_BGRA8888", o(EXT_texture_format_BGRA8888), ES1 | ES2, 2009 },
+ { "GL_EXT_texture_integer", o(EXT_texture_integer), GL, 2006 },
+ { "GL_EXT_texture_lod_bias", o(EXT_texture_lod_bias), GL | ES1, 1999 },
+ { "GL_EXT_texture_mirror_clamp", o(EXT_texture_mirror_clamp), GL, 2004 },
+ { "GL_EXT_texture_object", o(EXT_texture_object), GL, 1995 },
+ { "GL_EXT_texture", o(EXT_texture), GL, 1996 },
+ { "GL_EXT_texture_rectangle", o(NV_texture_rectangle), GL, 2004 },
+ { "GL_EXT_texture_shared_exponent", o(EXT_texture_shared_exponent), GL, 2004 },
+ { "GL_EXT_texture_sRGB", o(EXT_texture_sRGB), GL, 2004 },
+ { "GL_EXT_texture_sRGB_decode", o(EXT_texture_sRGB_decode), GL, 2006 },
+ { "GL_EXT_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 },
+ { "GL_EXT_texture_type_2_10_10_10_REV", o(dummy_true), ES2, 2008 },
+ { "GL_EXT_timer_query", o(EXT_timer_query), GL, 2006 },
+ { "GL_EXT_transform_feedback", o(EXT_transform_feedback), GL, 2011 },
+ { "GL_EXT_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 },
+ { "GL_EXT_vertex_array", o(EXT_vertex_array), GL, 1995 },
+ { "GL_EXT_vertex_array_set", o(EXT_vertex_array_set), GL, 1997 },
/* 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 },
+ { "GL_OES_blend_equation_separate", o(EXT_blend_equation_separate), ES1, 2009 },
+ { "GL_OES_blend_func_separate", o(EXT_blend_func_separate), ES1, 2009 },
+ { "GL_OES_blend_subtract", o(EXT_blend_subtract), ES1, 2009 },
+ { "GL_OES_byte_coordinates", o(dummy_true), ES1, 2002 },
+ { "GL_OES_compressed_paletted_texture", o(dummy_false), DISABLE, 2003 },
+ { "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
+ { "GL_OES_depth32", o(dummy_false), DISABLE, 2005 },
+ { "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 },
#if FEATURE_OES_draw_texture
- { "GL_OES_draw_texture", o(OES_draw_texture), ES1 | ES2 },
+ { "GL_OES_draw_texture", o(OES_draw_texture), ES1 | ES2, 2004 },
#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 },
+ { "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 },
+#endif
+ { "GL_OES_element_index_uint", o(EXT_vertex_array), ES1 | ES2, 2005 },
+ { "GL_OES_fbo_render_mipmap", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
+ { "GL_OES_fixed_point", o(dummy_true), ES1, 2002 },
+ { "GL_OES_framebuffer_object", o(EXT_framebuffer_object), ES1, 2005 },
+ { "GL_OES_mapbuffer", o(ARB_vertex_buffer_object), ES1 | ES2, 2005 },
+ { "GL_OES_matrix_get", o(dummy_true), ES1, 2004 },
+ { "GL_OES_packed_depth_stencil", o(EXT_packed_depth_stencil), ES1 | ES2, 2007 },
+ { "GL_OES_point_size_array", o(dummy_true), ES1, 2004 },
+ { "GL_OES_point_sprite", o(ARB_point_sprite), ES1, 2004 },
+ { "GL_OES_query_matrix", o(dummy_true), ES1, 2003 },
+ { "GL_OES_read_format", o(OES_read_format), GL | ES1, 2003 },
+ { "GL_OES_rgb8_rgba8", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
+ { "GL_OES_single_precision", o(dummy_true), ES1, 2003 },
+ { "GL_OES_standard_derivatives", o(OES_standard_derivatives), ES2, 2005 },
+ { "GL_OES_stencil1", o(dummy_false), DISABLE, 2005 },
+ { "GL_OES_stencil4", o(dummy_false), DISABLE, 2005 },
+ { "GL_OES_stencil8", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
+ { "GL_OES_stencil_wrap", o(EXT_stencil_wrap), ES1, 2002 },
+ { "GL_OES_texture_3D", o(EXT_texture3D), ES2, 2005 },
+ { "GL_OES_texture_cube_map", o(ARB_texture_cube_map), ES1, 2007 },
+ { "GL_OES_texture_env_crossbar", o(ARB_texture_env_crossbar), ES1, 2005 },
+ { "GL_OES_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), ES1, 2005 },
+ { "GL_OES_texture_npot", o(ARB_texture_non_power_of_two), ES2, 2005 },
/* 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_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_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 },
+ { "GL_3DFX_texture_compression_FXT1", o(TDFX_texture_compression_FXT1), GL, 1999 },
+ { "GL_AMD_conservative_depth", o(AMD_conservative_depth), GL, 2009 },
+ { "GL_APPLE_client_storage", o(APPLE_client_storage), GL, 2002 },
+ { "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 },
+ { "GL_APPLE_packed_pixels", o(APPLE_packed_pixels), GL, 2002 },
+ { "GL_APPLE_vertex_array_object", o(APPLE_vertex_array_object), GL, 2002 },
+ { "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 },
+ { "GL_ATI_envmap_bumpmap", o(ATI_envmap_bumpmap), GL, 2001 },
+ { "GL_ATI_fragment_shader", o(ATI_fragment_shader), GL, 2001 },
+ { "GL_ATI_separate_stencil", o(ATI_separate_stencil), GL, 2006 },
+ { "GL_ATI_texture_compression_3dc", o(ATI_texture_compression_3dc), GL, 2004 },
+ { "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), GL, 2002 },
+ { "GL_ATI_texture_mirror_once", o(ATI_texture_mirror_once), GL, 2006 },
+ { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), GL, 1998 },
+ { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GL, 1996 },
+ { "GL_IBM_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL, 1998 },
+ { "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GL, 1999 },
+ { "GL_MESA_pack_invert", o(MESA_pack_invert), GL, 2002 },
+ { "GL_MESA_resize_buffers", o(MESA_resize_buffers), GL, 1999 },
+ { "GL_MESA_texture_array", o(MESA_texture_array), GL, 2007 },
+ { "GL_MESA_texture_signed_rgba", o(MESA_texture_signed_rgba), GL, 2009 },
+ { "GL_MESA_window_pos", o(ARB_window_pos), GL, 2000 },
+ { "GL_MESAX_texture_float", o(ARB_texture_float), GL, 2009 },
+ { "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), GL, 2002 },
+ { "GL_NV_blend_square", o(NV_blend_square), GL, 1999 },
+ { "GL_NV_conditional_render", o(NV_conditional_render), GL, 2008 },
+ { "GL_NV_depth_clamp", o(ARB_depth_clamp), GL, 2001 },
+ { "GL_NV_fragment_program", o(NV_fragment_program), GL, 2001 },
+ { "GL_NV_fragment_program_option", o(NV_fragment_program_option), GL, 2005 },
+ { "GL_NV_light_max_exponent", o(NV_light_max_exponent), GL, 1999 },
+ { "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 },
+ { "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 },
+ { "GL_NV_primitive_restart", o(NV_primitive_restart), GL, 2002 },
+ { "GL_NV_texgen_reflection", o(NV_texgen_reflection), GL, 1999 },
+ { "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 },
+ { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GL, 1999 },
+ { "GL_NV_texture_rectangle", o(NV_texture_rectangle), GL, 2000 },
+ { "GL_NV_vertex_program1_1", o(NV_vertex_program1_1), GL, 2001 },
+ { "GL_NV_vertex_program", o(NV_vertex_program), GL, 2000 },
+ { "GL_S3_s3tc", o(S3_s3tc), GL, 1999 },
+ { "GL_SGIS_generate_mipmap", o(SGIS_generate_mipmap), GL, 1997 },
+ { "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GL, 1997 },
+ { "GL_SGIS_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL, 1997 },
+ { "GL_SGIS_texture_lod", o(SGIS_texture_lod), GL, 1997 },
+ { "GL_SUN_multi_draw_arrays", o(EXT_multi_draw_arrays), GL, 1999 },
+
+ { 0, 0, 0, 0 },
};
@@ -448,6 +455,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;
@@ -483,6 +491,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;
@@ -818,6 +827,34 @@ _mesa_init_extensions( struct gl_context *ctx )
}
+typedef unsigned short extension_index;
+
+
+/**
+ * Compare two entries of the extensions table. Sorts first by year,
+ * then by name.
+ *
+ * Arguments are indices into extension_table.
+ */
+static int
+extension_compare(const void *p1, const void *p2)
+{
+ extension_index i1 = * (const extension_index *) p1;
+ extension_index i2 = * (const extension_index *) p2;
+ const struct extension *e1 = &extension_table[i1];
+ const struct extension *e2 = &extension_table[i2];
+ int res;
+
+ res = (int)e1->year - (int)e2->year;
+
+ if (res == 0) {
+ res = strcmp(e1->name, e2->name);
+ }
+
+ return res;
+}
+
+
/**
* Construct the GL_EXTENSIONS string. Called the first time that
* glGetString(GL_EXTENSIONS) is called.
@@ -829,15 +866,23 @@ _mesa_make_extension_string(struct gl_context *ctx)
char *exts = 0;
/* Length of extension string. */
size_t length = 0;
+ /* Number of extensions */
+ unsigned count;
+ /* Indices of the extensions sorted by year */
+ extension_index *extension_indices;
/* String of extra extensions. */
char *extra_extensions = get_extension_override(ctx);
GLboolean *base = (GLboolean *) &ctx->Extensions;
const struct extension *i;
+ unsigned j;
+
/* Compute length of the extension string. */
+ count = 0;
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 */
+ ++count;
}
}
if (extra_extensions != NULL)
@@ -849,13 +894,35 @@ _mesa_make_extension_string(struct gl_context *ctx)
return NULL;
}
- /* Build the extension string.*/
+ extension_indices = malloc(count * sizeof extension_indices);
+ if (extension_indices == NULL) {
+ free(exts);
+ free(extra_extensions);
+ return NULL;
+ }
+
+ /* Sort extensions in chronological order because certain old applications (e.g.,
+ * Quake3 demo) store the extension list in a static size buffer so chronologically
+ * order ensure that the extensions that such applications expect will fit into
+ * that buffer.
+ */
+ j = 0;
for (i = extension_table; i->name != 0; ++i) {
if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
- strcat(exts, i->name);
- strcat(exts, " ");
+ extension_indices[j++] = i - extension_table;
}
}
+ assert(j == count);
+ qsort(extension_indices, count, sizeof *extension_indices, extension_compare);
+
+ /* Build the extension string.*/
+ for (j = 0; j < count; ++j) {
+ i = &extension_table[extension_indices[j]];
+ assert(base[i->offset] && (i->api_set & (1 << ctx->API)));
+ strcat(exts, i->name);
+ strcat(exts, " ");
+ }
+ free(extension_indices);
if (extra_extensions != 0) {
strcat(exts, extra_extensions);
free(extra_extensions);
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index c242e56..ffdd084 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -384,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);
@@ -1115,6 +1116,31 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
}
+/**
+ * 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
@@ -1207,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);
+ }
}
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/ff_fragment_shader.cpp
index c1380f2..9be5317 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -26,6 +26,7 @@
*
**************************************************************************/
+extern "C" {
#include "glheader.h"
#include "imports.h"
#include "mtypes.h"
@@ -37,7 +38,7 @@
#include "program/prog_statevars.h"
#include "program/programopt.h"
#include "texenvprogram.h"
-
+}
/*
* Note on texture units:
@@ -524,7 +525,7 @@ struct ureg {
static const struct ureg undef = {
PROGRAM_UNDEFINED,
- ~0,
+ 255,
0,
0,
0
@@ -686,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);
}
@@ -1586,6 +1588,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key,
}
}
+extern "C" {
/**
* Return a fragment program which implements the current
@@ -1616,3 +1619,5 @@ _mesa_get_fixed_func_fragment_program(struct gl_context *ctx)
return prog;
}
+
+}
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 947db84..db10c9b 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -927,6 +927,42 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
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 */
+ },
};
@@ -1570,6 +1606,10 @@ _mesa_format_to_type_and_comps(gl_format format,
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;
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index e21967e..04a1893 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -185,6 +185,14 @@ typedef enum
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;
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 8916441..430e013 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -889,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/get.c b/src/mesa/main/get.c
index 336304c..7d1a5cf 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1201,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 */
diff --git a/src/mesa/main/glapidispatch.h b/src/mesa/main/glapidispatch.h
index b5144b0..cbfe640 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 891
+#define _gloffset_COUNT 892
#define _gloffset_NewList 0
#define _gloffset_EndList 1
@@ -948,17 +948,18 @@
#define _gloffset_ActiveProgramEXT 881
#define _gloffset_CreateShaderProgramEXT 882
#define _gloffset_UseShaderProgramEXT 883
-#define _gloffset_StencilFuncSeparateATI 884
-#define _gloffset_ProgramEnvParameters4fvEXT 885
-#define _gloffset_ProgramLocalParameters4fvEXT 886
-#define _gloffset_GetQueryObjecti64vEXT 887
-#define _gloffset_GetQueryObjectui64vEXT 888
-#define _gloffset_EGLImageTargetRenderbufferStorageOES 889
-#define _gloffset_EGLImageTargetTexture2DOES 890
+#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 483
+#define driDispatchRemapTable_size 484
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -1437,13 +1438,14 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define ActiveProgramEXT_remap_index 473
#define CreateShaderProgramEXT_remap_index 474
#define UseShaderProgramEXT_remap_index 475
-#define StencilFuncSeparateATI_remap_index 476
-#define ProgramEnvParameters4fvEXT_remap_index 477
-#define ProgramLocalParameters4fvEXT_remap_index 478
-#define GetQueryObjecti64vEXT_remap_index 479
-#define GetQueryObjectui64vEXT_remap_index 480
-#define EGLImageTargetRenderbufferStorageOES_remap_index 481
-#define EGLImageTargetTexture2DOES_remap_index 482
+#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]
@@ -1921,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]
@@ -4583,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 08ad5f3..0df8119 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/image.c b/src/mesa/main/image.c
index 6393613..bbde380 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -743,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:
@@ -1025,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;
}
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index bf89815..f262b25 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -930,14 +930,20 @@ _mesa_problem( const struct gl_context *ctx, const char *fmtString, ... )
{
va_list args;
char str[MAXSTRING];
+ static int numCalls = 0;
+
(void) ctx;
- va_start( args, fmtString );
- vsnprintf( str, MAXSTRING, fmtString, args );
- va_end( args );
+ if (numCalls < 50) {
+ numCalls++;
- fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
- fprintf(stderr, "Please report at bugs.freedesktop.org\n");
+ va_start( args, fmtString );
+ vsnprintf( str, MAXSTRING, fmtString, args );
+ va_end( args );
+ fprintf(stderr, "Mesa %s implementation error: %s\n",
+ MESA_VERSION_STRING, str);
+ fprintf(stderr, "Please report at bugs.freedesktop.org\n");
+ }
}
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 0727e18..e594160 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1764,8 +1764,13 @@ _mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
} 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 db3eba2..831774f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -85,7 +85,7 @@
typedef GLuint64 GLbitfield64;
/** Set a single bit */
-#define BITFIELD64_BIT(b) (1ULL << (b))
+#define BITFIELD64_BIT(b) ((GLbitfield64)1 << (b))
/**
@@ -2376,6 +2376,8 @@ struct gl_renderbuffer
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;
@@ -2561,7 +2563,7 @@ struct gl_precision
/**
- * Limits for vertex and fragment programs/shaders.
+ * Limits for vertex, geometry and fragment programs/shaders.
*/
struct gl_program_constants
{
@@ -2587,14 +2589,7 @@ 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;
@@ -2617,6 +2612,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 */
@@ -2656,7 +2652,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) */
@@ -2800,6 +2803,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;
@@ -2825,6 +2829,7 @@ struct gl_extensions
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;
@@ -2843,6 +2848,7 @@ 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;
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index fa35c6c..e9cf5f6 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -218,6 +218,7 @@ _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);
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index 07e8719..61530df 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -70,4706 +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]: DepthRangef (will be remapped) */
+ /* _mesa_function_pool[6720]: DepthRangef (will be remapped) */
"ff\0"
"glDepthRangef\0"
"\0"
- /* _mesa_function_pool[6751]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[6738]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[6785]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[6772]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[6812]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6799]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6840]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[6827]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[6875]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[6862]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[6903]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[6890]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[6923]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[6910]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[6943]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[6930]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[6963]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6950]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6989]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6976]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[7017]: Scissor (offset 176) */
+ /* _mesa_function_pool[7004]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[7033]: Fogf (offset 153) */
+ /* _mesa_function_pool[7020]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[7044]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[7031]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[7089]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[7076]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[7133]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[7120]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[7174]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[7161]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[7190]: Color4usv (offset 40) */
+ /* _mesa_function_pool[7177]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[7205]: Fogi (offset 155) */
+ /* _mesa_function_pool[7192]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[7216]: DepthRange (offset 288) */
+ /* _mesa_function_pool[7203]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[7233]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[7220]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[7251]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[7238]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[7280]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[7267]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[7297]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[7284]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[7315]: Color4ui (offset 37) */
+ /* _mesa_function_pool[7302]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[7332]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[7319]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[7351]: Color3usv (offset 24) */
+ /* _mesa_function_pool[7338]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[7366]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[7353]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[7386]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[7373]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[7403]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7390]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7452]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[7439]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[7469]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[7456]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[7488]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[7475]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[7507]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[7494]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[7538]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[7525]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[7590]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[7577]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[7607]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[7594]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[7656]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[7643]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[7712]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7699]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7743]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[7730]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[7797]: Color4us (offset 39) */
+ /* _mesa_function_pool[7784]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[7814]: 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[7904]: Color3bv (offset 10) */
+ /* _mesa_function_pool[7891]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[7918]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[7905]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[7973]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7960]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[8019]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[8006]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[8049]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[8036]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[8086]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[8073]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[8115]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8102]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[8157]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[8144]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[8210]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[8197]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[8225]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[8212]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[8247]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[8234]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[8277]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[8264]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[8324]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[8311]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[8368]: ColorTable (offset 339) */
+ /* _mesa_function_pool[8355]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[8421]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[8408]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[8441]: Accum (offset 213) */
+ /* _mesa_function_pool[8428]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[8453]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[8440]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[8474]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[8461]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[8506]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[8493]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[8562]: Finish (offset 216) */
+ /* _mesa_function_pool[8549]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[8573]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[8560]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[8597]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[8584]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[8615]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[8602]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[8658]: Uniform4uivEXT (will be remapped) */
+ /* _mesa_function_pool[8645]: Uniform4uivEXT (will be remapped) */
"iip\0"
"glUniform4uivEXT\0"
"glUniform4uiv\0"
"\0"
- /* _mesa_function_pool[8694]: HintPGI (dynamic) */
+ /* _mesa_function_pool[8681]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[8708]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[8695]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[8766]: Color4s (offset 33) */
+ /* _mesa_function_pool[8753]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[8782]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[8769]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[8807]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[8794]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[8825]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[8812]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[8842]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[8829]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[8857]: CullParameterdvEXT (dynamic) */
+ /* _mesa_function_pool[8844]: CullParameterdvEXT (dynamic) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[8882]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[8869]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[8919]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8906]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[8948]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[8935]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[9005]: Color4i (offset 31) */
+ /* _mesa_function_pool[8992]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[9021]: Color4f (offset 29) */
+ /* _mesa_function_pool[9008]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[9037]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[9024]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[9055]: Color4d (offset 27) */
+ /* _mesa_function_pool[9042]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[9071]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[9058]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[9087]: Color4b (offset 25) */
+ /* _mesa_function_pool[9074]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[9103]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[9090]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[9120]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[9107]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[9150]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[9137]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[9168]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[9155]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[9226]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[9213]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[9247]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[9234]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[9266]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[9253]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[9293]: BeginTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[9280]: BeginTransformFeedbackEXT (will be remapped) */
"i\0"
"glBeginTransformFeedbackEXT\0"
"glBeginTransformFeedback\0"
"\0"
- /* _mesa_function_pool[9349]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[9336]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[9371]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[9358]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[9387]: EndList (offset 1) */
+ /* _mesa_function_pool[9374]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[9399]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[9386]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[9423]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[9410]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[9453]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[9440]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[9487]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[9474]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[9505]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[9492]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[9556]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[9543]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[9575]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[9562]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[9590]: GenTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[9577]: GenTransformFeedbacks (will be remapped) */
"ip\0"
"glGenTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[9618]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[9605]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[9646]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[9633]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[9702]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[9689]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[9730]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[9717]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[9748]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[9735]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[9796]: BlendFunciARB (will be remapped) */
+ /* _mesa_function_pool[9783]: BlendFunciARB (will be remapped) */
"iii\0"
"glBlendFunciARB\0"
"\0"
- /* _mesa_function_pool[9817]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9804]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9856]: GetTexParameterIivEXT (will be remapped) */
+ /* _mesa_function_pool[9843]: GetTexParameterIivEXT (will be remapped) */
"iip\0"
"glGetTexParameterIivEXT\0"
"glGetTexParameterIiv\0"
"\0"
- /* _mesa_function_pool[9906]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[9893]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[9924]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[9911]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[9976]: ReleaseShaderCompiler (will be remapped) */
+ /* _mesa_function_pool[9963]: ReleaseShaderCompiler (will be remapped) */
"\0"
"glReleaseShaderCompiler\0"
"\0"
- /* _mesa_function_pool[10002]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[9989]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[10036]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[10023]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[10064]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[10051]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[10110]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10097]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10136]: GetInteger64i_v (will be remapped) */
+ /* _mesa_function_pool[10123]: GetInteger64i_v (will be remapped) */
"iip\0"
"glGetInteger64i_v\0"
"\0"
- /* _mesa_function_pool[10159]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[10146]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[10174]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[10161]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[10201]: Color3us (offset 23) */
+ /* _mesa_function_pool[10188]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[10217]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[10204]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[10252]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[10239]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[10295]: End (offset 43) */
+ /* _mesa_function_pool[10282]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[10303]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[10290]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[10328]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[10315]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[10354]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[10341]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[10384]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[10371]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[10429]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[10416]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[10475]: Color3ub (offset 19) */
+ /* _mesa_function_pool[10462]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[10491]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[10478]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[10523]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[10510]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[10548]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10535]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10583]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[10570]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[10606]: GetUniformuivEXT (will be remapped) */
+ /* _mesa_function_pool[10593]: GetUniformuivEXT (will be remapped) */
"iip\0"
"glGetUniformuivEXT\0"
"glGetUniformuiv\0"
"\0"
- /* _mesa_function_pool[10646]: Color3ui (offset 21) */
+ /* _mesa_function_pool[10633]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[10662]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[10649]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[10679]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[10666]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[10725]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[10712]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[10752]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[10739]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[10788]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[10775]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[10804]: GetTransformFeedbackVaryingEXT (will be remapped) */
+ /* _mesa_function_pool[10791]: GetTransformFeedbackVaryingEXT (will be remapped) */
"iiipppp\0"
"glGetTransformFeedbackVaryingEXT\0"
"glGetTransformFeedbackVarying\0"
"\0"
- /* _mesa_function_pool[10876]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[10863]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[10919]: ShaderBinary (will be remapped) */
+ /* _mesa_function_pool[10906]: ShaderBinary (will be remapped) */
"ipipi\0"
"glShaderBinary\0"
"\0"
- /* _mesa_function_pool[10941]: GetIntegerIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[10928]: GetIntegerIndexedvEXT (will be remapped) */
"iip\0"
"glGetIntegerIndexedvEXT\0"
"glGetIntegeri_v\0"
"\0"
- /* _mesa_function_pool[10986]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[10973]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[11032]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[11019]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[11065]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[11052]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[11089]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[11076]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[11114]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[11101]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[11167]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[11154]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[11224]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[11211]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[11262]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[11249]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[11287]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[11274]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[11330]: VertexAttribI4usvEXT (will be remapped) */
+ /* _mesa_function_pool[11317]: VertexAttribI4usvEXT (will be remapped) */
"ip\0"
"glVertexAttribI4usvEXT\0"
"glVertexAttribI4usv\0"
"\0"
- /* _mesa_function_pool[11377]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11364]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11441]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[11428]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[11485]: GetError (offset 261) */
+ /* _mesa_function_pool[11472]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[11498]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[11485]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[11517]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[11504]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[11534]: Indexdv (offset 45) */
+ /* _mesa_function_pool[11521]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[11547]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[11534]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[11603]: Normal3s (offset 60) */
+ /* _mesa_function_pool[11590]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[11619]: GetObjectParameterivAPPLE (will be remapped) */
+ /* _mesa_function_pool[11606]: GetObjectParameterivAPPLE (will be remapped) */
"iiip\0"
"glGetObjectParameterivAPPLE\0"
"\0"
- /* _mesa_function_pool[11653]: PushName (offset 201) */
+ /* _mesa_function_pool[11640]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[11667]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[11654]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[11712]: CullParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[11699]: CullParameterfvEXT (dynamic) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[11737]: Normal3i (offset 58) */
+ /* _mesa_function_pool[11724]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[11753]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[11740]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[11788]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[11775]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[11845]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[11832]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[11888]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[11875]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[11917]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[11904]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[11967]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[11954]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[12001]: Normal3b (offset 52) */
+ /* _mesa_function_pool[11988]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[12017]: Normal3d (offset 54) */
+ /* _mesa_function_pool[12004]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[12033]: Uniform1uiEXT (will be remapped) */
+ /* _mesa_function_pool[12020]: Uniform1uiEXT (will be remapped) */
"ii\0"
"glUniform1uiEXT\0"
"glUniform1ui\0"
"\0"
- /* _mesa_function_pool[12066]: Normal3f (offset 56) */
+ /* _mesa_function_pool[12053]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[12082]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[12069]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[12127]: Indexi (offset 48) */
+ /* _mesa_function_pool[12114]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[12139]: EGLImageTargetTexture2DOES (will be remapped) */
+ /* _mesa_function_pool[12126]: EGLImageTargetTexture2DOES (will be remapped) */
"ip\0"
"glEGLImageTargetTexture2DOES\0"
"\0"
- /* _mesa_function_pool[12172]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[12159]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[12200]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[12187]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[12221]: 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[12267]: DepthMask (offset 211) */
+ /* _mesa_function_pool[12293]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[12282]: IsShader (will be remapped) */
+ /* _mesa_function_pool[12308]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[12296]: Indexf (offset 46) */
+ /* _mesa_function_pool[12322]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[12308]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[12334]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[12346]: Indexd (offset 44) */
+ /* _mesa_function_pool[12372]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[12358]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[12384]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[12379]: StencilOp (offset 244) */
+ /* _mesa_function_pool[12405]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[12396]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[12422]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[12418]: FramebufferTextureLayer (dynamic) */
+ /* _mesa_function_pool[12444]: FramebufferTextureLayer (dynamic) */
"iiiii\0"
"glFramebufferTextureLayerARB\0"
"\0"
- /* _mesa_function_pool[12454]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[12480]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[12499]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[12525]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[12515]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[12541]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[12561]: Indexs (offset 50) */
+ /* _mesa_function_pool[12587]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[12573]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[12599]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[12593]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[12619]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[12615]: BlendFuncSeparateiARB (will be remapped) */
+ /* _mesa_function_pool[12641]: BlendFuncSeparateiARB (will be remapped) */
"iiiii\0"
"glBlendFuncSeparateiARB\0"
"\0"
- /* _mesa_function_pool[12646]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[12672]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[12684]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[12710]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[12716]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[12742]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[12743]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[12769]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[12758]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[12784]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[12775]: VertexAttribI1uivEXT (will be remapped) */
+ /* _mesa_function_pool[12801]: VertexAttribI1uivEXT (will be remapped) */
"ip\0"
"glVertexAttribI1uivEXT\0"
"glVertexAttribI1uiv\0"
"\0"
- /* _mesa_function_pool[12822]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[12848]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[12837]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[12863]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[12890]: Color4bv (offset 26) */
+ /* _mesa_function_pool[12916]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[12904]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[12930]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[12926]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[12952]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[12974]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[13000]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[12999]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[13025]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[13047]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[13073]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[13071]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[13097]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[13106]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[13132]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[13124]: LogicOp (offset 242) */
+ /* _mesa_function_pool[13150]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[13137]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[13163]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[13161]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[13187]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[13176]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[13202]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[13252]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[13278]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[13269]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[13295]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[13289]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[13315]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[13316]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[13342]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[13361]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[13387]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[13376]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[13402]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[13408]: VertexAttribI4svEXT (will be remapped) */
+ /* _mesa_function_pool[13434]: VertexAttribI4svEXT (will be remapped) */
"ip\0"
"glVertexAttribI4svEXT\0"
"glVertexAttribI4sv\0"
"\0"
- /* _mesa_function_pool[13453]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[13479]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[13481]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[13507]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[13505]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[13531]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[13566]: ClearBufferuiv (will be remapped) */
+ /* _mesa_function_pool[13592]: ClearBufferuiv (will be remapped) */
"iip\0"
"glClearBufferuiv\0"
"\0"
- /* _mesa_function_pool[13588]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[13614]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[13612]: GenTextures (offset 328) */
+ /* _mesa_function_pool[13638]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[13647]: FramebufferTextureARB (will be remapped) */
+ /* _mesa_function_pool[13673]: FramebufferTextureARB (will be remapped) */
"iiii\0"
"glFramebufferTextureARB\0"
"\0"
- /* _mesa_function_pool[13677]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[13703]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[13694]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[13720]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[13750]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[13776]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[13789]: MultiModeDrawArraysIBM (will be remapped) */
- "pppii\0"
- "glMultiModeDrawArraysIBM\0"
- "\0"
- /* _mesa_function_pool[13821]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[13815]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[13854]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[13848]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[13876]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[13870]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[13904]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[13898]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[13922]: GetCombinerOutputParameterfvNV (will be remapped) */
- "iiip\0"
- "glGetCombinerOutputParameterfvNV\0"
- "\0"
- /* _mesa_function_pool[13961]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[13916]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[13979]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[13934]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[13994]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[13949]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[14010]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[13965]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[14027]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[13982]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[14051]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[14006]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[14068]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[14023]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[14123]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[14078]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[14138]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[14093]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[14157]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[14112]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[14186]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[14141]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[14229]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[14184]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[14273]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[14228]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[14289]: EndTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[14244]: EndTransformFeedbackEXT (will be remapped) */
"\0"
"glEndTransformFeedbackEXT\0"
"glEndTransformFeedback\0"
"\0"
- /* _mesa_function_pool[14340]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[14295]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[14374]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[14329]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[14403]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[14358]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[14448]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[14403]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[14504]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[14459]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[14525]: GetShaderPrecisionFormat (will be remapped) */
+ /* _mesa_function_pool[14480]: GetShaderPrecisionFormat (will be remapped) */
"iipp\0"
"glGetShaderPrecisionFormat\0"
"\0"
- /* _mesa_function_pool[14558]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[14513]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[14588]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[14543]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[14623]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[14578]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[14642]: Flush (offset 217) */
+ /* _mesa_function_pool[14597]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[14652]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[14607]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[14667]: VertexAttribI4iEXT (will be remapped) */
+ /* _mesa_function_pool[14622]: VertexAttribI4iEXT (will be remapped) */
"iiiii\0"
"glVertexAttribI4iEXT\0"
"glVertexAttribI4i\0"
"\0"
- /* _mesa_function_pool[14713]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[14668]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[14735]: Uniform3uivEXT (will be remapped) */
+ /* _mesa_function_pool[14690]: Uniform3uivEXT (will be remapped) */
"iip\0"
"glUniform3uivEXT\0"
"glUniform3uiv\0"
"\0"
- /* _mesa_function_pool[14771]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[14726]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[14789]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[14744]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[14832]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[14787]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[14856]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[14811]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[14872]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[14827]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[14890]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[14845]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[14932]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[14887]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[14954]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[14909]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[14974]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[14929]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15015]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[14970]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[15070]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[15025]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[15088]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[15043]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[15112]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[15067]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[15130]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[15085]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[15148]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[15103]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[15202]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[15157]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[15244]: Color4ub (offset 35) */
+ /* _mesa_function_pool[15199]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[15261]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[15216]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[15281]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[15236]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[15310]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[15265]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[15328]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[15283]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[15388]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[15343]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[15407]: Indexiv (offset 49) */
+ /* _mesa_function_pool[15362]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[15420]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[15375]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[15438]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[15393]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[15482]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[15437]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[15542]: Frustum (offset 289) */
+ /* _mesa_function_pool[15497]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[15560]: GetString (offset 275) */
+ /* _mesa_function_pool[15515]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[15575]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[15530]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[15601]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[15556]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[15616]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[15571]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[15634]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[15589]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[15664]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[15619]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[15682]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[15637]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[15727]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[15682]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[15771]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[15726]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[15814]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[15769]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[15855]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[15810]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[15883]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[15838]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[15918]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[15873]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[15936]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[15891]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[15967]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15922]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[16001]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[15956]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[16026]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[15981]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[16082]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[16037]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[16101]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[16056]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[16117]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[16072]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[16165]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[16120]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[16211]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[16166]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[16228]: VertexAttribI4uiEXT (will be remapped) */
+ /* _mesa_function_pool[16183]: VertexAttribI4uiEXT (will be remapped) */
"iiiii\0"
"glVertexAttribI4uiEXT\0"
"glVertexAttribI4ui\0"
"\0"
- /* _mesa_function_pool[16276]: GetFragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[16231]: GetFragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[16309]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[16264]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[16336]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16291]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[16363]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[16318]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[16400]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[16355]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[16420]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[16375]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[16441]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[16396]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[16468]: Rectd (offset 86) */
+ /* _mesa_function_pool[16423]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[16482]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16437]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[16508]: SampleMaskSGIS (will be remapped) */
- "fi\0"
- "glSampleMaskSGIS\0"
- "glSampleMaskEXT\0"
+ /* _mesa_function_pool[16463]: TextureBarrierNV (will be remapped) */
"\0"
- /* _mesa_function_pool[16545]: VertexAttribI4ubvEXT (will be remapped) */
+ "glTextureBarrierNV\0"
+ "\0"
+ /* _mesa_function_pool[16484]: VertexAttribI4ubvEXT (will be remapped) */
"ip\0"
"glVertexAttribI4ubvEXT\0"
"glVertexAttribI4ubv\0"
"\0"
- /* _mesa_function_pool[16592]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[16531]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[16639]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[16578]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[16658]: BlendEquationSeparateiARB (will be remapped) */
- "iii\0"
- "glBlendEquationSeparateiARB\0"
- "\0"
- /* _mesa_function_pool[16691]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[16597]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[16736]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16642]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[16761]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[16667]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[16791]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[16697]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[16838]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[16744]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[16886]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[16792]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[16944]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[16850]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[16978]: Lightfv (offset 160) */
+ /* _mesa_function_pool[16884]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[16993]: PrimitiveRestartIndexNV (will be remapped) */
+ /* _mesa_function_pool[16899]: PrimitiveRestartIndexNV (will be remapped) */
"i\0"
"glPrimitiveRestartIndexNV\0"
"glPrimitiveRestartIndex\0"
"\0"
- /* _mesa_function_pool[17046]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[16952]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[17062]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[16968]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[17082]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[16988]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[17104]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[17010]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[17147]: Color4fv (offset 30) */
+ /* _mesa_function_pool[17053]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[17161]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[17067]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[17206]: ProgramLocalParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[17112]: ProgramLocalParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[17243]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[17149]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[17264]: Rects (offset 92) */
+ /* _mesa_function_pool[17170]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[17278]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[17184]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[17312]: CreateShaderProgramEXT (will be remapped) */
+ /* _mesa_function_pool[17218]: CreateShaderProgramEXT (will be remapped) */
"ip\0"
"glCreateShaderProgramEXT\0"
"\0"
- /* _mesa_function_pool[17341]: ActiveProgramEXT (will be remapped) */
+ /* _mesa_function_pool[17247]: ActiveProgramEXT (will be remapped) */
"i\0"
"glActiveProgramEXT\0"
"\0"
- /* _mesa_function_pool[17363]: Lightiv (offset 162) */
+ /* _mesa_function_pool[17269]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[17378]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[17284]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[17422]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[17328]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[17470]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[17376]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[17495]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[17401]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[17519]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[17425]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[17564]: ClearBufferfv (will be remapped) */
+ /* _mesa_function_pool[17470]: ClearBufferfv (will be remapped) */
"iip\0"
"glClearBufferfv\0"
"\0"
- /* _mesa_function_pool[17585]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[17491]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[17628]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[17534]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[17654]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[17560]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[17680]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[17586]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[17698]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[17604]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[17741]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[17647]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[17795]: Rectdv (offset 87) */
+ /* _mesa_function_pool[17701]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[17808]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[17714]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[17834]: BlendEquationiARB (will be remapped) */
+ /* _mesa_function_pool[17740]: BlendEquationiARB (will be remapped) */
"ii\0"
"glBlendEquationiARB\0"
"\0"
- /* _mesa_function_pool[17858]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[17764]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[17917]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[17823]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[17945]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[17851]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[17990]: DrawArraysInstancedARB (will be remapped) */
+ /* _mesa_function_pool[17896]: DrawArraysInstancedARB (will be remapped) */
"iiii\0"
"glDrawArraysInstancedARB\0"
"glDrawArraysInstancedEXT\0"
"glDrawArraysInstanced\0"
"\0"
- /* _mesa_function_pool[18068]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[17974]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[18095]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[18001]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[18122]: ClearBufferfi (will be remapped) */
+ /* _mesa_function_pool[18028]: ClearBufferfi (will be remapped) */
"iifi\0"
"glClearBufferfi\0"
"\0"
- /* _mesa_function_pool[18144]: Materialiv (offset 172) */
+ /* _mesa_function_pool[18050]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[18162]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[18068]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[18184]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[18090]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[18219]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[18125]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[18265]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[18171]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[18318]: 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[18364]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[18307]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[18382]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[18325]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[18446]: VertexAttribI1iEXT (will be remapped) */
+ /* _mesa_function_pool[18389]: VertexAttribI1iEXT (will be remapped) */
"ii\0"
"glVertexAttribI1iEXT\0"
"glVertexAttribI1i\0"
"\0"
- /* _mesa_function_pool[18489]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[18432]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[18516]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[18459]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[18543]: VertexAttribIPointerEXT (will be remapped) */
+ /* _mesa_function_pool[18486]: VertexAttribIPointerEXT (will be remapped) */
"iiiip\0"
"glVertexAttribIPointerEXT\0"
"glVertexAttribIPointer\0"
"\0"
- /* _mesa_function_pool[18599]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[18542]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[18627]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[18570]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[18665]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[18608]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[18683]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[18626]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[18707]: TexGeni (offset 192) */
+ /* _mesa_function_pool[18650]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[18722]: TexGenf (offset 190) */
+ /* _mesa_function_pool[18665]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[18737]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[18680]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[18770]: TexGend (offset 188) */
+ /* _mesa_function_pool[18713]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[18785]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[18728]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[18812]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[18755]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[18835]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[18778]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[18854]: BindBufferOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[18797]: BindBufferOffsetEXT (will be remapped) */
"iiii\0"
"glBindBufferOffsetEXT\0"
"\0"
- /* _mesa_function_pool[18882]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[18825]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[18936]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[18879]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[18960]: DisableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[18903]: DisableIndexedEXT (will be remapped) */
"ii\0"
"glDisableIndexedEXT\0"
"glDisablei\0"
"\0"
- /* _mesa_function_pool[18995]: BindBufferBaseEXT (will be remapped) */
+ /* _mesa_function_pool[18938]: BindBufferBaseEXT (will be remapped) */
"iii\0"
"glBindBufferBaseEXT\0"
"glBindBufferBase\0"
"\0"
- /* _mesa_function_pool[19037]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[18980]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[19066]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[19009]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[19090]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[19033]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[19137]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[19080]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[19187]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[19130]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[19208]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[19151]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[19235]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[19178]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[19269]: Color4sv (offset 34) */
+ /* _mesa_function_pool[19212]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[19283]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[19226]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[19313]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[19256]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[19345]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[19288]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[19380]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[19323]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[19396]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[19339]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[19429]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[19372]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[19487]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[19430]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[19543]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[19486]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[19573]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[19516]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[19593]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[19536]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[19612]: Color3dv (offset 12) */
+ /* _mesa_function_pool[19555]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[19626]: IsTexture (offset 330) */
+ /* _mesa_function_pool[19569]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[19656]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[19599]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[19679]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[19622]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[19720]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[19663]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[19755]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[19698]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[19774]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[19717]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[19813]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[19756]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[19843]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[19786]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[19875]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[19818]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[19904]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[19847]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[19920]: ObjectPurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[19863]: ObjectPurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectPurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[19948]: GetStringi (will be remapped) */
+ /* _mesa_function_pool[19891]: GetStringi (will be remapped) */
"ii\0"
"glGetStringi\0"
"\0"
- /* _mesa_function_pool[19965]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[19908]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[20007]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[19950]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[20025]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[19968]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[20051]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[19994]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20100]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[20043]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[20118]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[20061]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[20163]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[20106]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[20197]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[20140]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[20221]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[20164]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[20260]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[20203]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[20289]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[20232]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[20307]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[20250]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[20350]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[20293]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[20370]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[20313]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[20438]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[20381]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[20493]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[20436]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[20531]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[20474]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[20565]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[20508]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[20613]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[20556]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[20641]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[20584]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[20694]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[20637]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[20715]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[20658]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[20742]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[20685]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[20774]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[20717]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[20798]: TransformFeedbackVaryingsEXT (will be remapped) */
+ /* _mesa_function_pool[20741]: TransformFeedbackVaryingsEXT (will be remapped) */
"iipi\0"
"glTransformFeedbackVaryingsEXT\0"
"glTransformFeedbackVaryings\0"
"\0"
- /* _mesa_function_pool[20863]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[20806]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[20885]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[20828]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[20903]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[20846]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[20926]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[20869]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[20953]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[20896]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[21003]: Color3s (offset 17) */
+ /* _mesa_function_pool[20946]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[21018]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[20961]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[21052]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[20995]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[21105]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[21048]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[21124]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[21067]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[21148]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[21091]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[21192]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[21135]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[21215]: Color3i (offset 15) */
+ /* _mesa_function_pool[21158]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[21230]: FrontFace (offset 157) */
+ /* _mesa_function_pool[21173]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[21245]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[21188]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[21263]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[21206]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[21311]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[21254]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[21329]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[21272]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[21372]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[21315]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[21422]: Color3b (offset 9) */
+ /* _mesa_function_pool[21365]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[21437]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[21380]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[21481]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[21424]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[21505]: Color3f (offset 13) */
+ /* _mesa_function_pool[21448]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[21520]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[21463]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[21540]: Color3d (offset 11) */
+ /* _mesa_function_pool[21483]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[21555]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[21498]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[21570]: Lightf (offset 159) */
+ /* _mesa_function_pool[21513]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[21584]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[21527]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[21610]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[21553]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[21626]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[21569]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[21647]: Lighti (offset 161) */
+ /* _mesa_function_pool[21590]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[21661]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[21604]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[21692]: ClearDepthf (will be remapped) */
+ /* _mesa_function_pool[21635]: ClearDepthf (will be remapped) */
"f\0"
"glClearDepthf\0"
"\0"
- /* _mesa_function_pool[21709]: GetBooleanIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[21652]: GetBooleanIndexedvEXT (will be remapped) */
"iip\0"
"glGetBooleanIndexedvEXT\0"
"glGetBooleani_v\0"
"\0"
- /* _mesa_function_pool[21754]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[21697]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[21839]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[21782]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[21874]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[21817]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[21919]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[21862]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[21954]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[21897]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[21971]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[21914]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[21988]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[21931]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[22005]: VertexAttribI4bvEXT (will be remapped) */
+ /* _mesa_function_pool[21948]: VertexAttribI4bvEXT (will be remapped) */
"ip\0"
"glVertexAttribI4bvEXT\0"
"glVertexAttribI4bv\0"
"\0"
- /* _mesa_function_pool[22050]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21993]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22093]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[22036]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[22124]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[22067]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[22179]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[22122]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[22204]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[22147]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[22230]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[22173]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[22275]: Uniform2uiEXT (will be remapped) */
+ /* _mesa_function_pool[22218]: Uniform2uiEXT (will be remapped) */
"iii\0"
"glUniform2uiEXT\0"
"glUniform2ui\0"
"\0"
- /* _mesa_function_pool[22309]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[22252]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[22336]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[22279]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[22358]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[22301]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[22385]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[22328]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[22414]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[22357]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[22440]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[22383]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[22463]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[22406]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[22482]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[22425]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[22509]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[22452]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[22527]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[22470]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[22572]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[22515]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[22615]: ClearColor (offset 206) */
+ /* _mesa_function_pool[22558]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[22634]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[22577]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[22653]: ClearColorIiEXT (will be remapped) */
+ /* _mesa_function_pool[22596]: ClearColorIiEXT (will be remapped) */
"iiii\0"
"glClearColorIiEXT\0"
"\0"
- /* _mesa_function_pool[22677]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[22620]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[22726]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[22669]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[22753]: IsEnabledIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[22696]: IsEnabledIndexedEXT (will be remapped) */
"ii\0"
"glIsEnabledIndexedEXT\0"
"glIsEnabledi\0"
"\0"
- /* _mesa_function_pool[22792]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[22735]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[22808]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[22751]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[22856]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[22799]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[22876]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[22819]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[22924]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[22867]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[22948]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[22891]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22989]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[22932]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[23021]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[22964]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[23039]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[22982]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[23131]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[23074]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[23162]: Bitmap (offset 8) */
+ /* _mesa_function_pool[23105]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[23180]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[23123]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[23225]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[23168]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[23256]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[23199]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[23292]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[23235]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[23335]: VertexAttribDivisor (will be remapped) */
+ /* _mesa_function_pool[23278]: VertexAttribDivisor (will be remapped) */
"ii\0"
"glVertexAttribDivisor\0"
"\0"
- /* _mesa_function_pool[23361]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[23304]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[23393]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[23336]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[23408]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[23351]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[23426]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[23369]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[23466]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[23409]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[23493]: VertexAttribDivisorARB (will be remapped) */
+ /* _mesa_function_pool[23436]: VertexAttribDivisorARB (will be remapped) */
"ii\0"
"glVertexAttribDivisorARB\0"
"\0"
- /* _mesa_function_pool[23522]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[23465]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[23541]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[23484]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[23589]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[23532]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[23624]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[23567]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[23651]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[23594]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[23675]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[23618]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[23709]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[23652]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[23761]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[23704]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[23780]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[23723]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[23811]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[23754]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[23849]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ /* _mesa_function_pool[23792]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
"ip\0"
"glEGLImageTargetRenderbufferStorageOES\0"
"\0"
- /* _mesa_function_pool[23892]: VertexAttribI2ivEXT (will be remapped) */
+ /* _mesa_function_pool[23835]: VertexAttribI2ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI2ivEXT\0"
"glVertexAttribI2iv\0"
"\0"
- /* _mesa_function_pool[23937]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[23880]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[23957]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[23900]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[24028]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[23971]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[24050]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[23993]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[24070]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[24013]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[24124]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[24067]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[24177]: ProgramParameteriARB (will be remapped) */
+ /* _mesa_function_pool[24120]: ProgramParameteriARB (will be remapped) */
"iii\0"
"glProgramParameteriARB\0"
"\0"
- /* _mesa_function_pool[24205]: Map1d (offset 220) */
+ /* _mesa_function_pool[24148]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[24221]: Map1f (offset 221) */
+ /* _mesa_function_pool[24164]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[24237]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[24180]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[24296]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[24239]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[24332]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[24275]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[24356]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[24299]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[24377]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[24320]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[24408]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[24351]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[24447]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[24390]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[24469]: GetFragDataLocationEXT (will be remapped) */
+ /* _mesa_function_pool[24412]: GetFragDataLocationEXT (will be remapped) */
"ip\0"
"glGetFragDataLocationEXT\0"
"glGetFragDataLocation\0"
"\0"
- /* _mesa_function_pool[24520]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[24463]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[24574]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[24517]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[24595]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[24538]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[24641]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[24584]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[24656]: Fogiv (offset 156) */
+ /* _mesa_function_pool[24599]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[24668]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[24611]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[24685]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[24628]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[24721]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[24664]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[24742]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[24685]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[24769]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[24712]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[24793]: Rotatef (offset 300) */
+ /* _mesa_function_pool[24736]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[24809]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[24752]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[24851]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[24794]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[24867]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[24810]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[24883]: Clear (offset 203) */
+ /* _mesa_function_pool[24826]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[24894]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[24837]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[24910]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[24853]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[24937]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[24880]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[24971]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[24914]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[24987]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[24930]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[25043]: Ortho (offset 296) */
+ /* _mesa_function_pool[24986]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[25059]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[25002]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[25080]: ListBase (offset 6) */
+ /* _mesa_function_pool[25023]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[25094]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[25037]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[25110]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[25053]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[25166]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[25109]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[25258]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[25201]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[25315]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[25258]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[25331]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[25274]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[25357]: Rectiv (offset 91) */
+ /* _mesa_function_pool[25300]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[25370]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[25313]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[25408]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[25351]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[25435]: EndConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[25378]: EndConditionalRenderNV (will be remapped) */
"\0"
"glEndConditionalRenderNV\0"
"glEndConditionalRender\0"
"\0"
- /* _mesa_function_pool[25485]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[25428]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[25508]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[25451]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[25527]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[25470]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[25546]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[25489]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[25566]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[25509]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[25612]: AlphaFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[25555]: AlphaFragmentOp2ATI (will be remapped) */
"iiiiiiiii\0"
"glAlphaFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[25645]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[25588]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[25660]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[25603]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[25705]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[25648]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[25750]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[25693]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[25796]: FramebufferTextureFaceARB (will be remapped) */
+ /* _mesa_function_pool[25739]: FramebufferTextureFaceARB (will be remapped) */
"iiiii\0"
"glFramebufferTextureFaceARB\0"
"\0"
- /* _mesa_function_pool[25831]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[25774]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[25846]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[25789]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[25894]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[25837]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[25929]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[25872]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[25972]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[25915]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[25989]: PauseTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[25932]: PauseTransformFeedback (will be remapped) */
"\0"
"glPauseTransformFeedback\0"
"\0"
- /* _mesa_function_pool[26016]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[25959]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[26059]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[26002]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[26106]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[26049]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[26194]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[26137]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[26220]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[26163]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[26265]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[26208]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[26297]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[26240]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[26312]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[26255]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[26338]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[26281]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[26363]: LineWidth (offset 168) */
+ /* _mesa_function_pool[26306]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[26378]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[26321]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[26409]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[26352]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[26447]: TexParameterIuivEXT (will be remapped) */
+ /* _mesa_function_pool[26390]: TexParameterIuivEXT (will be remapped) */
"iip\0"
"glTexParameterIuivEXT\0"
"glTexParameterIuiv\0"
"\0"
- /* _mesa_function_pool[26493]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[26436]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[26513]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[26456]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[26534]: GetBufferParameteri64v (will be remapped) */
+ /* _mesa_function_pool[26477]: GetBufferParameteri64v (will be remapped) */
"iip\0"
"glGetBufferParameteri64v\0"
"\0"
- /* _mesa_function_pool[26564]: TexGendv (offset 189) */
+ /* _mesa_function_pool[26507]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[26580]: VertexAttribI3iEXT (will be remapped) */
+ /* _mesa_function_pool[26523]: VertexAttribI3iEXT (will be remapped) */
"iiii\0"
"glVertexAttribI3iEXT\0"
"glVertexAttribI3i\0"
"\0"
- /* _mesa_function_pool[26625]: EnableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[26568]: EnableIndexedEXT (will be remapped) */
"ii\0"
"glEnableIndexedEXT\0"
"glEnablei\0"
"\0"
- /* _mesa_function_pool[26658]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[26601]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[26683]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[26626]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[26704]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[26647]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[26738]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[26681]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[26765]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[26708]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[26788]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[26731]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[26814]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[26757]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[26878]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[26821]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[26904]: 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[26948]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[26923]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[26979]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[26954]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[27016]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[26991]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[27037]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[27012]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[27059]: SetFragmentShaderConstantATI (will be remapped) */
+ /* _mesa_function_pool[27034]: SetFragmentShaderConstantATI (will be remapped) */
"ip\0"
"glSetFragmentShaderConstantATI\0"
"\0"
- /* _mesa_function_pool[27094]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[27069]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[27115]: CallList (offset 2) */
+ /* _mesa_function_pool[27090]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[27129]: Materialfv (offset 170) */
+ /* _mesa_function_pool[27104]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[27147]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[27122]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[27164]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[27139]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[27196]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[27171]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[27241]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[27216]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[27289]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[27264]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[27334]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[27309]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[27352]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[27327]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[27405]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[27380]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[27436]: Color3iv (offset 16) */
+ /* _mesa_function_pool[27411]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[27450]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[27425]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[27484]: DrawElements (offset 311) */
+ /* _mesa_function_pool[27459]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[27505]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[27480]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[27531]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[27506]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[27568]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[27543]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[27628]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[27603]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[27671]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[27646]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[27726]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[27701]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[27749]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[27724]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[27822]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[27797]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[27845]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[27820]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[27876]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[27851]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[27913]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[27888]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[27930]: Uniform1uivEXT (will be remapped) */
+ /* _mesa_function_pool[27905]: Uniform1uivEXT (will be remapped) */
"iip\0"
"glUniform1uivEXT\0"
"glUniform1uiv\0"
"\0"
- /* _mesa_function_pool[27966]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[27941]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[27982]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[27957]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[28002]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[27977]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[28016]: 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[28035]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[28062]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[28055]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[28082]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[28104]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[28131]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[28150]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[28177]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[28169]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[28196]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[28195]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[28222]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[28238]: IsTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[28265]: IsTransformFeedback (will be remapped) */
"i\0"
"glIsTransformFeedback\0"
"\0"
- /* _mesa_function_pool[28263]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[28290]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[28308]: Map2d (offset 222) */
+ /* _mesa_function_pool[28335]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[28328]: Map2f (offset 223) */
+ /* _mesa_function_pool[28355]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[28348]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[28375]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[28373]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[28400]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[28390]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[28417]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[28419]: FragmentLightModelivSGIX (dynamic) */
+ /* _mesa_function_pool[28446]: FragmentLightModelivSGIX (dynamic) */
"ip\0"
"glFragmentLightModelivSGIX\0"
"\0"
- /* _mesa_function_pool[28450]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[28477]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[28473]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[28500]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[28490]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[28517]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[28507]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[28534]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[28524]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[28551]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[28542]: UseShaderProgramEXT (will be remapped) */
+ /* _mesa_function_pool[28569]: UseShaderProgramEXT (will be remapped) */
"ii\0"
"glUseShaderProgramEXT\0"
"\0"
- /* _mesa_function_pool[28568]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[28595]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[28594]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[28621]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[28650]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[28677]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[28669]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[28696]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[28686]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[28713]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[28717]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[28744]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[28757]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[28784]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[28783]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[28810]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[28814]: Materialf (offset 169) */
+ /* _mesa_function_pool[28841]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[28831]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[28858]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[28876]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[28903]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[28901]: Materiali (offset 171) */
+ /* _mesa_function_pool[28928]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[28918]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[28945]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[28944]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[28971]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[28979]: Indexsv (offset 51) */
+ /* _mesa_function_pool[29006]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[28992]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[29019]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[29037]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[29064]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[29056]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[29083]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[29073]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[29100]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[29106]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[29133]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[29124]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[29151]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[29161]: Translated (offset 303) */
+ /* _mesa_function_pool[29188]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[29179]: Translatef (offset 304) */
+ /* _mesa_function_pool[29206]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[29197]: Uniform3uiEXT (will be remapped) */
+ /* _mesa_function_pool[29224]: Uniform3uiEXT (will be remapped) */
"iiii\0"
"glUniform3uiEXT\0"
"glUniform3ui\0"
"\0"
- /* _mesa_function_pool[29232]: StencilMask (offset 209) */
+ /* _mesa_function_pool[29259]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[29249]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[29276]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[29269]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[29296]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[29287]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[29314]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[29313]: IsList (offset 287) */
+ /* _mesa_function_pool[29340]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[29325]: IsSync (will be remapped) */
+ /* _mesa_function_pool[29352]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[29337]: RenderMode (offset 196) */
+ /* _mesa_function_pool[29364]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[29353]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[29380]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[29386]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[29413]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[29438]: ClearBufferiv (will be remapped) */
+ /* _mesa_function_pool[29465]: ClearBufferiv (will be remapped) */
"iip\0"
"glClearBufferiv\0"
"\0"
- /* _mesa_function_pool[29459]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[29486]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[29496]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[29523]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[29524]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[29551]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[29566]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[29593]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[29609]: LoadName (offset 198) */
+ /* _mesa_function_pool[29636]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[29623]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[29650]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[29650]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[29677]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[29668]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[29695]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[29702]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[29729]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[29753]: CullFace (offset 152) */
+ /* _mesa_function_pool[29780]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[29767]: BindTexture (offset 307) */
+ /* _mesa_function_pool[29794]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[29802]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29829]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[29829]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[29856]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[29875]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[29902]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[29901]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[29928]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[29920]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[29947]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[29940]: Rectsv (offset 93) */
+ /* _mesa_function_pool[29967]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[29953]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[29980]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[29980]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[30007]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[30038]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[30065]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[30064]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[30091]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[30127]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[30154]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[30182]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[30209]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[30209]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[30236]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[30230]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[30257]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[30252]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[30279]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[30280]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[30307]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[30304]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[30331]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[30349]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[30376]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[30368]: VertexAttribI3uivEXT (will be remapped) */
+ /* _mesa_function_pool[30395]: VertexAttribI3uivEXT (will be remapped) */
"ip\0"
"glVertexAttribI3uivEXT\0"
"glVertexAttribI3uiv\0"
"\0"
- /* _mesa_function_pool[30415]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[30442]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[30442]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[30469]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[30458]: Recti (offset 90) */
+ /* _mesa_function_pool[30485]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[30472]: VertexAttribI3ivEXT (will be remapped) */
+ /* _mesa_function_pool[30499]: VertexAttribI3ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI3ivEXT\0"
"glVertexAttribI3iv\0"
"\0"
- /* _mesa_function_pool[30517]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[30544]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[30556]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[30583]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[30585]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[30612]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[30624]: PixelTransformParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[30651]: PixelTransformParameterfvEXT (dynamic) */
"iip\0"
"glPixelTransformParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[30660]: PrimitiveRestartNV (will be remapped) */
+ /* _mesa_function_pool[30687]: PrimitiveRestartNV (will be remapped) */
"\0"
"glPrimitiveRestartNV\0"
"\0"
- /* _mesa_function_pool[30683]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[30710]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[30705]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[30732]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[30726]: Rectf (offset 88) */
+ /* _mesa_function_pool[30753]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[30740]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[30767]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[30763]: Indexfv (offset 47) */
+ /* _mesa_function_pool[30790]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[30776]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[30803]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[30822]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[30849]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[30874]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[30901]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[30909]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[30936]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[30929]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[30956]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[30956]: IndexMask (offset 212) */
+ /* _mesa_function_pool[30983]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[30971]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[30998]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[31008]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[31035]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[31051]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[31078]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[31067]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[31094]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[31093]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[31120]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[31112]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[31139]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[31134]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[31161]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[31153]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[31180]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[31170]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[31197]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[31197]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[31224]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[31211]: Fogfv (offset 154) */
+ /* _mesa_function_pool[31238]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[31223]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[31250]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[31257]: InitNames (offset 197) */
+ /* _mesa_function_pool[31284]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[31271]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[31298]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[31286]: Minmax (offset 368) */
+ /* _mesa_function_pool[31313]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[31312]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[31339]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[31331]: DeformationMap3dSGIX (dynamic) */
- "iddiiddiiddiip\0"
- "glDeformationMap3dSGIX\0"
- "\0"
- /* _mesa_function_pool[31370]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[31358]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[31389]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[31377]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[31421]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[31409]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[31443]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[31431]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[31473]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[31461]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[31493]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[31481]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[31511]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[31499]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[31548]: Hint (offset 158) */
+ /* _mesa_function_pool[31536]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[31559]: Color4dv (offset 28) */
+ /* _mesa_function_pool[31547]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[31573]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[31561]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[31616]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[31604]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[31645]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[31633]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[31700]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[31688]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[31750]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[31738]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[31768]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[31756]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[31819]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[31807]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[31866]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[31854]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[31890]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[31878]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[31921]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[31909]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[31936]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[31924]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[31971]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[31959]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[31988]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[31976]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[32008]: Begin (offset 7) */
+ /* _mesa_function_pool[31996]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[32019]: LightModeli (offset 165) */
+ /* _mesa_function_pool[32007]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[32037]: VertexAttribI4ivEXT (will be remapped) */
+ /* _mesa_function_pool[32025]: VertexAttribI4ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI4ivEXT\0"
"glVertexAttribI4iv\0"
"\0"
- /* _mesa_function_pool[32082]: Rectfv (offset 89) */
+ /* _mesa_function_pool[32070]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[32095]: 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[32113]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[32134]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[32138]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[32159]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[32156]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[32177]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[32192]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[32213]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[32218]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[32239]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[32241]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[32262]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[32280]: Disable (offset 214) */
+ /* _mesa_function_pool[32301]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[32293]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[32314]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[32338]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[32359]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[32404]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[32425]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[32432]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[32453]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[32459]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[32480]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[32493]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[32514]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[32512]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[32533]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[32554]: ColorMask (offset 210) */
+ /* _mesa_function_pool[32575]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[32572]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[32593]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[32597]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[32618]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[32616]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[32637]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[32646]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[32667]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[32679]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[32700]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[32701]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[32722]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[32719]: Enable (offset 215) */
+ /* _mesa_function_pool[32740]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[32731]: LineStipple (offset 167) */
+ /* _mesa_function_pool[32752]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[32749]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[32770]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[32775]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[32796]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[32805]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[32826]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[32832]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[32853]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[32886]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[32907]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[32929]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[32950]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[32962]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[32983]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[32988]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[33009]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[33003]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[33024]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[33034]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[33055]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[33055]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[33076]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[33085]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[33106]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[33125]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[33146]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[33162]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[33183]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[33186]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[33207]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[33211]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[33232]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[33232]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[33253]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4779,599 +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 },
- { 9906, CreateProgram_remap_index },
- { 23021, CreateShader_remap_index },
- { 25508, DeleteProgram_remap_index },
- { 18665, DeleteShader_remap_index },
- { 23522, DetachShader_remap_index },
- { 18068, GetAttachedShaders_remap_index },
- { 4869, GetProgramInfoLog_remap_index },
- { 405, GetProgramiv_remap_index },
- { 6542, GetShaderInfoLog_remap_index },
- { 31093, GetShaderiv_remap_index },
- { 13361, IsProgram_remap_index },
- { 12282, IsShader_remap_index },
- { 10036, StencilFuncSeparate_remap_index },
- { 3921, StencilMaskSeparate_remap_index },
- { 7607, StencilOpSeparate_remap_index },
- { 22309, UniformMatrix2x3fv_remap_index },
- { 2847, UniformMatrix2x4fv_remap_index },
- { 32805, UniformMatrix3x2fv_remap_index },
- { 30415, UniformMatrix3x4fv_remap_index },
- { 16309, UniformMatrix4x2fv_remap_index },
- { 3263, UniformMatrix4x3fv_remap_index },
- { 5030, ClampColor_remap_index },
- { 18122, ClearBufferfi_remap_index },
- { 17564, ClearBufferfv_remap_index },
- { 29438, ClearBufferiv_remap_index },
- { 13566, ClearBufferuiv_remap_index },
- { 19948, GetStringi_remap_index },
- { 2788, TexBuffer_remap_index },
- { 938, FramebufferTexture_remap_index },
- { 26534, GetBufferParameteri64v_remap_index },
- { 10136, GetInteger64i_v_remap_index },
- { 23335, VertexAttribDivisor_remap_index },
- { 9924, LoadTransposeMatrixdARB_remap_index },
- { 30822, LoadTransposeMatrixfARB_remap_index },
- { 5608, MultTransposeMatrixdARB_remap_index },
- { 23709, MultTransposeMatrixfARB_remap_index },
- { 216, SampleCoverageARB_remap_index },
- { 5834, CompressedTexImage1DARB_remap_index },
- { 24237, CompressedTexImage2DARB_remap_index },
- { 3984, CompressedTexImage3DARB_remap_index },
- { 18382, CompressedTexSubImage1DARB_remap_index },
- { 2050, CompressedTexSubImage2DARB_remap_index },
- { 20370, CompressedTexSubImage3DARB_remap_index },
- { 28594, GetCompressedTexImageARB_remap_index },
- { 3829, DisableVertexAttribArrayARB_remap_index },
- { 29980, EnableVertexAttribArrayARB_remap_index },
- { 31936, GetProgramEnvParameterdvARB_remap_index },
- { 23589, GetProgramEnvParameterfvARB_remap_index },
- { 27531, GetProgramLocalParameterdvARB_remap_index },
- { 8049, GetProgramLocalParameterfvARB_remap_index },
- { 18516, GetProgramStringARB_remap_index },
- { 27726, GetProgramivARB_remap_index },
- { 20565, GetVertexAttribdvARB_remap_index },
- { 16117, GetVertexAttribfvARB_remap_index },
- { 9748, GetVertexAttribivARB_remap_index },
- { 19429, ProgramEnvParameter4dARB_remap_index },
- { 25258, ProgramEnvParameter4dvARB_remap_index },
- { 16886, ProgramEnvParameter4fARB_remap_index },
- { 8948, ProgramEnvParameter4fvARB_remap_index },
- { 3947, ProgramLocalParameter4dARB_remap_index },
- { 13071, ProgramLocalParameter4dvARB_remap_index },
- { 29459, ProgramLocalParameter4fARB_remap_index },
- { 25894, ProgramLocalParameter4fvARB_remap_index },
- { 28348, ProgramStringARB_remap_index },
- { 19679, VertexAttrib1dARB_remap_index },
- { 15771, VertexAttrib1dvARB_remap_index },
- { 4122, VertexAttrib1fARB_remap_index },
- { 32886, VertexAttrib1fvARB_remap_index },
- { 7133, VertexAttrib1sARB_remap_index },
- { 2224, VertexAttrib1svARB_remap_index },
- { 15202, VertexAttrib2dARB_remap_index },
- { 17585, VertexAttrib2dvARB_remap_index },
- { 1596, VertexAttrib2fARB_remap_index },
- { 17698, VertexAttrib2fvARB_remap_index },
- { 32512, VertexAttrib2sARB_remap_index },
- { 31573, VertexAttrib2svARB_remap_index },
- { 11287, VertexAttrib3dARB_remap_index },
- { 8615, VertexAttrib3dvARB_remap_index },
- { 1683, VertexAttrib3fARB_remap_index },
- { 22572, VertexAttrib3fvARB_remap_index },
- { 28195, VertexAttrib3sARB_remap_index },
- { 20307, VertexAttrib3svARB_remap_index },
- { 4895, VertexAttrib4NbvARB_remap_index },
- { 17945, VertexAttrib4NivARB_remap_index },
- { 22527, VertexAttrib4NsvARB_remap_index },
- { 23541, VertexAttrib4NubARB_remap_index },
- { 31819, VertexAttrib4NubvARB_remap_index },
- { 19090, VertexAttrib4NuivARB_remap_index },
- { 3136, VertexAttrib4NusvARB_remap_index },
- { 10876, VertexAttrib4bvARB_remap_index },
- { 26904, VertexAttrib4dARB_remap_index },
- { 21329, VertexAttrib4dvARB_remap_index },
- { 11441, VertexAttrib4fARB_remap_index },
- { 11845, VertexAttrib4fvARB_remap_index },
- { 10252, VertexAttrib4ivARB_remap_index },
- { 17378, VertexAttrib4sARB_remap_index },
- { 31008, VertexAttrib4svARB_remap_index },
- { 16691, VertexAttrib4ubvARB_remap_index },
- { 30304, VertexAttrib4uivARB_remap_index },
- { 20118, VertexAttrib4usvARB_remap_index },
- { 22124, VertexAttribPointerARB_remap_index },
- { 32646, BindBufferARB_remap_index },
- { 6840, BufferDataARB_remap_index },
- { 1498, BufferSubDataARB_remap_index },
- { 30585, DeleteBuffersARB_remap_index },
- { 32929, GenBuffersARB_remap_index },
- { 17741, GetBufferParameterivARB_remap_index },
- { 16838, GetBufferPointervARB_remap_index },
- { 1451, GetBufferSubDataARB_remap_index },
- { 30252, IsBufferARB_remap_index },
- { 26378, MapBufferARB_remap_index },
- { 31223, UnmapBufferARB_remap_index },
- { 312, BeginQueryARB_remap_index },
- { 19774, DeleteQueriesARB_remap_index },
- { 12172, EndQueryARB_remap_index },
- { 29073, GenQueriesARB_remap_index },
- { 1942, GetQueryObjectivARB_remap_index },
- { 17422, GetQueryObjectuivARB_remap_index },
- { 1740, GetQueryivARB_remap_index },
- { 20025, IsQueryARB_remap_index },
- { 8225, AttachObjectARB_remap_index },
- { 18627, CompileShaderARB_remap_index },
- { 3205, CreateProgramObjectARB_remap_index },
- { 6785, CreateShaderObjectARB_remap_index },
- { 14504, DeleteObjectARB_remap_index },
- { 24028, DetachObjectARB_remap_index },
- { 11917, GetActiveUniformARB_remap_index },
- { 9423, GetAttachedObjectsARB_remap_index },
- { 9730, GetHandleARB_remap_index },
- { 32679, GetInfoLogARB_remap_index },
- { 31890, GetObjectParameterfvARB_remap_index },
- { 27405, GetObjectParameterivARB_remap_index },
- { 28831, GetShaderSourceARB_remap_index },
- { 28055, GetUniformLocationARB_remap_index },
- { 23811, GetUniformfvARB_remap_index },
- { 12646, GetUniformivARB_remap_index },
- { 20163, LinkProgramARB_remap_index },
- { 20221, ShaderSourceARB_remap_index },
- { 7507, Uniform1fARB_remap_index },
- { 29668, Uniform1fvARB_remap_index },
- { 22093, Uniform1iARB_remap_index },
- { 21018, Uniform1ivARB_remap_index },
- { 2173, Uniform2fARB_remap_index },
- { 14340, Uniform2fvARB_remap_index },
- { 26265, Uniform2iARB_remap_index },
- { 2293, Uniform2ivARB_remap_index },
- { 18737, Uniform3fARB_remap_index },
- { 9453, Uniform3fvARB_remap_index },
- { 6396, Uniform3iARB_remap_index },
- { 16944, Uniform3ivARB_remap_index },
- { 19235, Uniform4fARB_remap_index },
- { 23675, Uniform4fvARB_remap_index },
- { 24937, Uniform4iARB_remap_index },
- { 20531, Uniform4ivARB_remap_index },
- { 8277, 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 },
- { 25370, UseProgramObjectARB_remap_index },
- { 14890, ValidateProgramARB_remap_index },
- { 21372, BindAttribLocationARB_remap_index },
- { 4940, GetActiveAttribARB_remap_index },
- { 16592, GetAttribLocationARB_remap_index },
- { 29386, DrawBuffersARB_remap_index },
- { 17990, DrawArraysInstancedARB_remap_index },
- { 6457, DrawElementsInstancedARB_remap_index },
- { 13176, RenderbufferStorageMultisample_remap_index },
- { 13647, FramebufferTextureARB_remap_index },
- { 25796, FramebufferTextureFaceARB_remap_index },
- { 24177, ProgramParameteriARB_remap_index },
- { 23493, VertexAttribDivisorARB_remap_index },
- { 19283, FlushMappedBufferRange_remap_index },
- { 27822, MapBufferRange_remap_index },
- { 16420, BindVertexArray_remap_index },
- { 14713, GenVertexArrays_remap_index },
- { 30182, CopyBufferSubData_remap_index },
- { 31112, ClientWaitSync_remap_index },
- { 2609, DeleteSync_remap_index },
- { 7174, FenceSync_remap_index },
- { 15261, GetInteger64v_remap_index },
- { 22634, GetSynciv_remap_index },
- { 29325, IsSync_remap_index },
- { 9371, WaitSync_remap_index },
- { 3797, DrawElementsBaseVertex_remap_index },
- { 30517, DrawRangeElementsBaseVertex_remap_index },
- { 26409, MultiDrawElementsBaseVertex_remap_index },
- { 16658, BlendEquationSeparateiARB_remap_index },
- { 17834, BlendEquationiARB_remap_index },
- { 12615, BlendFuncSeparateiARB_remap_index },
- { 9796, BlendFunciARB_remap_index },
- { 5091, BindTransformFeedback_remap_index },
- { 3232, DeleteTransformFeedbacks_remap_index },
- { 6429, DrawTransformFeedback_remap_index },
- { 9590, GenTransformFeedbacks_remap_index },
- { 28238, IsTransformFeedback_remap_index },
- { 25989, PauseTransformFeedback_remap_index },
- { 5528, ResumeTransformFeedback_remap_index },
- { 21692, ClearDepthf_remap_index },
- { 6733, DepthRangef_remap_index },
- { 14525, GetShaderPrecisionFormat_remap_index },
- { 9976, ReleaseShaderCompiler_remap_index },
- { 10919, ShaderBinary_remap_index },
- { 5396, PolygonOffsetEXT_remap_index },
- { 23256, GetPixelTexGenParameterfvSGIS_remap_index },
- { 4417, GetPixelTexGenParameterivSGIS_remap_index },
- { 22989, PixelTexGenParameterfSGIS_remap_index },
- { 624, PixelTexGenParameterfvSGIS_remap_index },
- { 12684, PixelTexGenParameteriSGIS_remap_index },
- { 13821, PixelTexGenParameterivSGIS_remap_index },
- { 16508, SampleMaskSGIS_remap_index },
- { 19965, SamplePatternSGIS_remap_index },
- { 26338, ColorPointerEXT_remap_index },
- { 17628, EdgeFlagPointerEXT_remap_index },
- { 6050, IndexPointerEXT_remap_index },
- { 6130, NormalPointerEXT_remap_index },
- { 15855, TexCoordPointerEXT_remap_index },
- { 6963, VertexPointerEXT_remap_index },
- { 3599, PointParameterfEXT_remap_index },
- { 7814, PointParameterfvEXT_remap_index },
- { 31988, LockArraysEXT_remap_index },
- { 14954, UnlockArraysEXT_remap_index },
- { 1267, SecondaryColor3bEXT_remap_index },
- { 7973, SecondaryColor3bvEXT_remap_index },
- { 10429, SecondaryColor3dEXT_remap_index },
- { 25566, SecondaryColor3dvEXT_remap_index },
- { 28104, SecondaryColor3fEXT_remap_index },
- { 18318, SecondaryColor3fvEXT_remap_index },
- { 470, SecondaryColor3iEXT_remap_index },
- { 16165, SecondaryColor3ivEXT_remap_index },
- { 10064, SecondaryColor3sEXT_remap_index },
- { 30776, SecondaryColor3svEXT_remap_index },
- { 27241, SecondaryColor3ubEXT_remap_index },
- { 21263, SecondaryColor3ubvEXT_remap_index },
- { 12926, SecondaryColor3uiEXT_remap_index },
- { 22876, SecondaryColor3uivEXT_remap_index },
- { 25846, SecondaryColor3usEXT_remap_index },
- { 12999, SecondaryColor3usvEXT_remap_index },
- { 11788, SecondaryColorPointerEXT_remap_index },
- { 25660, MultiDrawArraysEXT_remap_index },
- { 20953, MultiDrawElementsEXT_remap_index },
- { 21148, FogCoordPointerEXT_remap_index },
- { 4566, FogCoorddEXT_remap_index },
- { 31389, FogCoorddvEXT_remap_index },
- { 4683, FogCoordfEXT_remap_index },
- { 27164, FogCoordfvEXT_remap_index },
- { 19187, PixelTexGenSGIX_remap_index },
- { 27749, BlendFuncSeparateEXT_remap_index },
- { 6875, FlushVertexArrayRangeNV_remap_index },
- { 5345, VertexArrayRangeNV_remap_index },
- { 28169, CombinerInputNV_remap_index },
- { 2116, CombinerOutputNV_remap_index },
- { 30929, CombinerParameterfNV_remap_index },
- { 5219, CombinerParameterfvNV_remap_index },
- { 22358, CombinerParameteriNV_remap_index },
- { 32404, CombinerParameterivNV_remap_index },
- { 7251, FinalCombinerInputNV_remap_index },
- { 9817, GetCombinerInputParameterfvNV_remap_index },
- { 32241, GetCombinerInputParameterivNV_remap_index },
- { 13922, GetCombinerOutputParameterfvNV_remap_index },
- { 13750, GetCombinerOutputParameterivNV_remap_index },
- { 6637, GetFinalCombinerInputParameterfvNV_remap_index },
- { 24809, GetFinalCombinerInputParameterivNV_remap_index },
- { 12593, ResizeBuffersMESA_remap_index },
- { 11114, WindowPos2dMESA_remap_index },
- { 1060, WindowPos2dvMESA_remap_index },
- { 33232, WindowPos2fMESA_remap_index },
- { 7918, WindowPos2fvMESA_remap_index },
- { 18265, WindowPos2iMESA_remap_index },
- { 20438, WindowPos2ivMESA_remap_index },
- { 21052, WindowPos2sMESA_remap_index },
- { 5748, WindowPos2svMESA_remap_index },
- { 7743, WindowPos3dMESA_remap_index },
- { 14068, WindowPos3dvMESA_remap_index },
- { 516, WindowPos3fMESA_remap_index },
- { 15015, WindowPos3fvMESA_remap_index },
- { 24070, WindowPos3iMESA_remap_index },
- { 30127, WindowPos3ivMESA_remap_index },
- { 18882, WindowPos3sMESA_remap_index },
- { 31645, WindowPos3svMESA_remap_index },
- { 11065, WindowPos4dMESA_remap_index },
- { 17082, WindowPos4dvMESA_remap_index },
- { 14027, WindowPos4fMESA_remap_index },
- { 30683, WindowPos4fvMESA_remap_index },
- { 30280, WindowPos4iMESA_remap_index },
- { 12396, WindowPos4ivMESA_remap_index },
- { 19066, WindowPos4sMESA_remap_index },
- { 3183, WindowPos4svMESA_remap_index },
- { 13789, MultiModeDrawArraysIBM_remap_index },
- { 28944, MultiModeDrawElementsIBM_remap_index },
- { 12200, DeleteFencesNV_remap_index },
- { 28016, FinishFenceNV_remap_index },
- { 3721, GenFencesNV_remap_index },
- { 17062, GetFenceivNV_remap_index },
- { 8210, IsFenceNV_remap_index },
- { 13677, SetFenceNV_remap_index },
- { 4178, TestFenceNV_remap_index },
- { 31616, AreProgramsResidentNV_remap_index },
- { 30971, BindProgramNV_remap_index },
- { 25929, DeleteProgramsNV_remap_index },
- { 21481, ExecuteProgramNV_remap_index },
- { 33125, GenProgramsNV_remap_index },
- { 23361, GetProgramParameterdvNV_remap_index },
- { 10491, GetProgramParameterfvNV_remap_index },
- { 26312, GetProgramStringNV_remap_index },
- { 24447, GetProgramivNV_remap_index },
- { 23624, GetTrackMatrixivNV_remap_index },
- { 26106, GetVertexAttribPointervNV_remap_index },
- { 24742, GetVertexAttribdvNV_remap_index },
- { 9266, GetVertexAttribfvNV_remap_index },
- { 18489, GetVertexAttribivNV_remap_index },
- { 19313, IsProgramNV_remap_index },
- { 9349, LoadProgramNV_remap_index },
- { 27845, ProgramParameters4dvNV_remap_index },
- { 24377, ProgramParameters4fvNV_remap_index },
- { 20742, RequestResidentProgramsNV_remap_index },
- { 22336, TrackMatrixNV_remap_index },
- { 32218, VertexAttrib1dNV_remap_index },
- { 13588, VertexAttrib1dvNV_remap_index },
- { 28450, VertexAttrib1fNV_remap_index },
- { 2415, VertexAttrib1fvNV_remap_index },
- { 30740, VertexAttrib1sNV_remap_index },
- { 15088, VertexAttrib1svNV_remap_index },
- { 4845, VertexAttrib2dNV_remap_index },
- { 13481, VertexAttrib2dvNV_remap_index },
- { 20197, VertexAttrib2fNV_remap_index },
- { 13047, VertexAttrib2fvNV_remap_index },
- { 5960, VertexAttrib2sNV_remap_index },
- { 18936, VertexAttrib2svNV_remap_index },
- { 11262, VertexAttrib3dNV_remap_index },
- { 31866, VertexAttrib3dvNV_remap_index },
- { 10303, VertexAttrib3fNV_remap_index },
- { 24769, VertexAttrib3fvNV_remap_index },
- { 22179, VertexAttrib3sNV_remap_index },
- { 23651, VertexAttrib3svNV_remap_index },
- { 28918, VertexAttrib4dNV_remap_index },
- { 33162, VertexAttrib4dvNV_remap_index },
- { 4467, VertexAttrib4fNV_remap_index },
- { 9399, VertexAttrib4fvNV_remap_index },
- { 26788, VertexAttrib4sNV_remap_index },
- { 1409, VertexAttrib4svNV_remap_index },
- { 5003, VertexAttrib4ubNV_remap_index },
- { 778, VertexAttrib4ubvNV_remap_index },
- { 21661, VertexAttribPointerNV_remap_index },
- { 2267, VertexAttribs1dvNV_remap_index },
- { 26194, VertexAttribs1fvNV_remap_index },
- { 32962, VertexAttribs1svNV_remap_index },
- { 10328, VertexAttribs2dvNV_remap_index },
- { 25331, VertexAttribs2fvNV_remap_index },
- { 17654, VertexAttribs2svNV_remap_index },
- { 5247, VertexAttribs3dvNV_remap_index },
- { 2147, VertexAttribs3fvNV_remap_index },
- { 29875, VertexAttribs3svNV_remap_index },
- { 26878, VertexAttribs4dvNV_remap_index },
- { 5319, VertexAttribs4fvNV_remap_index },
- { 32749, VertexAttribs4svNV_remap_index },
- { 29623, VertexAttribs4ubvNV_remap_index },
- { 26948, GetTexBumpParameterfvATI_remap_index },
- { 33003, GetTexBumpParameterivATI_remap_index },
- { 18599, TexBumpParameterfvATI_remap_index },
- { 20613, TexBumpParameterivATI_remap_index },
- { 15634, AlphaFragmentOp1ATI_remap_index },
- { 25612, AlphaFragmentOp2ATI_remap_index },
- { 24685, AlphaFragmentOp3ATI_remap_index },
- { 29802, BeginFragmentShaderATI_remap_index },
- { 31170, BindFragmentShaderATI_remap_index },
- { 23780, ColorFragmentOp1ATI_remap_index },
- { 4345, ColorFragmentOp2ATI_remap_index },
- { 31511, ColorFragmentOp3ATI_remap_index },
- { 5485, DeleteFragmentShaderATI_remap_index },
- { 33186, EndFragmentShaderATI_remap_index },
- { 32432, GenFragmentShadersATI_remap_index },
- { 25485, PassTexCoordATI_remap_index },
- { 6943, SampleMapATI_remap_index },
- { 27059, SetFragmentShaderConstantATI_remap_index },
- { 363, PointParameteriNV_remap_index },
- { 14229, PointParameterivNV_remap_index },
- { 28757, ActiveStencilFaceEXT_remap_index },
- { 27505, BindVertexArrayAPPLE_remap_index },
- { 2737, DeleteVertexArraysAPPLE_remap_index },
- { 18095, GenVertexArraysAPPLE_remap_index },
- { 23426, IsVertexArrayAPPLE_remap_index },
- { 819, GetProgramNamedParameterdvNV_remap_index },
- { 3562, GetProgramNamedParameterfvNV_remap_index },
- { 26979, ProgramNamedParameter4dNV_remap_index },
- { 14588, ProgramNamedParameter4dvNV_remap_index },
- { 8882, ProgramNamedParameter4fNV_remap_index },
- { 11753, ProgramNamedParameter4fvNV_remap_index },
- { 16993, PrimitiveRestartIndexNV_remap_index },
- { 30660, PrimitiveRestartNV_remap_index },
- { 24356, DepthBoundsEXT_remap_index },
- { 1159, BlendEquationSeparateEXT_remap_index },
- { 14789, BindFramebufferEXT_remap_index },
- { 25705, BindRenderbufferEXT_remap_index },
- { 9646, CheckFramebufferStatusEXT_remap_index },
- { 22677, DeleteFramebuffersEXT_remap_index },
- { 31768, DeleteRenderbuffersEXT_remap_index },
- { 13505, FramebufferRenderbufferEXT_remap_index },
- { 13694, FramebufferTexture1DEXT_remap_index },
- { 11547, FramebufferTexture2DEXT_remap_index },
- { 11167, FramebufferTexture3DEXT_remap_index },
- { 23292, GenFramebuffersEXT_remap_index },
- { 17519, GenRenderbuffersEXT_remap_index },
- { 6679, GenerateMipmapEXT_remap_index },
- { 21754, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 32338, GetRenderbufferParameterivEXT_remap_index },
- { 20493, IsFramebufferEXT_remap_index },
- { 33085, IsRenderbufferEXT_remap_index },
- { 8157, RenderbufferStorageEXT_remap_index },
- { 695, BlitFramebufferEXT_remap_index },
- { 14374, BufferParameteriAPPLE_remap_index },
- { 19345, FlushMappedBufferRangeAPPLE_remap_index },
- { 1815, BindFragDataLocationEXT_remap_index },
- { 24469, GetFragDataLocationEXT_remap_index },
- { 10606, GetUniformuivEXT_remap_index },
- { 2933, GetVertexAttribIivEXT_remap_index },
- { 4195, GetVertexAttribIuivEXT_remap_index },
- { 12033, Uniform1uiEXT_remap_index },
- { 27930, Uniform1uivEXT_remap_index },
- { 22275, Uniform2uiEXT_remap_index },
- { 4309, Uniform2uivEXT_remap_index },
- { 29197, Uniform3uiEXT_remap_index },
- { 14735, Uniform3uivEXT_remap_index },
- { 3486, Uniform4uiEXT_remap_index },
- { 8658, Uniform4uivEXT_remap_index },
- { 18446, VertexAttribI1iEXT_remap_index },
- { 965, VertexAttribI1ivEXT_remap_index },
- { 2516, VertexAttribI1uiEXT_remap_index },
- { 12775, 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 },
- { 23892, VertexAttribI2ivEXT_remap_index },
- { 5273, VertexAttribI2uiEXT_remap_index },
- { 4728, VertexAttribI2uivEXT_remap_index },
- { 26580, VertexAttribI3iEXT_remap_index },
- { 30472, VertexAttribI3ivEXT_remap_index },
- { 3340, VertexAttribI3uiEXT_remap_index },
- { 30368, VertexAttribI3uivEXT_remap_index },
- { 22005, VertexAttribI4bvEXT_remap_index },
- { 14667, VertexAttribI4iEXT_remap_index },
- { 32037, VertexAttribI4ivEXT_remap_index },
- { 13408, VertexAttribI4svEXT_remap_index },
- { 16545, VertexAttribI4ubvEXT_remap_index },
- { 16228, VertexAttribI4uiEXT_remap_index },
- { 5419, VertexAttribI4uivEXT_remap_index },
- { 11330, VertexAttribI4usvEXT_remap_index },
- { 18543, VertexAttribIPointerEXT_remap_index },
- { 3027, FramebufferTextureLayerEXT_remap_index },
- { 5660, ColorMaskIndexedEXT_remap_index },
- { 18960, DisableIndexedEXT_remap_index },
- { 26625, EnableIndexedEXT_remap_index },
- { 21709, GetBooleanIndexedvEXT_remap_index },
- { 10941, GetIntegerIndexedvEXT_remap_index },
- { 22753, IsEnabledIndexedEXT_remap_index },
- { 22653, ClearColorIiEXT_remap_index },
- { 3436, ClearColorIuiEXT_remap_index },
- { 9856, GetTexParameterIivEXT_remap_index },
- { 5908, GetTexParameterIuivEXT_remap_index },
- { 2983, TexParameterIivEXT_remap_index },
- { 26447, TexParameterIuivEXT_remap_index },
- { 4596, BeginConditionalRenderNV_remap_index },
- { 25435, EndConditionalRenderNV_remap_index },
- { 9293, BeginTransformFeedbackEXT_remap_index },
- { 18995, BindBufferBaseEXT_remap_index },
- { 18854, BindBufferOffsetEXT_remap_index },
- { 12221, BindBufferRangeEXT_remap_index },
- { 14289, EndTransformFeedbackEXT_remap_index },
- { 10804, GetTransformFeedbackVaryingEXT_remap_index },
- { 20798, TransformFeedbackVaryingsEXT_remap_index },
- { 29524, ProvokingVertexEXT_remap_index },
- { 10752, GetTexParameterPointervAPPLE_remap_index },
- { 5047, TextureRangeAPPLE_remap_index },
- { 11619, GetObjectParameterivAPPLE_remap_index },
- { 19920, ObjectPurgeableAPPLE_remap_index },
- { 5702, ObjectUnpurgeableAPPLE_remap_index },
- { 17341, ActiveProgramEXT_remap_index },
- { 17312, CreateShaderProgramEXT_remap_index },
- { 28542, UseShaderProgramEXT_remap_index },
- { 28783, StencilFuncSeparateATI_remap_index },
- { 18184, ProgramEnvParameters4fvEXT_remap_index },
- { 17206, ProgramLocalParameters4fvEXT_remap_index },
- { 14157, GetQueryObjecti64vEXT_remap_index },
- { 10354, GetQueryObjectui64vEXT_remap_index },
- { 23849, EGLImageTargetRenderbufferStorageOES_remap_index },
- { 12139, 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 */
- { 11224, _gloffset_BlendEquation },
+ { 11211, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 17104, _gloffset_ColorSubTable },
- { 31700, _gloffset_CopyColorSubTable },
+ { 17010, _gloffset_ColorSubTable },
+ { 31688, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
- { 257, _gloffset_ConvolutionFilter1D },
- { 2454, _gloffset_CopyConvolutionFilter1D },
- { 4058, _gloffset_GetConvolutionParameteriv },
- { 8506, _gloffset_ConvolutionFilter2D },
- { 8708, _gloffset_ConvolutionParameteriv },
- { 9168, _gloffset_ConvolutionParameterfv },
- { 20641, _gloffset_GetSeparableFilter },
- { 24124, _gloffset_SeparableFilter2D },
- { 24987, _gloffset_ConvolutionParameteri },
- { 25110, _gloffset_ConvolutionParameterf },
- { 26814, _gloffset_GetConvolutionParameterfv },
- { 27671, _gloffset_GetConvolutionFilter },
- { 30064, _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 */
- { 15148, _gloffset_CopyTexSubImage3D },
- { 16791, _gloffset_CopyTexImage2D },
- { 24595, _gloffset_CopyTexImage1D },
- { 27352, _gloffset_CopyTexSubImage2D },
- { 29702, _gloffset_CopyTexSubImage1D },
+ { 15103, _gloffset_CopyTexSubImage3D },
+ { 16697, _gloffset_CopyTexImage2D },
+ { 24538, _gloffset_CopyTexImage1D },
+ { 27327, _gloffset_CopyTexSubImage2D },
+ { 29729, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 9505, _gloffset_DrawRangeElements },
+ { 9492, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
- { 856, _gloffset_Histogram },
- { 3522, _gloffset_ResetHistogram },
- { 10002, _gloffset_GetMinmax },
- { 15482, _gloffset_GetHistogramParameterfv },
- { 24520, _gloffset_GetMinmaxParameteriv },
- { 26704, _gloffset_ResetMinmax },
- { 27568, _gloffset_GetHistogramParameteriv },
- { 28717, _gloffset_GetHistogram },
- { 31286, _gloffset_Minmax },
- { 32832, _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 */
- { 8368, _gloffset_ColorTable },
- { 15328, _gloffset_GetColorTable },
- { 23039, _gloffset_GetColorTableParameterfv },
- { 25166, _gloffset_GetColorTableParameteriv },
+ { 8355, _gloffset_ColorTable },
+ { 15283, _gloffset_GetColorTable },
+ { 22982, _gloffset_GetColorTableParameterfv },
+ { 25109, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 7089, _gloffset_TexSubImage1D },
- { 10679, _gloffset_TexSubImage2D },
+ { 7076, _gloffset_TexSubImage1D },
+ { 10666, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
- { 1774, _gloffset_TexImage3D },
- { 22808, _gloffset_TexSubImage3D },
+ { 1813, _gloffset_TexImage3D },
+ { 22751, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
- { 3290, _gloffset_PrioritizeTextures },
- { 7538, _gloffset_AreTexturesResident },
- { 13612, _gloffset_GenTextures },
- { 15814, _gloffset_DeleteTextures },
- { 19626, _gloffset_IsTexture },
- { 29767, _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 */
- { 24296, _gloffset_ArrayElement },
- { 30874, _gloffset_GetPointerv },
- { 32459, _gloffset_DrawArrays },
+ { 24239, _gloffset_ArrayElement },
+ { 30901, _gloffset_GetPointerv },
+ { 32480, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 7656, _gloffset_ColorTableParameteriv },
- { 8368, _gloffset_ColorTable },
- { 15328, _gloffset_GetColorTable },
- { 15438, _gloffset_CopyColorTable },
- { 19487, _gloffset_ColorTableParameterfv },
- { 23039, _gloffset_GetColorTableParameterfv },
- { 25166, _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 },
- { 8324, _gloffset_MultiTexCoord2fARB },
- { 10384, _gloffset_MultiTexCoord3fvARB },
- { 10986, _gloffset_MultiTexCoord4sARB },
- { 11667, _gloffset_MultiTexCoord2dvARB },
- { 12082, _gloffset_MultiTexCoord1svARB },
- { 12454, _gloffset_MultiTexCoord3svARB },
- { 12515, _gloffset_MultiTexCoord4iARB },
- { 13316, _gloffset_MultiTexCoord3iARB },
- { 14186, _gloffset_MultiTexCoord1dARB },
- { 14403, _gloffset_MultiTexCoord3dvARB },
- { 15682, _gloffset_MultiTexCoord3ivARB },
- { 15727, _gloffset_MultiTexCoord2sARB },
- { 17161, _gloffset_MultiTexCoord4ivARB },
- { 19137, _gloffset_ClientActiveTextureARB },
- { 21437, _gloffset_MultiTexCoord2dARB },
- { 21874, _gloffset_MultiTexCoord4dvARB },
- { 22230, _gloffset_MultiTexCoord4fvARB },
- { 23180, _gloffset_MultiTexCoord3fARB },
- { 25750, _gloffset_MultiTexCoord4dARB },
- { 26016, _gloffset_MultiTexCoord1sARB },
- { 26220, _gloffset_MultiTexCoord1dvARB },
- { 27196, _gloffset_MultiTexCoord1ivARB },
- { 27289, _gloffset_MultiTexCoord2ivARB },
- { 27628, _gloffset_MultiTexCoord1iARB },
- { 28992, _gloffset_MultiTexCoord4svARB },
- { 29566, _gloffset_MultiTexCoord1fARB },
- { 29829, _gloffset_MultiTexCoord4fARB },
- { 32293, _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 }
};
@@ -5379,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[] = {
- { 9226, -1 }, /* TbufferMask3DFX */
+ { 9213, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -5464,7 +5469,7 @@ static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
#if defined(need_GL_ARB_geometry_shader4)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = {
- { 12418, -1 }, /* FramebufferTextureLayer */
+ { 12444, -1 }, /* FramebufferTextureLayer */
{ -1, -1 }
};
#endif
@@ -5485,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 */
- { 13137, -1 }, /* MatrixIndexuivARB */
- { 14558, -1 }, /* MatrixIndexPointerARB */
- { 19875, -1 }, /* CurrentPaletteMatrixARB */
- { 22924, -1 }, /* MatrixIndexubvARB */
+ { 3812, -1 }, /* MatrixIndexusvARB */
+ { 13163, -1 }, /* MatrixIndexuivARB */
+ { 14513, -1 }, /* MatrixIndexPointerARB */
+ { 19818, -1 }, /* CurrentPaletteMatrixARB */
+ { 22867, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -5566,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 */
- { 11089, -1 }, /* WeightPointerARB */
- { 13904, -1 }, /* WeightfvARB */
- { 17680, -1 }, /* WeightbvARB */
- { 21105, -1 }, /* WeightusvARB */
- { 24050, -1 }, /* VertexBlendARB */
- { 29650, -1 }, /* WeightsvARB */
- { 31750, -1 }, /* WeightdvARB */
- { 32493, -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
@@ -5645,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
@@ -5666,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[] = {
- { 11224, _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[] = {
- { 17104, _gloffset_ColorSubTable },
- { 31700, _gloffset_CopyColorSubTable },
+ { 17010, _gloffset_ColorSubTable },
+ { 31688, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5688,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 },
- { 8506, _gloffset_ConvolutionFilter2D },
- { 8708, _gloffset_ConvolutionParameteriv },
- { 9168, _gloffset_ConvolutionParameterfv },
- { 20641, _gloffset_GetSeparableFilter },
- { 24124, _gloffset_SeparableFilter2D },
- { 24987, _gloffset_ConvolutionParameteri },
- { 25110, _gloffset_ConvolutionParameterf },
- { 26814, _gloffset_GetConvolutionParameterfv },
- { 27671, _gloffset_GetConvolutionFilter },
- { 30064, _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[] = {
- { 10523, -1 }, /* TangentPointerEXT */
- { 12573, -1 }, /* Binormal3ivEXT */
- { 13269, -1 }, /* Tangent3sEXT */
- { 14623, -1 }, /* Tangent3fvEXT */
- { 18835, -1 }, /* Tangent3dvEXT */
- { 19573, -1 }, /* Binormal3bvEXT */
- { 20694, -1 }, /* Binormal3dEXT */
- { 22856, -1 }, /* Tangent3fEXT */
- { 25059, -1 }, /* Binormal3sEXT */
- { 25527, -1 }, /* Tangent3ivEXT */
- { 25546, -1 }, /* Tangent3dEXT */
- { 26493, -1 }, /* Binormal3svEXT */
- { 27094, -1 }, /* Binormal3fEXT */
- { 27982, -1 }, /* Binormal3dvEXT */
- { 29249, -1 }, /* Tangent3iEXT */
- { 30349, -1 }, /* Tangent3bvEXT */
- { 30909, -1 }, /* Tangent3bEXT */
- { 31473, -1 }, /* Binormal3fvEXT */
- { 32192, -1 }, /* BinormalPointerEXT */
- { 32597, -1 }, /* Tangent3svEXT */
- { 33034, -1 }, /* Binormal3bEXT */
- { 33211, -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[] = {
- { 15148, _gloffset_CopyTexSubImage3D },
- { 16791, _gloffset_CopyTexImage2D },
- { 24595, _gloffset_CopyTexImage1D },
- { 27352, _gloffset_CopyTexSubImage2D },
- { 29702, _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[] = {
- { 8857, -1 }, /* CullParameterdvEXT */
- { 11712, -1 }, /* CullParameterfvEXT */
+ { 8844, -1 }, /* CullParameterdvEXT */
+ { 11699, -1 }, /* CullParameterfvEXT */
{ -1, -1 }
};
#endif
@@ -5775,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[] = {
- { 9505, _gloffset_DrawRangeElements },
+ { 9492, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5824,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 },
- { 10002, _gloffset_GetMinmax },
- { 15482, _gloffset_GetHistogramParameterfv },
- { 24520, _gloffset_GetMinmaxParameteriv },
- { 26704, _gloffset_ResetMinmax },
- { 27568, _gloffset_GetHistogramParameteriv },
- { 28717, _gloffset_GetHistogram },
- { 31286, _gloffset_Minmax },
- { 32832, _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[] = {
- { 11498, -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[] = {
- { 21192, -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[] = {
- { 26513, -1 }, /* ApplyTextureEXT */
- { 26658, -1 }, /* TextureMaterialEXT */
- { 26683, -1 }, /* TextureLightEXT */
+ { 26456, -1 }, /* ApplyTextureEXT */
+ { 26601, -1 }, /* TextureMaterialEXT */
+ { 26626, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5877,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[] = {
- { 8368, _gloffset_ColorTable },
- { 15328, _gloffset_GetColorTable },
- { 23039, _gloffset_GetColorTableParameterfv },
- { 25166, _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[] = {
- { 21839, -1 }, /* PixelTransformParameterfEXT */
- { 21919, -1 }, /* PixelTransformParameteriEXT */
- { 30624, -1 }, /* PixelTransformParameterfvEXT */
- { 32156, -1 }, /* PixelTransformParameterivEXT */
+ { 21782, -1 }, /* PixelTransformParameterfEXT */
+ { 21862, -1 }, /* PixelTransformParameteriEXT */
+ { 30651, -1 }, /* PixelTransformParameterfvEXT */
+ { 32177, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5939,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[] = {
- { 7089, _gloffset_TexSubImage1D },
- { 10679, _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 },
- { 22808, _gloffset_TexSubImage3D },
+ { 1813, _gloffset_TexImage3D },
+ { 22751, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5969,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 },
- { 7538, _gloffset_AreTexturesResident },
- { 13612, _gloffset_GenTextures },
- { 15814, _gloffset_DeleteTextures },
- { 19626, _gloffset_IsTexture },
- { 29767, _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[] = {
- { 13854, -1 }, /* TextureNormalEXT */
+ { 13848, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -6003,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[] = {
- { 24296, _gloffset_ArrayElement },
- { 30874, _gloffset_GetPointerv },
- { 32459, _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[] = {
- { 19656, -1 }, /* VertexWeightfvEXT */
- { 27037, -1 }, /* VertexWeightfEXT */
- { 28686, -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 */
- { 10217, -1 }, /* ImageTransformParameterfvHP */
- { 11967, -1 }, /* ImageTransformParameteriHP */
- { 12308, -1 }, /* GetImageTransformParameterivHP */
- { 19720, -1 }, /* ImageTransformParameterivHP */
+ { 2366, -1 }, /* GetImageTransformParameterfvHP */
+ { 3778, -1 }, /* ImageTransformParameterfHP */
+ { 10204, -1 }, /* ImageTransformParameterfvHP */
+ { 11954, -1 }, /* ImageTransformParameteriHP */
+ { 12334, -1 }, /* GetImageTransformParameterivHP */
+ { 19663, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -6040,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 */
- { 7712, -1 }, /* FogCoordPointerListIBM */
- { 8019, -1 }, /* VertexPointerListIBM */
- { 11888, -1 }, /* ColorPointerListIBM */
- { 13376, -1 }, /* TexCoordPointerListIBM */
- { 13876, -1 }, /* IndexPointerListIBM */
- { 32775, -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
@@ -6061,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[] = {
- { 12716, -1 }, /* VertexPointervINTEL */
- { 15575, -1 }, /* ColorPointervINTEL */
- { 30038, -1 }, /* NormalPointervINTEL */
- { 30556, -1 }, /* TexCoordPointervINTEL */
+ { 12742, -1 }, /* VertexPointervINTEL */
+ { 15530, -1 }, /* ColorPointervINTEL */
+ { 30065, -1 }, /* NormalPointervINTEL */
+ { 30583, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -6078,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 */
- { 31067, -1 }, /* CreateDebugObjectMESA */
+ { 1677, -1 }, /* GetDebugLogLengthMESA */
+ { 3500, -1 }, /* ClearDebugLogMESA */
+ { 4527, -1 }, /* GetDebugLogMESA */
+ { 31094, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -6102,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[] = {
- { 6751, -1 }, /* GetMapAttribParameterivNV */
- { 8474, -1 }, /* MapControlPointsNV */
- { 8573, -1 }, /* MapParameterfvNV */
- { 10662, -1 }, /* EvalMapsNV */
- { 17278, -1 }, /* GetMapAttribParameterfvNV */
- { 17495, -1 }, /* MapParameterivNV */
- { 24910, -1 }, /* GetMapParameterivNV */
- { 25408, -1 }, /* GetMapParameterfvNV */
- { 29353, -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
@@ -6152,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[] = {
- { 15967, -1 }, /* CombinerStageParameterfvNV */
- { 16363, -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
@@ -6181,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[] = {
- { 8694, -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[] = {
- { 16336, -1 }, /* GetDetailTexFuncSGIS */
- { 16736, -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[] = {
- { 27334, -1 }, /* FogFuncSGIS */
- { 28035, -1 }, /* GetFogFuncSGIS */
+ { 27309, -1 }, /* FogFuncSGIS */
+ { 28062, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -6225,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[] = {
- { 6812, -1 }, /* GetSharpenTexFuncSGIS */
- { 22204, -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 */
- { 15883, -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[] = {
- { 15281, -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[] = {
- { 6989, -1 }, /* GetTexFilterFuncSGIS */
- { 16482, -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 */
- { 22385, -1 }, /* DeleteAsyncMarkersSGIX */
- { 22440, -1 }, /* IsAsyncMarkerSGIX */
- { 32572, -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[] = {
- { 7366, -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 */
- { 8086, -1 }, /* FragmentMaterialfSGIX */
- { 8247, -1 }, /* GetFragmentLightivSGIX */
- { 9120, -1 }, /* FragmentLightModeliSGIX */
- { 10725, -1 }, /* FragmentLightivSGIX */
- { 11032, -1 }, /* GetFragmentMaterialivSGIX */
- { 16276, -1 }, /* GetFragmentMaterialfvSGIX */
- { 19543, -1 }, /* FragmentLightModelfSGIX */
- { 19843, -1 }, /* FragmentColorMaterialSGIX */
- { 20260, -1 }, /* FragmentMaterialiSGIX */
- { 21520, -1 }, /* LightEnviSGIX */
- { 23131, -1 }, /* FragmentLightModelfvSGIX */
- { 23466, -1 }, /* FragmentLightfvSGIX */
- { 28419, -1 }, /* FragmentLightModelivSGIX */
- { 28568, -1 }, /* FragmentLightfSGIX */
- { 31443, -1 }, /* GetFragmentLightfvSGIX */
- { 33055, -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[] = {
- { 22463, -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[] = {
- { 28876, -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 */
- { 10583, -1 }, /* GetInstrumentsSGIX */
- { 12974, -1 }, /* StartInstrumentsSGIX */
- { 16001, -1 }, /* StopInstrumentsSGIX */
- { 17917, -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 */
- { 17808, -1 }, /* ListParameteriSGIX */
- { 18785, -1 }, /* ListParameterfvSGIX */
- { 20926, -1 }, /* ListParameterivSGIX */
- { 32616, -1 }, /* GetListParameterivSGIX */
+ { 1280, -1 }, /* ListParameterfSGIX */
+ { 3128, -1 }, /* GetListParameterfvSGIX */
+ { 17714, -1 }, /* ListParameteriSGIX */
+ { 18728, -1 }, /* ListParameterfvSGIX */
+ { 20869, -1 }, /* ListParameterivSGIX */
+ { 32637, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -6344,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 */
- { 16101, -1 }, /* DeformSGIX */
- { 24408, -1 }, /* DeformationMap3fSGIX */
- { 31331, -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[] = {
- { 14832, -1 }, /* ReferencePlaneSGIX */
+ { 14787, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 9618, -1 }, /* SpriteParameterfvSGIX */
- { 20715, -1 }, /* SpriteParameteriSGIX */
- { 26738, -1 }, /* SpriteParameterfSGIX */
- { 29496, -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[] = {
- { 20774, -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[] = {
- { 7656, _gloffset_ColorTableParameteriv },
- { 8368, _gloffset_ColorTable },
- { 15328, _gloffset_GetColorTable },
- { 15438, _gloffset_CopyColorTable },
- { 19487, _gloffset_ColorTableParameterfv },
- { 23039, _gloffset_GetColorTableParameterfv },
- { 25166, _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[] = {
- { 31421, -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 */
- { 9702, -1 }, /* GlobalAlphaFactoruiSUN */
- { 10174, -1 }, /* GlobalAlphaFactorbSUN */
- { 13289, -1 }, /* GlobalAlphaFactorfSUN */
- { 13453, -1 }, /* GlobalAlphaFactorusSUN */
- { 22726, -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[] = {
- { 29287, -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 */
- { 19208, -1 }, /* ReplacementCodeusvSUN */
- { 19396, -1 }, /* ReplacementCodePointerSUN */
- { 21584, -1 }, /* ReplacementCodeuiSUN */
- { 22414, -1 }, /* ReplacementCodeusSUN */
- { 29953, -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 */
- { 7044, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 7403, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 8115, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 8919, -1 }, /* Color3fVertex3fSUN */
- { 10110, -1 }, /* Color3fVertex3fvSUN */
- { 10548, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 11377, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 12837, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 14448, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 14974, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 16026, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 16441, -1 }, /* Color4ubVertex2fvSUN */
- { 16761, -1 }, /* Normal3fVertex3fSUN */
- { 17858, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 18219, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 19037, -1 }, /* TexCoord2fVertex3fvSUN */
- { 19813, -1 }, /* Color4ubVertex2fSUN */
- { 20051, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 22050, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 22482, -1 }, /* Normal3fVertex3fvSUN */
- { 22948, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 23957, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 26059, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 27450, -1 }, /* TexCoord4fVertex4fSUN */
- { 27876, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 28263, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 28390, -1 }, /* TexCoord4fVertex4fvSUN */
- { 29124, -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
@@ -6479,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 },
- { 8324, _gloffset_MultiTexCoord2fARB },
- { 10384, _gloffset_MultiTexCoord3fvARB },
- { 10986, _gloffset_MultiTexCoord4sARB },
- { 11667, _gloffset_MultiTexCoord2dvARB },
- { 12082, _gloffset_MultiTexCoord1svARB },
- { 12454, _gloffset_MultiTexCoord3svARB },
- { 12515, _gloffset_MultiTexCoord4iARB },
- { 13316, _gloffset_MultiTexCoord3iARB },
- { 14186, _gloffset_MultiTexCoord1dARB },
- { 14403, _gloffset_MultiTexCoord3dvARB },
- { 15682, _gloffset_MultiTexCoord3ivARB },
- { 15727, _gloffset_MultiTexCoord2sARB },
- { 17161, _gloffset_MultiTexCoord4ivARB },
- { 19137, _gloffset_ClientActiveTextureARB },
- { 21437, _gloffset_MultiTexCoord2dARB },
- { 21874, _gloffset_MultiTexCoord4dvARB },
- { 22230, _gloffset_MultiTexCoord4fvARB },
- { 23180, _gloffset_MultiTexCoord3fARB },
- { 25750, _gloffset_MultiTexCoord4dARB },
- { 26016, _gloffset_MultiTexCoord1sARB },
- { 26220, _gloffset_MultiTexCoord1dvARB },
- { 27196, _gloffset_MultiTexCoord1ivARB },
- { 27289, _gloffset_MultiTexCoord2ivARB },
- { 27628, _gloffset_MultiTexCoord1iARB },
- { 28992, _gloffset_MultiTexCoord4svARB },
- { 29566, _gloffset_MultiTexCoord1fARB },
- { 29829, _gloffset_MultiTexCoord4fARB },
- { 32293, _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/shaderapi.c b/src/mesa/main/shaderapi.c
index 11b0f88..2c5f2a1 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1236,6 +1236,7 @@ _mesa_DeleteObjectARB(GLhandleARB obj)
if (obj) {
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (is_program(ctx, obj)) {
delete_shader_program(ctx, obj);
}
@@ -1254,6 +1255,7 @@ _mesa_DeleteProgram(GLuint name)
{
if (name) {
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
delete_shader_program(ctx, name);
}
}
@@ -1264,6 +1266,7 @@ _mesa_DeleteShader(GLuint name)
{
if (name) {
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
delete_shader(ctx, name);
}
}
@@ -1729,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);
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 1d75845..33d91ad 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -72,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);
}
@@ -213,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);
}
@@ -408,6 +410,5 @@ _mesa_init_shader_object_functions(struct dd_function_table *driver)
driver->DeleteShader = _mesa_delete_shader;
driver->NewShaderProgram = _mesa_new_shader_program;
driver->DeleteShaderProgram = _mesa_delete_shader_program;
- driver->CompileShader = _mesa_ir_compile_shader;
driver->LinkShader = _mesa_ir_link_shader;
}
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 502c429..19c9bba 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;
/*
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index f0eb43d..a48c777 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/texcompress.c b/src/mesa/main/texcompress.c
index 82d02ed..d820ae9 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -173,6 +173,16 @@ _mesa_glenum_to_compressed_format(GLenum format)
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;
}
@@ -229,6 +239,15 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat)
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_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index 26dca2d..c50df19 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -98,7 +98,8 @@ _mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
GLubyte srcpixels[4][4];
GLubyte *blkaddr;
GLint dstRowDiff;
- ASSERT(dstFormat == MESA_FORMAT_RED_RGTC1);
+ ASSERT(dstFormat == MESA_FORMAT_RED_RGTC1 ||
+ dstFormat == MESA_FORMAT_L_LATC1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -153,7 +154,8 @@ _mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
GLbyte srcpixels[4][4];
GLbyte *blkaddr;
GLint dstRowDiff;
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_RED_RGTC1);
+ 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);
@@ -208,7 +210,8 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
GLubyte *blkaddr;
GLint dstRowDiff;
- ASSERT(dstFormat == MESA_FORMAT_RG_RGTC2);
+ ASSERT(dstFormat == MESA_FORMAT_RG_RGTC2 ||
+ dstFormat == MESA_FORMAT_LA_LATC2);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -269,7 +272,8 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
GLbyte *blkaddr;
GLint dstRowDiff;
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_RG_RGTC2);
+ 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);
@@ -374,6 +378,62 @@ _mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage,
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
diff --git a/src/mesa/main/texcompress_rgtc.h b/src/mesa/main/texcompress_rgtc.h
index 424edc4..1876677 100644
--- a/src/mesa/main/texcompress_rgtc.h
+++ b/src/mesa/main/texcompress_rgtc.h
@@ -57,4 +57,21 @@ _mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage,
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/texenv.c b/src/mesa/main/texenv.c
index 194bcbe..45a2e19 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -411,9 +411,11 @@ set_combiner_scale(struct gl_context *ctx,
void GLAPIENTRY
_mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
{
+ const GLint iparam0 = (GLint) param[0];
+ struct gl_texture_unit *texUnit;
GLuint maxUnit;
+
GET_CURRENT_CONTEXT(ctx);
- struct gl_texture_unit *texUnit;
ASSERT_OUTSIDE_BEGIN_END(ctx);
maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV)
@@ -428,14 +430,14 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
if (target == GL_TEXTURE_ENV) {
switch (pname) {
case GL_TEXTURE_ENV_MODE:
- set_env_mode(ctx, texUnit, (GLenum) (GLint) param[0]);
+ set_env_mode(ctx, texUnit, (GLenum) iparam0);
break;
case GL_TEXTURE_ENV_COLOR:
set_env_color(ctx, texUnit, param);
break;
case GL_COMBINE_RGB:
case GL_COMBINE_ALPHA:
- set_combiner_mode(ctx, texUnit, pname, (GLenum) (GLint) param[0]);
+ set_combiner_mode(ctx, texUnit, pname, (GLenum) iparam0);
break;
case GL_SOURCE0_RGB:
case GL_SOURCE1_RGB:
@@ -445,7 +447,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
case GL_SOURCE1_ALPHA:
case GL_SOURCE2_ALPHA:
case GL_SOURCE3_ALPHA_NV:
- set_combiner_source(ctx, texUnit, pname, (GLenum) (GLint) param[0]);
+ set_combiner_source(ctx, texUnit, pname, (GLenum) iparam0);
break;
case GL_OPERAND0_RGB:
case GL_OPERAND1_RGB:
@@ -455,7 +457,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
case GL_OPERAND1_ALPHA:
case GL_OPERAND2_ALPHA:
case GL_OPERAND3_ALPHA_NV:
- set_combiner_operand(ctx, texUnit, pname, (GLenum) (GLint) param[0]);
+ set_combiner_operand(ctx, texUnit, pname, (GLenum) iparam0);
break;
case GL_RGB_SCALE:
case GL_ALPHA_SCALE:
@@ -466,19 +468,19 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
_mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname=0x%x)", pname );
return;
}
- if (((GLenum) (GLint) param[0] < GL_TEXTURE0) ||
- ((GLenum) (GLint) param[0] > GL_TEXTURE31)) {
+ if ((iparam0 < GL_TEXTURE0) ||
+ (iparam0 > GL_TEXTURE31)) {
/* spec doesn't say this but it seems logical */
- _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param=0x%x)", (GLenum) (GLint) param[0]);
+ _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param=0x%x)", iparam0);
return;
}
- if (!((1 << ((GLenum) (GLint) param[0] - GL_TEXTURE0)) & ctx->Const.SupportedBumpUnits)) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", (GLenum) (GLint) param[0]);
+ if (!((1 << (iparam0 - GL_TEXTURE0)) & ctx->Const.SupportedBumpUnits)) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", iparam0);
return;
}
else {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texUnit->BumpTarget = (GLenum) (GLint) param[0];
+ texUnit->BumpTarget = iparam0;
}
break;
default:
@@ -511,19 +513,18 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
if (pname == GL_COORD_REPLACE_NV) {
- const GLenum value = (GLenum) param[0];
- if (value == GL_TRUE || value == GL_FALSE) {
+ if (iparam0 == GL_TRUE || iparam0 == GL_FALSE) {
/* It's kind of weird to set point state via glTexEnv,
* but that's what the spec calls for.
*/
- const GLboolean state = (GLboolean) value;
+ const GLboolean state = (GLboolean) iparam0;
if (ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] == state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = state;
}
else {
- _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", value);
+ _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", iparam0);
return;
}
}
@@ -542,7 +543,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
_mesa_lookup_enum_by_nr(target),
_mesa_lookup_enum_by_nr(pname),
*param,
- _mesa_lookup_enum_by_nr((GLenum) (GLint) *param));
+ _mesa_lookup_enum_by_nr((GLenum) iparam0));
/* Tell device driver about the new texture environment */
if (ctx->Driver.TexEnv) {
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index 550597e..988a7e0 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -786,6 +786,34 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
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
+ },
};
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 72025cf..5eabf2a 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -621,6 +621,35 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
}
}
+ 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/teximage.c b/src/mesa/main/teximage.c
index d4ae6dd..2a3037f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -509,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 */
}
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 5be881e..c1e3e4d 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -39,6 +39,7 @@
#include "macros.h"
#include "teximage.h"
#include "texobj.h"
+#include "texstate.h"
#include "mtypes.h"
#include "program/prog_instruction.h"
@@ -1013,11 +1014,9 @@ void GLAPIENTRY
_mesa_BindTexture( GLenum target, GLuint texName )
{
GET_CURRENT_CONTEXT(ctx);
- const GLuint unit = ctx->Texture.CurrentUnit;
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
- struct gl_texture_object *newTexObj = NULL, *defaultTexObj = NULL;
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ struct gl_texture_object *newTexObj = NULL;
GLint targetIndex;
- GLboolean early_out = GL_FALSE;
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
@@ -1030,13 +1029,13 @@ _mesa_BindTexture( GLenum target, GLuint texName )
return;
}
assert(targetIndex < NUM_TEXTURE_TARGETS);
- defaultTexObj = ctx->Shared->DefaultTex[targetIndex];
/*
* Get pointer to new texture object (newTexObj)
*/
if (texName == 0) {
- newTexObj = defaultTexObj;
+ /* Use a default texture object */
+ newTexObj = ctx->Shared->DefaultTex[targetIndex];
}
else {
/* non-default texture object */
@@ -1071,15 +1070,18 @@ _mesa_BindTexture( GLenum target, GLuint texName )
assert(valid_texture_object(newTexObj));
- _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
- if ((ctx->Shared->RefCount == 1)
- && (newTexObj == texUnit->CurrentTex[targetIndex])) {
- early_out = GL_TRUE;
- }
- _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
-
- if (early_out) {
- return;
+ /* Check if this texture is only used by this context and is already bound.
+ * If so, just return.
+ */
+ {
+ GLboolean early_out;
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ early_out = ((ctx->Shared->RefCount == 1)
+ && (newTexObj == texUnit->CurrentTex[targetIndex]));
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ if (early_out) {
+ return;
+ }
}
/* flush before changing binding */
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index cd30fa0..5917591 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2621,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);
@@ -3981,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,
@@ -4059,16 +4059,16 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ 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_A8, _mesa_texstore_unorm8 },
{ MESA_FORMAT_A16, _mesa_texstore_unorm16 },
- { MESA_FORMAT_L8, _mesa_texstore_a8 },
+ { MESA_FORMAT_L8, _mesa_texstore_unorm8 },
{ MESA_FORMAT_L16, _mesa_texstore_unorm16 },
- { MESA_FORMAT_I8, _mesa_texstore_a8 },
+ { 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_unorm16 },
@@ -4135,7 +4135,14 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ 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 }
+ { 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 }
};
diff --git a/src/mesa/main/texturebarrier.c b/src/mesa/main/texturebarrier.c
new file mode 100644
index 0000000..56cc871
--- /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 0000000..a84a85b
--- /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/uniforms.c b/src/mesa/main/uniforms.c
index eb28972..1d74efa 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -209,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 }, \
@@ -312,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}
};
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 33c262f..17e0f99 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2406,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)
{
@@ -2429,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;
@@ -3026,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) {
@@ -3038,21 +3094,6 @@ get_mesa_program(struct gl_context *ctx,
extern "C" {
/**
- * Called via ctx->Driver.CompilerShader().
- * This is a no-op.
- * XXX can we remove the ctx->Driver.CompileShader() hook?
- */
-GLboolean
-_mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
-{
- assert(shader->CompileStatus);
- (void) ctx;
-
- return GL_TRUE;
-}
-
-
-/**
* Link a shader.
* Called via ctx->Driver.LinkShader()
* This actually involves converting GLSL IR into Mesa gl_programs with
@@ -3237,11 +3278,6 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
reparent_ir(shader->ir, shader->ir);
ralloc_free(state);
-
- if (shader->CompileStatus) {
- if (!ctx->Driver.CompileShader(ctx, shader))
- shader->CompileStatus = GL_FALSE;
- }
}
diff --git a/src/mesa/program/prog_cache.c b/src/mesa/program/prog_cache.c
index 56ca598..2ccedb5 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 0167334..5d46bfc 100644
--- a/src/mesa/program/prog_cache.h
+++ b/src/mesa/program/prog_cache.h
@@ -44,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,
@@ -55,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/program.c b/src/mesa/program/program.c
index cfdd0da..79034ab 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -811,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);
@@ -834,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/sources.mak b/src/mesa/sources.mak
index ae92e4d..fcf8ab2 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -83,7 +83,6 @@ MAIN_SOURCES = \
main/texcompress_s3tc.c \
main/texcompress_fxt1.c \
main/texenv.c \
- main/texenvprogram.c \
main/texfetch.c \
main/texformat.c \
main/texgen.c \
@@ -95,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 \
@@ -103,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 \
@@ -215,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 \
@@ -315,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 = \
@@ -328,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_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 739a2ea..9557adc 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -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_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 149f1ca..49b1960 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -838,17 +838,17 @@ st_init_bitmap(struct st_context *st)
/* find a usable texture format */
if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 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)) {
+ 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)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_L8_UNORM;
}
else {
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 12528f4..b9b606d 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -301,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;
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 0e0c432..1eb748e 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -63,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);
- }
}
@@ -108,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.
*/
@@ -297,8 +319,8 @@ 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);
if (ctx->DrawBuffer->_ColorDrawBuffers[0]) {
st_translate_color(ctx->Color.ClearColor,
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index c2b4e18..eccc207 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -213,9 +213,9 @@ st_make_drawpix_z_stencil_program(struct st_context *st,
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)
@@ -1332,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 {
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 5eda234..0df0428 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -79,7 +79,11 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx,
else
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;
@@ -427,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;
/*
@@ -484,7 +485,7 @@ st_validate_attachment(struct gl_context *ctx,
return screen->is_format_supported(screen, format,
PIPE_TEXTURE_2D,
- stObj->pt->nr_samples, bindings, 0);
+ stObj->pt->nr_samples, bindings);
}
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index 5a2343d..0e27cb9 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 7672b4c..598536b 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_syncobj.c b/src/mesa/state_tracker/st_cb_syncobj.c
new file mode 100644
index 0000000..d575a84
--- /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 0000000..c254684
--- /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 3f98ffd..9d5eb11 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -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,13 +224,13 @@ 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 {
/* Try non-sRGB. */
format = util_format_linear(format);
- 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;
@@ -1523,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;
diff --git a/src/mesa/state_tracker/st_cb_texturebarrier.c b/src/mesa/state_tracker/st_cb_texturebarrier.c
new file mode 100644
index 0000000..2f1a22b
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_texturebarrier.c
@@ -0,0 +1,60 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+
+/**
+ * glTextureBarrierNV function
+ *
+ * \author Marek Olšák
+ */
+
+
+#include "main/imports.h"
+#include "main/context.h"
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "st_context.h"
+#include "st_cb_texturebarrier.h"
+
+
+/**
+ * Called via ctx->Driver.TextureBarrier()
+ */
+static void
+st_TextureBarrier(struct gl_context *ctx)
+{
+ struct pipe_context *pipe = st_context(ctx)->pipe;
+
+ pipe->texture_barrier(pipe);
+}
+
+
+void st_init_texture_barrier_functions(struct dd_function_table *functions)
+{
+ functions->TextureBarrier = st_TextureBarrier;
+}
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 0000000..3b7d377
--- /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_context.c b/src/mesa/state_tracker/st_context.c
index 7a19f35..5a39ab0 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"
@@ -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_draw.c b/src/mesa/state_tracker/st_draw.c
index d6e67b7..40afa43 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -429,7 +429,7 @@ setup_non_interleaved_attribs(struct gl_context *ctx,
vbuffer[attr].buffer_offset = 0;
/* Track user vertex buffers. */
- pipe_resource_reference(&st->user_vb[attr], vbuffer->buffer);
+ 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);
}
@@ -632,10 +632,8 @@ st_draw_vbo(struct gl_context *ctx,
struct pipe_index_buffer ibuffer;
struct pipe_draw_info info;
unsigned i, num_instances = 1;
- GLboolean new_array = GL_TRUE;
- /* Fix this (Bug 34378):
GLboolean new_array =
- st->dirty.st && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;*/
+ st->dirty.st && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;
/* Mesa core state should have been validated already */
assert(ctx->NewState == 0x0);
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d209898..bbcae3b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -366,36 +366,36 @@ 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, 0) ||
+ PIPE_BIND_RENDER_TARGET) ||
screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
ctx->Extensions.EXT_framebuffer_sRGB = GL_TRUE;
ctx->Const.sRGBCapable = GL_TRUE;
}
@@ -403,14 +403,14 @@ void st_init_extensions(struct st_context *st)
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) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
ctx->Mesa_DXTn) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
ctx->Extensions.S3_s3tc = GL_TRUE;
@@ -418,27 +418,48 @@ void st_init_extensions(struct st_context *st)
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 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;
}
@@ -469,7 +490,7 @@ void st_init_extensions(struct st_context *st)
/* 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;
}
@@ -491,8 +512,18 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_shader_stencil_export = GL_TRUE;
}
- if (screen->get_param(screen, PIPE_CAP_INSTANCED_DRAWING)) {
+ 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 22a1450..3d8637a 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -249,6 +249,16 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
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;
@@ -397,6 +407,15 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
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;
@@ -413,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];
}
}
@@ -434,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,
@@ -444,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);
}
@@ -455,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,
@@ -468,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);
}
/**
@@ -478,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,
@@ -487,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);
}
@@ -509,87 +524,71 @@ 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,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B10G10R10A2_UNORM;
/* Pass through. */
case 4:
case GL_RGBA:
case GL_RGBA8:
- 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,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B8G8R8A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case 3:
case GL_RGB:
case GL_RGB8:
- return default_rgb_format( screen, target, sample_count, bindings,
- geom_flags );
+ 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 );
+ 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,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B2G3R3_UNORM;
/* Pass through. */
case GL_RGB5:
case GL_RGB4:
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, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_A16_UNORM;
/* Pass through. */
case GL_ALPHA:
@@ -597,60 +596,54 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_ALPHA8:
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, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L16_UNORM;
/* Pass through. */
case 1:
case GL_LUMINANCE:
case GL_LUMINANCE4:
case GL_LUMINANCE8:
- 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, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L16A16_UNORM;
/* Pass through. */
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- 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,
- geom_flags );
+ 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, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L4A4_UNORM;
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,
- 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, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_I16_UNORM;
/* Pass through. */
case GL_INTENSITY:
@@ -658,18 +651,17 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_INTENSITY8:
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;
@@ -679,39 +671,33 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
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;
@@ -720,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;
@@ -743,20 +727,20 @@ 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:
@@ -768,7 +752,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
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:
@@ -783,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:
@@ -794,23 +778,21 @@ 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_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:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_SRGB, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_DXT1_SRGB;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
return PIPE_FORMAT_DXT1_SRGBA;
@@ -818,10 +800,9 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_COMPRESSED_SRGB_ALPHA_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_SRGBA, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_DXT3_SRGBA;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
return PIPE_FORMAT_DXT5_SRGBA;
@@ -831,76 +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, geom_flags))
+ 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, geom_flags))
+ 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.
@@ -924,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:
@@ -935,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:
@@ -947,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;
@@ -959,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;
@@ -971,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;
@@ -983,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;
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index a12a32e..aea69c1 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;
}
@@ -204,12 +204,10 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
_mesa_is_format_compressed(texObj->Image[face][baseLevel]->TexFormat);
if (compressed) {
- if (texObj->Image[face][baseLevel]->TexFormat == MESA_FORMAT_SIGNED_RED_RGTC1 ||
- texObj->Image[face][baseLevel]->TexFormat == MESA_FORMAT_SIGNED_RG_RGTC2)
- datatype = GL_FLOAT;
- else
- 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 {
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 5c8853c..a68544d 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -502,8 +502,8 @@ 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);
}
@@ -684,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;
}
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index fc1dfb3..0b1ad63 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -798,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;
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 1e0a832..ffe7e25 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -78,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;
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index c597808..2c02a01 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_span.c b/src/mesa/swrast/s_span.c
index 3240b13..ef38a6b 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -299,7 +299,8 @@ interpolate_int_colors(struct gl_context *ctx, SWspan *span)
interpolate_active_attribs(ctx, span, FRAG_BIT_COL0);
break;
default:
- _mesa_problem(NULL, "bad datatype in interpolate_int_colors");
+ _mesa_problem(ctx, "bad datatype 0x%x in interpolate_int_colors",
+ span->array->ChanType);
}
span->arrayMask |= SPAN_RGBA;
}
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index ecc09e0..4278540 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -2918,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;
}
}
@@ -3030,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);
@@ -3043,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:
@@ -3068,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;
@@ -3134,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_triangle.c b/src/mesa/swrast/s_triangle.c
index 066f182..d07a4ef 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -35,6 +35,7 @@
#include "main/imports.h"
#include "main/macros.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/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 47aeeb8..5f5e266 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/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 5818b13..98d6bad 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -461,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:
@@ -486,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:
@@ -521,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;
}