aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/Android.mk4
-rw-r--r--mesalib/bin/bugzilla_mesa.sh52
-rw-r--r--mesalib/bin/get-pick-list.sh6
-rw-r--r--mesalib/bin/perf-annotate-jit251
-rw-r--r--mesalib/bin/shortlog_mesa.sh6
-rw-r--r--mesalib/configure.ac287
-rw-r--r--mesalib/docs/GL3.txt18
-rw-r--r--mesalib/docs/README.UVD13
-rw-r--r--mesalib/docs/devinfo.html12
-rw-r--r--mesalib/docs/envvars.html5
-rw-r--r--mesalib/docs/extensions.html34
-rw-r--r--mesalib/docs/index.html118
-rw-r--r--mesalib/docs/license.html7
-rw-r--r--mesalib/docs/llvmpipe.html40
-rw-r--r--mesalib/docs/relnotes.html156
-rw-r--r--mesalib/docs/relnotes/3.1 (renamed from mesalib/docs/RELNOTES-3.1)0
-rw-r--r--mesalib/docs/relnotes/3.2 (renamed from mesalib/docs/RELNOTES-3.2)0
-rw-r--r--mesalib/docs/relnotes/3.2.1 (renamed from mesalib/docs/RELNOTES-3.2.1)0
-rw-r--r--mesalib/docs/relnotes/3.3 (renamed from mesalib/docs/RELNOTES-3.3)0
-rw-r--r--mesalib/docs/relnotes/3.4 (renamed from mesalib/docs/RELNOTES-3.4)0
-rw-r--r--mesalib/docs/relnotes/3.4.1 (renamed from mesalib/docs/RELNOTES-3.4.1)0
-rw-r--r--mesalib/docs/relnotes/3.4.2 (renamed from mesalib/docs/RELNOTES-3.4.2)0
-rw-r--r--mesalib/docs/relnotes/3.5 (renamed from mesalib/docs/RELNOTES-3.5)0
-rw-r--r--mesalib/docs/relnotes/4.0 (renamed from mesalib/docs/RELNOTES-4.0)0
-rw-r--r--mesalib/docs/relnotes/4.0.1 (renamed from mesalib/docs/RELNOTES-4.0.1)0
-rw-r--r--mesalib/docs/relnotes/4.0.2 (renamed from mesalib/docs/RELNOTES-4.0.2)0
-rw-r--r--mesalib/docs/relnotes/4.0.3 (renamed from mesalib/docs/RELNOTES-4.0.3)0
-rw-r--r--mesalib/docs/relnotes/4.1 (renamed from mesalib/docs/RELNOTES-4.1)0
-rw-r--r--mesalib/docs/relnotes/5.0 (renamed from mesalib/docs/RELNOTES-5.0)0
-rw-r--r--mesalib/docs/relnotes/5.0.1 (renamed from mesalib/docs/RELNOTES-5.0.1)0
-rw-r--r--mesalib/docs/relnotes/5.0.2 (renamed from mesalib/docs/RELNOTES-5.0.2)0
-rw-r--r--mesalib/docs/relnotes/5.1 (renamed from mesalib/docs/RELNOTES-5.1)2
-rw-r--r--mesalib/docs/relnotes/6.0 (renamed from mesalib/docs/RELNOTES-6.0)0
-rw-r--r--mesalib/docs/relnotes/6.0.1 (renamed from mesalib/docs/RELNOTES-6.0.1)0
-rw-r--r--mesalib/docs/relnotes/6.1 (renamed from mesalib/docs/RELNOTES-6.1)0
-rw-r--r--mesalib/docs/relnotes/6.2 (renamed from mesalib/docs/RELNOTES-6.2)0
-rw-r--r--mesalib/docs/relnotes/6.2.1 (renamed from mesalib/docs/RELNOTES-6.2.1)0
-rw-r--r--mesalib/docs/relnotes/6.3 (renamed from mesalib/docs/RELNOTES-6.3)0
-rw-r--r--mesalib/docs/relnotes/6.3.1 (renamed from mesalib/docs/RELNOTES-6.3.1)0
-rw-r--r--mesalib/docs/relnotes/6.3.2 (renamed from mesalib/docs/RELNOTES-6.3.2)0
-rw-r--r--mesalib/docs/relnotes/6.4 (renamed from mesalib/docs/RELNOTES-6.4)0
-rw-r--r--mesalib/docs/relnotes/6.4.1.html (renamed from mesalib/docs/relnotes-6.4.1.html)4
-rw-r--r--mesalib/docs/relnotes/6.4.2.html (renamed from mesalib/docs/relnotes-6.4.2.html)4
-rw-r--r--mesalib/docs/relnotes/6.4.html (renamed from mesalib/docs/relnotes-6.4.html)4
-rw-r--r--mesalib/docs/relnotes/6.5.1.html (renamed from mesalib/docs/relnotes-6.5.1.html)4
-rw-r--r--mesalib/docs/relnotes/6.5.2.html (renamed from mesalib/docs/relnotes-6.5.2.html)4
-rw-r--r--mesalib/docs/relnotes/6.5.3.html (renamed from mesalib/docs/relnotes-6.5.3.html)6
-rw-r--r--mesalib/docs/relnotes/6.5.html (renamed from mesalib/docs/relnotes-6.5.html)4
-rw-r--r--mesalib/docs/relnotes/7.0.1.html (renamed from mesalib/docs/relnotes-7.0.1.html)4
-rw-r--r--mesalib/docs/relnotes/7.0.2.html (renamed from mesalib/docs/relnotes-7.0.2.html)4
-rw-r--r--mesalib/docs/relnotes/7.0.3.html (renamed from mesalib/docs/relnotes-7.0.3.html)4
-rw-r--r--mesalib/docs/relnotes/7.0.4.html (renamed from mesalib/docs/relnotes-7.0.4.html)4
-rw-r--r--mesalib/docs/relnotes/7.0.html (renamed from mesalib/docs/relnotes-7.0.html)4
-rw-r--r--mesalib/docs/relnotes/7.1.html (renamed from mesalib/docs/relnotes-7.1.html)4
-rw-r--r--mesalib/docs/relnotes/7.10.1.html (renamed from mesalib/docs/relnotes-7.10.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.10.2.html (renamed from mesalib/docs/relnotes-7.10.2.html)6
-rw-r--r--mesalib/docs/relnotes/7.10.3.html (renamed from mesalib/docs/relnotes-7.10.3.html)6
-rw-r--r--mesalib/docs/relnotes/7.10.html (renamed from mesalib/docs/relnotes-7.10.html)8
-rw-r--r--mesalib/docs/relnotes/7.11.1.html (renamed from mesalib/docs/relnotes-7.11.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.11.2.html (renamed from mesalib/docs/relnotes-7.11.2.html)6
-rw-r--r--mesalib/docs/relnotes/7.11.html (renamed from mesalib/docs/relnotes-7.11.html)6
-rw-r--r--mesalib/docs/relnotes/7.2.html (renamed from mesalib/docs/relnotes-7.2.html)4
-rw-r--r--mesalib/docs/relnotes/7.3.html (renamed from mesalib/docs/relnotes-7.3.html)6
-rw-r--r--mesalib/docs/relnotes/7.4.1.html (renamed from mesalib/docs/relnotes-7.4.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.4.2.html (renamed from mesalib/docs/relnotes-7.4.2.html)6
-rw-r--r--mesalib/docs/relnotes/7.4.3.html (renamed from mesalib/docs/relnotes-7.4.3.html)6
-rw-r--r--mesalib/docs/relnotes/7.4.4.html (renamed from mesalib/docs/relnotes-7.4.4.html)6
-rw-r--r--mesalib/docs/relnotes/7.4.html (renamed from mesalib/docs/relnotes-7.4.html)6
-rw-r--r--mesalib/docs/relnotes/7.5.1.html (renamed from mesalib/docs/relnotes-7.5.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.5.2.html (renamed from mesalib/docs/relnotes-7.5.2.html)6
-rw-r--r--mesalib/docs/relnotes/7.5.html (renamed from mesalib/docs/relnotes-7.5.html)6
-rw-r--r--mesalib/docs/relnotes/7.6.1.html (renamed from mesalib/docs/relnotes-7.6.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.6.html (renamed from mesalib/docs/relnotes-7.6.html)8
-rw-r--r--mesalib/docs/relnotes/7.7.1.html (renamed from mesalib/docs/relnotes-7.7.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.7.html (renamed from mesalib/docs/relnotes-7.7.html)6
-rw-r--r--mesalib/docs/relnotes/7.8.1.html (renamed from mesalib/docs/relnotes-7.8.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.8.2.html (renamed from mesalib/docs/relnotes-7.8.2.html)6
-rw-r--r--mesalib/docs/relnotes/7.8.3.html (renamed from mesalib/docs/relnotes-7.8.3.html)6
-rw-r--r--mesalib/docs/relnotes/7.8.html (renamed from mesalib/docs/relnotes-7.8.html)10
-rw-r--r--mesalib/docs/relnotes/7.9.1.html (renamed from mesalib/docs/relnotes-7.9.1.html)6
-rw-r--r--mesalib/docs/relnotes/7.9.2.html (renamed from mesalib/docs/relnotes-7.9.2.html)6
-rw-r--r--mesalib/docs/relnotes/7.9.html (renamed from mesalib/docs/relnotes-7.9.html)8
-rw-r--r--mesalib/docs/relnotes/8.0.1.html (renamed from mesalib/docs/relnotes-8.0.1.html)6
-rw-r--r--mesalib/docs/relnotes/8.0.2.html (renamed from mesalib/docs/relnotes-8.0.2.html)6
-rw-r--r--mesalib/docs/relnotes/8.0.3.html (renamed from mesalib/docs/relnotes-8.0.3.html)6
-rw-r--r--mesalib/docs/relnotes/8.0.4.html (renamed from mesalib/docs/relnotes-8.0.4.html)6
-rw-r--r--mesalib/docs/relnotes/8.0.5.html (renamed from mesalib/docs/relnotes-8.0.5.html)6
-rw-r--r--mesalib/docs/relnotes/8.0.html (renamed from mesalib/docs/relnotes-8.0.html)6
-rw-r--r--mesalib/docs/relnotes/9.0.1.html (renamed from mesalib/docs/relnotes-9.0.1.html)4
-rw-r--r--mesalib/docs/relnotes/9.0.2.html (renamed from mesalib/docs/relnotes-9.0.2.html)4
-rw-r--r--mesalib/docs/relnotes/9.0.3.html (renamed from mesalib/docs/relnotes-9.0.3.html)4
-rw-r--r--mesalib/docs/relnotes/9.0.html (renamed from mesalib/docs/relnotes-9.0.html)4
-rw-r--r--mesalib/docs/relnotes/9.1.1.html (renamed from mesalib/docs/relnotes-9.1.1.html)4
-rw-r--r--mesalib/docs/relnotes/9.1.2.html237
-rw-r--r--mesalib/docs/relnotes/9.1.3.html230
-rw-r--r--mesalib/docs/relnotes/9.1.html (renamed from mesalib/docs/relnotes-9.1.html)4
-rw-r--r--mesalib/docs/relnotes/9.2.html70
-rw-r--r--mesalib/docs/specs/MESA_agp_offset.spec (renamed from mesalib/docs/MESA_agp_offset.spec)0
-rw-r--r--mesalib/docs/specs/MESA_copy_sub_buffer.spec (renamed from mesalib/docs/MESA_copy_sub_buffer.spec)0
-rw-r--r--mesalib/docs/specs/MESA_drm_image.spec (renamed from mesalib/docs/MESA_drm_image.spec)0
-rw-r--r--mesalib/docs/specs/MESA_multithread_makecurrent.spec (renamed from mesalib/docs/MESA_multithread_makecurrent.spec)0
-rw-r--r--mesalib/docs/specs/MESA_pack_invert.spec (renamed from mesalib/docs/MESA_pack_invert.spec)0
-rw-r--r--mesalib/docs/specs/MESA_pixmap_colormap.spec (renamed from mesalib/docs/MESA_pixmap_colormap.spec)0
-rw-r--r--mesalib/docs/specs/MESA_release_buffers.spec (renamed from mesalib/docs/MESA_release_buffers.spec)0
-rw-r--r--mesalib/docs/specs/MESA_resize_buffers.spec (renamed from mesalib/docs/MESA_resize_buffers.spec)0
-rw-r--r--mesalib/docs/specs/MESA_set_3dfx_mode.spec (renamed from mesalib/docs/MESA_set_3dfx_mode.spec)0
-rw-r--r--mesalib/docs/specs/MESA_shader_debug.spec (renamed from mesalib/docs/MESA_shader_debug.spec)0
-rw-r--r--mesalib/docs/specs/MESA_swap_control.spec (renamed from mesalib/docs/MESA_swap_control.spec)0
-rw-r--r--mesalib/docs/specs/MESA_swap_frame_usage.spec (renamed from mesalib/docs/MESA_swap_frame_usage.spec)0
-rw-r--r--mesalib/docs/specs/MESA_texture_array.spec (renamed from mesalib/docs/MESA_texture_array.spec)0
-rw-r--r--mesalib/docs/specs/MESA_texture_signed_rgba.spec (renamed from mesalib/docs/MESA_texture_signed_rgba.spec)0
-rw-r--r--mesalib/docs/specs/MESA_window_pos.spec (renamed from mesalib/docs/MESA_window_pos.spec)0
-rw-r--r--mesalib/docs/specs/MESA_ycbcr_texture.spec (renamed from mesalib/docs/MESA_ycbcr_texture.spec)0
-rw-r--r--mesalib/docs/specs/WL_bind_wayland_display.spec (renamed from mesalib/docs/WL_bind_wayland_display.spec)0
-rw-r--r--mesalib/docs/specs/enums.txt (renamed from mesalib/docs/enums.txt)0
-rw-r--r--mesalib/docs/versions.html4
-rw-r--r--mesalib/docs/viewperf.html30
-rw-r--r--mesalib/docs/xlibdriver.html6
-rw-r--r--mesalib/include/EGL/eglext.h45
-rw-r--r--mesalib/include/GL/gl.h7
-rw-r--r--mesalib/include/GL/glx.h7
-rw-r--r--mesalib/include/GL/glx_mangle.h7
-rw-r--r--mesalib/include/GL/osmesa.h7
-rw-r--r--mesalib/scons/crossmingw.py42
-rw-r--r--mesalib/scons/gallium.py25
-rw-r--r--mesalib/src/Makefile.am55
-rw-r--r--mesalib/src/gallium/Android.mk5
-rw-r--r--mesalib/src/gallium/SConscript49
-rw-r--r--mesalib/src/gallium/auxiliary/Makefile.sources1
-rw-r--r--mesalib/src/gallium/auxiliary/SConscript4
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_context.c67
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_fps.c3
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blit.c3
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c98
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.h18
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_debug_symbol.c6
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_dump_state.c3
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.c34
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.h12
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_latc.c7
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_rgtc.c7
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_s3tc.c7
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c3
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_inlines.h3
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_prim.h227
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_simple_list.h7
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_sse.h7
-rw-r--r--mesalib/src/glsl/Makefile.am3
-rw-r--r--mesalib/src/glsl/Makefile.sources5
-rw-r--r--mesalib/src/glsl/ast.h14
-rw-r--r--mesalib/src/glsl/ast_array_index.cpp190
-rw-r--r--mesalib/src/glsl/ast_function.cpp149
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp274
-rw-r--r--mesalib/src/glsl/builtin_variables.cpp33
-rw-r--r--mesalib/src/glsl/glcpp/glcpp-parse.y6
-rw-r--r--mesalib/src/glsl/glcpp/pp.c4
-rw-r--r--mesalib/src/glsl/glsl_parser.yy188
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp15
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h4
-rw-r--r--mesalib/src/glsl/glsl_symbol_table.cpp84
-rw-r--r--mesalib/src/glsl/glsl_symbol_table.h4
-rw-r--r--mesalib/src/glsl/glsl_types.cpp4
-rw-r--r--mesalib/src/glsl/glsl_types.h3
-rw-r--r--mesalib/src/glsl/ir.cpp16
-rw-r--r--mesalib/src/glsl/ir.h68
-rw-r--r--mesalib/src/glsl/ir_basic_block.cpp2
-rw-r--r--mesalib/src/glsl/ir_constant_expression.cpp185
-rw-r--r--mesalib/src/glsl/ir_optimization.h7
-rw-r--r--mesalib/src/glsl/ir_print_visitor.cpp5
-rw-r--r--mesalib/src/glsl/ir_reader.cpp10
-rw-r--r--mesalib/src/glsl/ir_uniform.h27
-rw-r--r--mesalib/src/glsl/ir_validate.cpp82
-rw-r--r--mesalib/src/glsl/link_interface_blocks.cpp110
-rw-r--r--mesalib/src/glsl/link_uniform_initializers.cpp25
-rw-r--r--mesalib/src/glsl/link_uniforms.cpp126
-rw-r--r--mesalib/src/glsl/link_varyings.cpp69
-rw-r--r--mesalib/src/glsl/linker.cpp28
-rw-r--r--mesalib/src/glsl/linker.h8
-rw-r--r--mesalib/src/glsl/lower_clip_distance.cpp124
-rw-r--r--mesalib/src/glsl/lower_instructions.cpp39
-rw-r--r--mesalib/src/glsl/lower_named_interface_blocks.cpp238
-rw-r--r--mesalib/src/glsl/lower_packed_varyings.cpp8
-rw-r--r--mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp149
-rw-r--r--mesalib/src/glsl/lower_vec_index_to_swizzle.cpp37
-rw-r--r--mesalib/src/glsl/lower_vector_insert.cpp139
-rw-r--r--mesalib/src/glsl/main.cpp4
-rw-r--r--mesalib/src/glsl/opt_algebraic.cpp6
-rw-r--r--mesalib/src/glsl/opt_flip_matrices.cpp122
-rw-r--r--mesalib/src/glsl/opt_if_simplification.cpp27
-rw-r--r--mesalib/src/glsl/program.h7
-rw-r--r--mesalib/src/glsl/ralloc.c8
-rw-r--r--mesalib/src/glsl/standalone_scaffolding.cpp17
-rw-r--r--mesalib/src/glsl/standalone_scaffolding.h17
-rw-r--r--mesalib/src/glsl/test_optpass.cpp14
-rw-r--r--mesalib/src/mapi/Android.mk16
-rw-r--r--mesalib/src/mapi/Makefile.am (renamed from mesalib/src/gallium/Makefile.am)24
-rw-r--r--mesalib/src/mapi/Makefile.sources (renamed from mesalib/src/mapi/mapi/sources.mak)24
-rw-r--r--mesalib/src/mapi/entry.c (renamed from mesalib/src/mapi/mapi/entry.c)0
-rw-r--r--mesalib/src/mapi/entry.h (renamed from mesalib/src/mapi/mapi/entry.h)0
-rw-r--r--mesalib/src/mapi/entry_x86-64_tls.h (renamed from mesalib/src/mapi/mapi/entry_x86-64_tls.h)13
-rw-r--r--mesalib/src/mapi/entry_x86_tls.h (renamed from mesalib/src/mapi/mapi/entry_x86_tls.h)13
-rw-r--r--mesalib/src/mapi/entry_x86_tsd.h (renamed from mesalib/src/mapi/mapi/entry_x86_tsd.h)0
-rw-r--r--mesalib/src/mapi/glapi/Makefile.am4
-rw-r--r--mesalib/src/mapi/glapi/Makefile.sources (renamed from mesalib/src/mapi/glapi/sources.mak)2
-rw-r--r--mesalib/src/mapi/glapi/SConscript10
-rw-r--r--mesalib/src/mapi/glapi/gen/GL3x.xml18
-rw-r--r--mesalib/src/mapi/glapi/gen/Makefile.am2
-rw-r--r--mesalib/src/mapi/glapi/gen/es_EXT.xml23
-rwxr-xr-xmesalib/src/mapi/glapi/gen/gl_API.xml72
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_XML.py2
-rwxr-xr-xmesalib/src/mapi/glapi/gen/gl_enums.py8
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_genexec.py4
-rwxr-xr-xmesalib/src/mapi/glapi/gen/gl_table.py21
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py13
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_x86_asm.py13
-rw-r--r--mesalib/src/mapi/glapi/gen/glapi_gen.mk2
-rw-r--r--mesalib/src/mapi/glapi/gen/mesadef.py7
-rw-r--r--mesalib/src/mapi/glapi/glapi.c2
-rw-r--r--mesalib/src/mapi/glapi/glapi.h7
-rw-r--r--mesalib/src/mapi/glapi/glapi_dispatch.c7
-rw-r--r--mesalib/src/mapi/glapi/glapi_entrypoint.c9
-rw-r--r--mesalib/src/mapi/glapi/glapi_getproc.c7
-rw-r--r--mesalib/src/mapi/glapi/glapi_nop.c7
-rw-r--r--mesalib/src/mapi/glapi/glapi_priv.h7
-rw-r--r--mesalib/src/mapi/glapi/glthread.h2
-rw-r--r--mesalib/src/mapi/mapi.c (renamed from mesalib/src/mapi/mapi/mapi.c)0
-rw-r--r--mesalib/src/mapi/mapi.h (renamed from mesalib/src/mapi/mapi/mapi.h)0
-rwxr-xr-xmesalib/src/mapi/mapi_abi.py (renamed from mesalib/src/mapi/mapi/mapi_abi.py)2
-rw-r--r--mesalib/src/mapi/mapi_glapi.c (renamed from mesalib/src/mapi/mapi/mapi_glapi.c)6
-rw-r--r--mesalib/src/mapi/mapi_tmp.h (renamed from mesalib/src/mapi/mapi/mapi_tmp.h)0
-rw-r--r--mesalib/src/mapi/stub.c (renamed from mesalib/src/mapi/mapi/stub.c)0
-rw-r--r--mesalib/src/mapi/stub.h (renamed from mesalib/src/mapi/mapi/stub.h)0
-rw-r--r--mesalib/src/mapi/table.c (renamed from mesalib/src/mapi/mapi/table.c)0
-rw-r--r--mesalib/src/mapi/table.h (renamed from mesalib/src/mapi/mapi/table.h)0
-rw-r--r--mesalib/src/mapi/u_compiler.h (renamed from mesalib/src/mapi/mapi/u_compiler.h)0
-rw-r--r--mesalib/src/mapi/u_current.c (renamed from mesalib/src/mapi/mapi/u_current.c)7
-rw-r--r--mesalib/src/mapi/u_current.h (renamed from mesalib/src/mapi/mapi/u_current.h)0
-rw-r--r--mesalib/src/mapi/u_execmem.c (renamed from mesalib/src/mapi/mapi/u_execmem.c)9
-rw-r--r--mesalib/src/mapi/u_execmem.h (renamed from mesalib/src/mapi/mapi/u_execmem.h)0
-rw-r--r--mesalib/src/mapi/u_macros.h (renamed from mesalib/src/mapi/mapi/u_macros.h)0
-rw-r--r--mesalib/src/mapi/u_thread.h (renamed from mesalib/src/mapi/mapi/u_thread.h)7
-rw-r--r--mesalib/src/mesa/Android.gen.mk3
-rw-r--r--mesalib/src/mesa/Android.libmesa_dricore.mk2
-rw-r--r--mesalib/src/mesa/Android.libmesa_st_mesa.mk2
-rw-r--r--mesalib/src/mesa/Makefile.am24
-rw-r--r--mesalib/src/mesa/Makefile.sources (renamed from mesalib/src/mesa/sources.mak)1
-rw-r--r--mesalib/src/mesa/SConscript12
-rw-r--r--mesalib/src/mesa/drivers/Makefile.am22
-rw-r--r--mesalib/src/mesa/drivers/common/driverfuncs.c10
-rw-r--r--mesalib/src/mesa/drivers/common/driverfuncs.h7
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c57
-rw-r--r--mesalib/src/mesa/drivers/common/meta.h7
-rw-r--r--mesalib/src/mesa/drivers/dri/common/Makefile.am1
-rw-r--r--mesalib/src/mesa/drivers/dri/common/drisw_util.c7
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlpool.h7
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h30
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/Makefile.am1
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c7
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h7
-rw-r--r--mesalib/src/mesa/main/accum.c8
-rw-r--r--mesalib/src/mesa/main/accum.h8
-rw-r--r--mesalib/src/mesa/main/api_arrayelt.c110
-rw-r--r--mesalib/src/mesa/main/api_arrayelt.h12
-rw-r--r--mesalib/src/mesa/main/api_exec.h7
-rw-r--r--mesalib/src/mesa/main/api_loopback.c8
-rw-r--r--mesalib/src/mesa/main/api_loopback.h9
-rw-r--r--mesalib/src/mesa/main/api_validate.c41
-rw-r--r--mesalib/src/mesa/main/api_validate.h13
-rw-r--r--mesalib/src/mesa/main/arbprogram.c7
-rw-r--r--mesalib/src/mesa/main/arbprogram.h7
-rw-r--r--mesalib/src/mesa/main/arrayobj.c9
-rw-r--r--mesalib/src/mesa/main/arrayobj.h8
-rw-r--r--mesalib/src/mesa/main/atifragshader.c1
-rw-r--r--mesalib/src/mesa/main/atifragshader.h1
-rw-r--r--mesalib/src/mesa/main/attrib.c11
-rw-r--r--mesalib/src/mesa/main/attrib.h8
-rw-r--r--mesalib/src/mesa/main/bitset.h11
-rw-r--r--mesalib/src/mesa/main/blend.c25
-rw-r--r--mesalib/src/mesa/main/blend.h11
-rw-r--r--mesalib/src/mesa/main/bufferobj.c21
-rw-r--r--mesalib/src/mesa/main/bufferobj.h8
-rw-r--r--mesalib/src/mesa/main/buffers.c12
-rw-r--r--mesalib/src/mesa/main/buffers.h7
-rw-r--r--mesalib/src/mesa/main/clear.c56
-rw-r--r--mesalib/src/mesa/main/clear.h7
-rw-r--r--mesalib/src/mesa/main/clip.c7
-rw-r--r--mesalib/src/mesa/main/clip.h7
-rw-r--r--mesalib/src/mesa/main/colormac.h7
-rw-r--r--mesalib/src/mesa/main/colortab.c8
-rw-r--r--mesalib/src/mesa/main/colortab.h8
-rw-r--r--mesalib/src/mesa/main/compiler.h7
-rw-r--r--mesalib/src/mesa/main/config.h21
-rw-r--r--mesalib/src/mesa/main/context.c44
-rw-r--r--mesalib/src/mesa/main/context.h38
-rw-r--r--mesalib/src/mesa/main/convolve.c8
-rw-r--r--mesalib/src/mesa/main/convolve.h8
-rw-r--r--mesalib/src/mesa/main/cpuinfo.c7
-rw-r--r--mesalib/src/mesa/main/cpuinfo.h7
-rw-r--r--mesalib/src/mesa/main/dd.h132
-rw-r--r--mesalib/src/mesa/main/debug.c31
-rw-r--r--mesalib/src/mesa/main/debug.h9
-rw-r--r--mesalib/src/mesa/main/depth.c15
-rw-r--r--mesalib/src/mesa/main/depth.h8
-rw-r--r--mesalib/src/mesa/main/dlist.c146
-rw-r--r--mesalib/src/mesa/main/dlist.h16
-rw-r--r--mesalib/src/mesa/main/dlopen.h7
-rw-r--r--mesalib/src/mesa/main/drawpix.c8
-rw-r--r--mesalib/src/mesa/main/drawpix.h8
-rw-r--r--mesalib/src/mesa/main/drawtex.c1
-rw-r--r--mesalib/src/mesa/main/drawtex.h1
-rw-r--r--mesalib/src/mesa/main/enable.c27
-rw-r--r--mesalib/src/mesa/main/enable.h7
-rw-r--r--mesalib/src/mesa/main/enums.h8
-rw-r--r--mesalib/src/mesa/main/errors.c7
-rw-r--r--mesalib/src/mesa/main/errors.h17
-rw-r--r--mesalib/src/mesa/main/es1_conversion.c1
-rw-r--r--mesalib/src/mesa/main/eval.c18
-rw-r--r--mesalib/src/mesa/main/eval.h23
-rw-r--r--mesalib/src/mesa/main/execmem.c9
-rw-r--r--mesalib/src/mesa/main/extensions.c17
-rw-r--r--mesalib/src/mesa/main/extensions.h8
-rw-r--r--mesalib/src/mesa/main/fbobject.c187
-rw-r--r--mesalib/src/mesa/main/fbobject.h38
-rw-r--r--mesalib/src/mesa/main/feedback.c8
-rw-r--r--mesalib/src/mesa/main/feedback.h8
-rw-r--r--mesalib/src/mesa/main/ff_fragment_shader.cpp5
-rw-r--r--mesalib/src/mesa/main/ffvertex_prog.c9
-rw-r--r--mesalib/src/mesa/main/fog.c7
-rw-r--r--mesalib/src/mesa/main/fog.h8
-rw-r--r--mesalib/src/mesa/main/format_pack.c7
-rw-r--r--mesalib/src/mesa/main/format_pack.h7
-rw-r--r--mesalib/src/mesa/main/format_unpack.c604
-rw-r--r--mesalib/src/mesa/main/format_unpack.h7
-rw-r--r--mesalib/src/mesa/main/formatquery.c1
-rw-r--r--mesalib/src/mesa/main/formats.c8
-rw-r--r--mesalib/src/mesa/main/formats.h37
-rw-r--r--mesalib/src/mesa/main/framebuffer.c88
-rw-r--r--mesalib/src/mesa/main/framebuffer.h7
-rw-r--r--mesalib/src/mesa/main/get.c123
-rw-r--r--mesalib/src/mesa/main/get.h7
-rw-r--r--mesalib/src/mesa/main/get_hash_generator.py26
-rw-r--r--mesalib/src/mesa/main/get_hash_params.py26
-rw-r--r--mesalib/src/mesa/main/getstring.c8
-rw-r--r--mesalib/src/mesa/main/glformats.c7
-rw-r--r--mesalib/src/mesa/main/glformats.h7
-rw-r--r--mesalib/src/mesa/main/glheader.h7
-rw-r--r--mesalib/src/mesa/main/hash.c11
-rw-r--r--mesalib/src/mesa/main/hash.h7
-rw-r--r--mesalib/src/mesa/main/hint.c7
-rw-r--r--mesalib/src/mesa/main/hint.h8
-rw-r--r--mesalib/src/mesa/main/histogram.c8
-rw-r--r--mesalib/src/mesa/main/histogram.h8
-rw-r--r--mesalib/src/mesa/main/image.c8
-rw-r--r--mesalib/src/mesa/main/image.h7
-rw-r--r--mesalib/src/mesa/main/imports.c7
-rw-r--r--mesalib/src/mesa/main/imports.h7
-rw-r--r--mesalib/src/mesa/main/light.c11
-rw-r--r--mesalib/src/mesa/main/light.h8
-rw-r--r--mesalib/src/mesa/main/lines.c7
-rw-r--r--mesalib/src/mesa/main/lines.h7
-rw-r--r--mesalib/src/mesa/main/macros.h13
-rw-r--r--mesalib/src/mesa/main/matrix.c8
-rw-r--r--mesalib/src/mesa/main/matrix.h7
-rw-r--r--mesalib/src/mesa/main/mfeatures.h53
-rw-r--r--mesalib/src/mesa/main/mipmap.c7
-rw-r--r--mesalib/src/mesa/main/mipmap.h7
-rw-r--r--mesalib/src/mesa/main/mtypes.h149
-rw-r--r--mesalib/src/mesa/main/multisample.c12
-rw-r--r--mesalib/src/mesa/main/multisample.h7
-rw-r--r--mesalib/src/mesa/main/pack.h7
-rw-r--r--mesalib/src/mesa/main/pbo.c7
-rw-r--r--mesalib/src/mesa/main/pbo.h7
-rw-r--r--mesalib/src/mesa/main/pixel.c8
-rw-r--r--mesalib/src/mesa/main/pixel.h8
-rw-r--r--mesalib/src/mesa/main/pixelstore.c25
-rw-r--r--mesalib/src/mesa/main/pixelstore.h7
-rw-r--r--mesalib/src/mesa/main/pixeltransfer.c7
-rw-r--r--mesalib/src/mesa/main/pixeltransfer.h7
-rw-r--r--mesalib/src/mesa/main/points.c12
-rw-r--r--mesalib/src/mesa/main/points.h7
-rw-r--r--mesalib/src/mesa/main/polygon.c12
-rw-r--r--mesalib/src/mesa/main/polygon.h7
-rw-r--r--mesalib/src/mesa/main/querymatrix.h1
-rw-r--r--mesalib/src/mesa/main/queryobj.c15
-rw-r--r--mesalib/src/mesa/main/queryobj.h8
-rw-r--r--mesalib/src/mesa/main/rastpos.c8
-rw-r--r--mesalib/src/mesa/main/rastpos.h8
-rw-r--r--mesalib/src/mesa/main/readpix.c7
-rw-r--r--mesalib/src/mesa/main/readpix.h7
-rw-r--r--mesalib/src/mesa/main/remap.c7
-rw-r--r--mesalib/src/mesa/main/remap.h35
-rw-r--r--mesalib/src/mesa/main/renderbuffer.c8
-rw-r--r--mesalib/src/mesa/main/renderbuffer.h7
-rw-r--r--mesalib/src/mesa/main/samplerobj.c8
-rw-r--r--mesalib/src/mesa/main/samplerobj.h7
-rw-r--r--mesalib/src/mesa/main/scissor.c7
-rw-r--r--mesalib/src/mesa/main/scissor.h7
-rw-r--r--mesalib/src/mesa/main/shaderapi.c19
-rw-r--r--mesalib/src/mesa/main/shaderapi.h7
-rw-r--r--mesalib/src/mesa/main/shaderobj.c8
-rw-r--r--mesalib/src/mesa/main/shaderobj.h7
-rw-r--r--mesalib/src/mesa/main/shared.c8
-rw-r--r--mesalib/src/mesa/main/shared.h7
-rw-r--r--mesalib/src/mesa/main/simple_list.h7
-rw-r--r--mesalib/src/mesa/main/state.c110
-rw-r--r--mesalib/src/mesa/main/state.h7
-rw-r--r--mesalib/src/mesa/main/stencil.c21
-rw-r--r--mesalib/src/mesa/main/stencil.h21
-rw-r--r--mesalib/src/mesa/main/syncobj.c1
-rw-r--r--mesalib/src/mesa/main/syncobj.h1
-rw-r--r--mesalib/src/mesa/main/texcompress.c10
-rw-r--r--mesalib/src/mesa/main/texcompress.h11
-rw-r--r--mesalib/src/mesa/main/texcompress_cpal.c8
-rw-r--r--mesalib/src/mesa/main/texcompress_cpal.h7
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.c52
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.h1
-rw-r--r--mesalib/src/mesa/main/texcompress_fxt1.c16
-rw-r--r--mesalib/src/mesa/main/texcompress_fxt1.h8
-rw-r--r--mesalib/src/mesa/main/texcompress_rgtc.c71
-rw-r--r--mesalib/src/mesa/main/texcompress_rgtc.h1
-rw-r--r--mesalib/src/mesa/main/texcompress_s3tc.c64
-rw-r--r--mesalib/src/mesa/main/texcompress_s3tc.h8
-rw-r--r--mesalib/src/mesa/main/texenv.c15
-rw-r--r--mesalib/src/mesa/main/texenv.h7
-rw-r--r--mesalib/src/mesa/main/texenvprogram.h7
-rw-r--r--mesalib/src/mesa/main/texformat.c1475
-rw-r--r--mesalib/src/mesa/main/texformat.h9
-rw-r--r--mesalib/src/mesa/main/texgen.c8
-rw-r--r--mesalib/src/mesa/main/texgen.h8
-rw-r--r--mesalib/src/mesa/main/texgetimage.c8
-rw-r--r--mesalib/src/mesa/main/texgetimage.h7
-rw-r--r--mesalib/src/mesa/main/teximage.c108
-rw-r--r--mesalib/src/mesa/main/teximage.h7
-rw-r--r--mesalib/src/mesa/main/texobj.c8
-rw-r--r--mesalib/src/mesa/main/texobj.h7
-rw-r--r--mesalib/src/mesa/main/texparam.c8
-rw-r--r--mesalib/src/mesa/main/texparam.h7
-rw-r--r--mesalib/src/mesa/main/texstate.c8
-rw-r--r--mesalib/src/mesa/main/texstate.h7
-rw-r--r--mesalib/src/mesa/main/texstorage.c38
-rw-r--r--mesalib/src/mesa/main/texstorage.h12
-rw-r--r--mesalib/src/mesa/main/texstore.c8
-rw-r--r--mesalib/src/mesa/main/texstore.h7
-rw-r--r--mesalib/src/mesa/main/transformfeedback.c28
-rw-r--r--mesalib/src/mesa/main/transformfeedback.h8
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp31
-rw-r--r--mesalib/src/mesa/main/uniforms.c22
-rw-r--r--mesalib/src/mesa/main/uniforms.h7
-rw-r--r--mesalib/src/mesa/main/varray.c41
-rw-r--r--mesalib/src/mesa/main/varray.h10
-rw-r--r--mesalib/src/mesa/main/version.c9
-rw-r--r--mesalib/src/mesa/main/version.h7
-rw-r--r--mesalib/src/mesa/main/viewport.c7
-rw-r--r--mesalib/src/mesa/main/viewport.h7
-rw-r--r--mesalib/src/mesa/main/vtxfmt.c59
-rw-r--r--mesalib/src/mesa/main/vtxfmt.h8
-rw-r--r--mesalib/src/mesa/math/m_clip_tmp.h7
-rw-r--r--mesalib/src/mesa/math/m_copy_tmp.h7
-rw-r--r--mesalib/src/mesa/math/m_debug.h7
-rw-r--r--mesalib/src/mesa/math/m_debug_clip.c7
-rw-r--r--mesalib/src/mesa/math/m_debug_norm.c7
-rw-r--r--mesalib/src/mesa/math/m_debug_util.h7
-rw-r--r--mesalib/src/mesa/math/m_debug_xform.c7
-rw-r--r--mesalib/src/mesa/math/m_dotprod_tmp.h7
-rw-r--r--mesalib/src/mesa/math/m_eval.c7
-rw-r--r--mesalib/src/mesa/math/m_eval.h7
-rw-r--r--mesalib/src/mesa/math/m_matrix.c7
-rw-r--r--mesalib/src/mesa/math/m_matrix.h7
-rw-r--r--mesalib/src/mesa/math/m_norm_tmp.h7
-rw-r--r--mesalib/src/mesa/math/m_trans_tmp.h7
-rw-r--r--mesalib/src/mesa/math/m_translate.c7
-rw-r--r--mesalib/src/mesa/math/m_translate.h7
-rw-r--r--mesalib/src/mesa/math/m_vector.c7
-rw-r--r--mesalib/src/mesa/math/m_vector.h7
-rw-r--r--mesalib/src/mesa/math/m_xform.c7
-rw-r--r--mesalib/src/mesa/math/m_xform.h7
-rw-r--r--mesalib/src/mesa/math/m_xform_tmp.h7
-rw-r--r--mesalib/src/mesa/program/Android.mk4
-rw-r--r--mesalib/src/mesa/program/Makefile.am4
-rw-r--r--mesalib/src/mesa/program/arbprogparse.c7
-rw-r--r--mesalib/src/mesa/program/arbprogparse.h7
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp38
-rw-r--r--mesalib/src/mesa/program/prog_execute.c142
-rw-r--r--mesalib/src/mesa/program/prog_execute.h7
-rw-r--r--mesalib/src/mesa/program/prog_instruction.c16
-rw-r--r--mesalib/src/mesa/program/prog_instruction.h18
-rw-r--r--mesalib/src/mesa/program/prog_noise.c7
-rw-r--r--mesalib/src/mesa/program/prog_noise.h7
-rw-r--r--mesalib/src/mesa/program/prog_opt_constant_fold.c4
-rw-r--r--mesalib/src/mesa/program/prog_parameter.c7
-rw-r--r--mesalib/src/mesa/program/prog_parameter.h7
-rw-r--r--mesalib/src/mesa/program/prog_print.c21
-rw-r--r--mesalib/src/mesa/program/prog_print.h7
-rw-r--r--mesalib/src/mesa/program/prog_statevars.c7
-rw-r--r--mesalib/src/mesa/program/prog_statevars.h7
-rw-r--r--mesalib/src/mesa/program/program.c8
-rw-r--r--mesalib/src/mesa/program/program.h7
-rw-r--r--mesalib/src/mesa/program/program_parse.y7
-rw-r--r--mesalib/src/mesa/program/program_parse_extra.c24
-rw-r--r--mesalib/src/mesa/program/programopt.c9
-rw-r--r--mesalib/src/mesa/program/programopt.h7
-rw-r--r--mesalib/src/mesa/program/register_allocate.c6
-rw-r--r--mesalib/src/mesa/program/sampler.cpp20
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_array.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_constbuf.c28
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_depth.c9
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_framebuffer.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_msaa.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_rasterizer.c11
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_sampler.c33
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_scissor.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c11
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_blit.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_blit.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c19
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_clear.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawtex.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawtex.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_eglimage.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_eglimage.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_fbo.c39
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_feedback.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_feedback.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_flush.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_flush.h2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_msaa.c59
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_msaa.h39
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_queryobj.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_queryobj.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_rasterpos.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_rasterpos.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c51
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_xformfb.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_xformfb.h1
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.c10
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.h3
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw.c5
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw_feedback.c15
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c148
-rw-r--r--mesalib/src/mesa/state_tracker/st_format.c36
-rw-r--r--mesalib/src/mesa/state_tracker/st_format.h4
-rw-r--r--mesalib/src/mesa/state_tracker/st_gen_mipmap.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp48
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c34
-rw-r--r--mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c22
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.h11
-rw-r--r--mesalib/src/mesa/swrast/s_aaline.c7
-rw-r--r--mesalib/src/mesa/swrast/s_aaline.h7
-rw-r--r--mesalib/src/mesa/swrast/s_aalinetemp.h7
-rw-r--r--mesalib/src/mesa/swrast/s_aatriangle.c7
-rw-r--r--mesalib/src/mesa/swrast/s_aatriangle.h7
-rw-r--r--mesalib/src/mesa/swrast/s_aatritemp.h7
-rw-r--r--mesalib/src/mesa/swrast/s_alpha.c7
-rw-r--r--mesalib/src/mesa/swrast/s_alpha.h7
-rw-r--r--mesalib/src/mesa/swrast/s_bitmap.c7
-rw-r--r--mesalib/src/mesa/swrast/s_blend.c7
-rw-r--r--mesalib/src/mesa/swrast/s_blend.h7
-rw-r--r--mesalib/src/mesa/swrast/s_blit.c99
-rw-r--r--mesalib/src/mesa/swrast/s_chan.h7
-rw-r--r--mesalib/src/mesa/swrast/s_clear.c7
-rw-r--r--mesalib/src/mesa/swrast/s_context.c16
-rw-r--r--mesalib/src/mesa/swrast/s_context.h35
-rw-r--r--mesalib/src/mesa/swrast/s_copypix.c7
-rw-r--r--mesalib/src/mesa/swrast/s_depth.c7
-rw-r--r--mesalib/src/mesa/swrast/s_depth.h7
-rw-r--r--mesalib/src/mesa/swrast/s_drawpix.c7
-rw-r--r--mesalib/src/mesa/swrast/s_feedback.c7
-rw-r--r--mesalib/src/mesa/swrast/s_feedback.h7
-rw-r--r--mesalib/src/mesa/swrast/s_fog.c7
-rw-r--r--mesalib/src/mesa/swrast/s_fog.h7
-rw-r--r--mesalib/src/mesa/swrast/s_fragprog.c7
-rw-r--r--mesalib/src/mesa/swrast/s_fragprog.h7
-rw-r--r--mesalib/src/mesa/swrast/s_lines.c7
-rw-r--r--mesalib/src/mesa/swrast/s_lines.h7
-rw-r--r--mesalib/src/mesa/swrast/s_linetemp.h7
-rw-r--r--mesalib/src/mesa/swrast/s_logic.c7
-rw-r--r--mesalib/src/mesa/swrast/s_logic.h7
-rw-r--r--mesalib/src/mesa/swrast/s_masking.c7
-rw-r--r--mesalib/src/mesa/swrast/s_masking.h7
-rw-r--r--mesalib/src/mesa/swrast/s_points.c7
-rw-r--r--mesalib/src/mesa/swrast/s_points.h7
-rw-r--r--mesalib/src/mesa/swrast/s_renderbuffer.c7
-rw-r--r--mesalib/src/mesa/swrast/s_renderbuffer.h7
-rw-r--r--mesalib/src/mesa/swrast/s_span.c7
-rw-r--r--mesalib/src/mesa/swrast/s_span.h7
-rw-r--r--mesalib/src/mesa/swrast/s_stencil.c13
-rw-r--r--mesalib/src/mesa/swrast/s_stencil.h7
-rw-r--r--mesalib/src/mesa/swrast/s_texcombine.c9
-rw-r--r--mesalib/src/mesa/swrast/s_texcombine.h7
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch.c22
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch.h7
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch_tmp.h18
-rw-r--r--mesalib/src/mesa/swrast/s_texfilter.c15
-rw-r--r--mesalib/src/mesa/swrast/s_texfilter.h7
-rw-r--r--mesalib/src/mesa/swrast/s_texrender.c63
-rw-r--r--mesalib/src/mesa/swrast/s_texture.c186
-rw-r--r--mesalib/src/mesa/swrast/s_triangle.c18
-rw-r--r--mesalib/src/mesa/swrast/s_triangle.h7
-rw-r--r--mesalib/src/mesa/swrast/s_tritemp.h7
-rw-r--r--mesalib/src/mesa/swrast/s_zoom.c7
-rw-r--r--mesalib/src/mesa/swrast/s_zoom.h7
-rw-r--r--mesalib/src/mesa/swrast/swrast.h19
-rw-r--r--mesalib/src/mesa/swrast_setup/ss_context.c7
-rw-r--r--mesalib/src/mesa/swrast_setup/ss_context.h7
-rw-r--r--mesalib/src/mesa/swrast_setup/ss_triangle.c7
-rw-r--r--mesalib/src/mesa/swrast_setup/ss_triangle.h7
-rw-r--r--mesalib/src/mesa/swrast_setup/ss_tritmp.h7
-rw-r--r--mesalib/src/mesa/swrast_setup/ss_vb.h7
-rw-r--r--mesalib/src/mesa/swrast_setup/swrast_setup.h7
-rw-r--r--mesalib/src/mesa/tnl/t_context.c7
-rw-r--r--mesalib/src/mesa/tnl/t_context.h7
-rw-r--r--mesalib/src/mesa/tnl/t_draw.c7
-rw-r--r--mesalib/src/mesa/tnl/t_pipeline.c7
-rw-r--r--mesalib/src/mesa/tnl/t_pipeline.h7
-rw-r--r--mesalib/src/mesa/tnl/t_rasterpos.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_cliptmp.h7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_fog.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_light.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_lighttmp.h10
-rw-r--r--mesalib/src/mesa/tnl/t_vb_normals.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_points.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_program.c11
-rw-r--r--mesalib/src/mesa/tnl/t_vb_render.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_rendertmp.h7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_texgen.c10
-rw-r--r--mesalib/src/mesa/tnl/t_vb_texmat.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vb_vertex.c7
-rw-r--r--mesalib/src/mesa/tnl/t_vertex.c13
-rw-r--r--mesalib/src/mesa/tnl/tnl.h7
-rw-r--r--mesalib/src/mesa/vbo/vbo.h26
-rw-r--r--mesalib/src/mesa/vbo/vbo_context.c7
-rw-r--r--mesalib/src/mesa/vbo/vbo_context.h8
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec.c128
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec.h5
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_api.c182
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_array.c235
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_draw.c8
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_eval.c7
-rw-r--r--mesalib/src/mesa/vbo/vbo_noop.c100
-rw-r--r--mesalib/src/mesa/vbo/vbo_noop.h8
-rw-r--r--mesalib/src/mesa/vbo/vbo_primitive_restart.c3
-rw-r--r--mesalib/src/mesa/vbo/vbo_rebase.c7
-rw-r--r--mesalib/src/mesa/vbo/vbo_save.c10
-rw-r--r--mesalib/src/mesa/vbo/vbo_save.h9
-rw-r--r--mesalib/src/mesa/vbo/vbo_save_api.c364
-rw-r--r--mesalib/src/mesa/vbo/vbo_save_draw.c25
-rw-r--r--mesalib/src/mesa/vbo/vbo_save_loopback.c3
-rw-r--r--mesalib/src/mesa/vbo/vbo_split.c7
-rw-r--r--mesalib/src/mesa/vbo/vbo_split.h7
-rw-r--r--mesalib/src/mesa/vbo/vbo_split_copy.c7
-rw-r--r--mesalib/src/mesa/vbo/vbo_split_inplace.c7
-rw-r--r--mesalib/src/mesa/x86/3dnow.c7
-rw-r--r--mesalib/src/mesa/x86/3dnow.h7
-rw-r--r--mesalib/src/mesa/x86/3dnow_normal.S7
-rw-r--r--mesalib/src/mesa/x86/3dnow_xform1.S7
-rw-r--r--mesalib/src/mesa/x86/3dnow_xform2.S7
-rw-r--r--mesalib/src/mesa/x86/3dnow_xform3.S7
-rw-r--r--mesalib/src/mesa/x86/3dnow_xform4.S7
-rw-r--r--mesalib/src/mesa/x86/Makefile.am1
-rw-r--r--mesalib/src/mesa/x86/clip_args.h7
-rw-r--r--mesalib/src/mesa/x86/common_x86.c7
-rw-r--r--mesalib/src/mesa/x86/common_x86_asm.S7
-rw-r--r--mesalib/src/mesa/x86/common_x86_asm.h7
-rw-r--r--mesalib/src/mesa/x86/common_x86_features.h7
-rw-r--r--mesalib/src/mesa/x86/gen_matypes.c7
-rw-r--r--mesalib/src/mesa/x86/mmx.h7
-rw-r--r--mesalib/src/mesa/x86/norm_args.h7
-rw-r--r--mesalib/src/mesa/x86/sse.c7
-rw-r--r--mesalib/src/mesa/x86/sse.h7
-rw-r--r--mesalib/src/mesa/x86/sse_normal.S7
-rw-r--r--mesalib/src/mesa/x86/sse_xform1.S7
-rw-r--r--mesalib/src/mesa/x86/sse_xform2.S7
-rw-r--r--mesalib/src/mesa/x86/sse_xform3.S7
-rw-r--r--mesalib/src/mesa/x86/sse_xform4.S7
-rw-r--r--mesalib/src/mesa/x86/x86_cliptest.S7
-rw-r--r--mesalib/src/mesa/x86/x86_xform.c7
-rw-r--r--mesalib/src/mesa/x86/x86_xform.h7
-rw-r--r--mesalib/src/mesa/x86/x86_xform2.S7
-rw-r--r--mesalib/src/mesa/x86/x86_xform3.S7
-rw-r--r--mesalib/src/mesa/x86/x86_xform4.S7
-rw-r--r--mesalib/src/mesa/x86/xform_args.h7
688 files changed, 9138 insertions, 5934 deletions
diff --git a/mesalib/Android.mk b/mesalib/Android.mk
index 80c0e1395..c3c1f08f0 100644
--- a/mesalib/Android.mk
+++ b/mesalib/Android.mk
@@ -24,7 +24,7 @@
# BOARD_GPU_DRIVERS should be defined. The valid values are
#
# classic drivers: i915 i965
-# gallium drivers: swrast i915g nouveau r300g r600g radeonsi vmwgfx
+# gallium drivers: swrast i915g ilo nouveau r300g r600g radeonsi vmwgfx
#
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
# module will also be built. DRI modules will be loaded by libGLES_mesa.
@@ -42,7 +42,7 @@ DRM_TOP := external/drm
DRM_GRALLOC_TOP := hardware/drm_gralloc
classic_drivers := i915 i965
-gallium_drivers := swrast i915g nouveau r300g r600g radeonsi vmwgfx
+gallium_drivers := swrast i915g ilo nouveau r300g r600g radeonsi vmwgfx
MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
diff --git a/mesalib/bin/bugzilla_mesa.sh b/mesalib/bin/bugzilla_mesa.sh
new file mode 100644
index 000000000..491ca0e7c
--- /dev/null
+++ b/mesalib/bin/bugzilla_mesa.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# This script is used to generate the list of fixed bugs that
+# appears in the release notes files, with HTML formatting.
+#
+# Note: This script could take a while until all details have
+# been fetched from bugzilla.
+#
+# Usage examples:
+#
+# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
+# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 > bugfixes
+# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee bugfixes
+# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
+# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | wc -l
+
+
+# regex pattern: trim before url
+trim_before='s/.*\(http\)/\1/'
+
+# regex pattern: trim after url
+trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/'
+
+# regex pattern: always use https
+use_https='s/http:/https:/'
+
+# extract fdo urls from commit log
+urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq)
+
+# if DRYRUN is set to "yes", simply print the URLs and don't fetch the
+# details from fdo bugzilla.
+#DRYRUN=yes
+
+if [ "x$DRYRUN" = xyes ]; then
+ for i in $urls
+ do
+ echo $i
+ done
+else
+ echo "<ul>"
+ echo ""
+
+ for i in $urls
+ do
+ id=$(echo $i | cut -d'=' -f2)
+ summary=$(wget --quiet -O - $i | grep -e '<title>.*</title>' | sed -e 's/ *<title>Bug [0-9]\+ &ndash; \(.*\)<\/title>/\1/')
+ echo "<li><a href=\"$i\">Bug $id</a> - $summary</li>"
+ echo ""
+ done
+
+ echo "</ul>"
+fi
diff --git a/mesalib/bin/get-pick-list.sh b/mesalib/bin/get-pick-list.sh
index d3ac511c1..d2b76e7e6 100644
--- a/mesalib/bin/get-pick-list.sh
+++ b/mesalib/bin/get-pick-list.sh
@@ -1,6 +1,12 @@
#!/bin/sh
# Script for generating a list of candidates for cherry-picking to a stable branch
+#
+# Usage examples:
+#
+# $ bin/get-pick-list.sh
+# $ bin/get-pick-list.sh > picklist
+# $ bin/get-pick-list.sh | tee picklist
# Grep for commits with "cherry picked from commit" in the commit message.
git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
diff --git a/mesalib/bin/perf-annotate-jit b/mesalib/bin/perf-annotate-jit
new file mode 100644
index 000000000..746434008
--- /dev/null
+++ b/mesalib/bin/perf-annotate-jit
@@ -0,0 +1,251 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 VMware Inc
+# Copyright 2008-2009 Jose Fonseca
+#
+# 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.
+#
+
+"""Perf annotate for JIT code.
+
+Linux `perf annotate` does not work with JIT code. This script takes the data
+produced by `perf script` command, plus the diassemblies outputed by gallivm
+into /tmp/perf-XXXXX.map.asm and produces output similar to `perf annotate`.
+
+See docs/llvmpipe.html for usage instructions.
+
+The `perf script` output parser was derived from the gprof2dot.py script.
+"""
+
+
+import sys
+import os.path
+import re
+import optparse
+import subprocess
+
+
+class Parser:
+ """Parser interface."""
+
+ def __init__(self):
+ pass
+
+ def parse(self):
+ raise NotImplementedError
+
+
+class LineParser(Parser):
+ """Base class for parsers that read line-based formats."""
+
+ def __init__(self, file):
+ Parser.__init__(self)
+ self._file = file
+ self.__line = None
+ self.__eof = False
+ self.line_no = 0
+
+ def readline(self):
+ line = self._file.readline()
+ if not line:
+ self.__line = ''
+ self.__eof = True
+ else:
+ self.line_no += 1
+ self.__line = line.rstrip('\r\n')
+
+ def lookahead(self):
+ assert self.__line is not None
+ return self.__line
+
+ def consume(self):
+ assert self.__line is not None
+ line = self.__line
+ self.readline()
+ return line
+
+ def eof(self):
+ assert self.__line is not None
+ return self.__eof
+
+
+mapFile = None
+
+def lookupMap(filename, matchSymbol):
+ global mapFile
+ mapFile = filename
+ stream = open(filename, 'rt')
+ for line in stream:
+ start, length, symbol = line.split()
+
+ start = int(start, 16)
+ length = int(length,16)
+
+ if symbol == matchSymbol:
+ return start
+
+ return None
+
+def lookupAsm(filename, desiredFunction):
+ stream = open(filename + '.asm', 'rt')
+ while stream.readline() != desiredFunction + ':\n':
+ pass
+
+ asm = []
+ line = stream.readline().strip()
+ while line:
+ addr, instr = line.split(':', 1)
+ addr = int(addr)
+ asm.append((addr, instr))
+ line = stream.readline().strip()
+
+ return asm
+
+
+
+samples = {}
+
+
+class PerfParser(LineParser):
+ """Parser for linux perf callgraph output.
+
+ It expects output generated with
+
+ perf record -g
+ perf script
+ """
+
+ def __init__(self, infile, symbol):
+ LineParser.__init__(self, infile)
+ self.symbol = symbol
+
+ def readline(self):
+ # Override LineParser.readline to ignore comment lines
+ while True:
+ LineParser.readline(self)
+ if self.eof() or not self.lookahead().startswith('#'):
+ break
+
+ def parse(self):
+ # read lookahead
+ self.readline()
+
+ while not self.eof():
+ self.parse_event()
+
+ asm = lookupAsm(mapFile, self.symbol)
+
+ addresses = samples.keys()
+ addresses.sort()
+ total_samples = 0
+
+ sys.stdout.write('%s:\n' % self.symbol)
+ for address, instr in asm:
+ try:
+ sample = samples.pop(address)
+ except KeyError:
+ sys.stdout.write(6*' ')
+ else:
+ sys.stdout.write('%6u' % (sample))
+ total_samples += sample
+ sys.stdout.write('%6u: %s\n' % (address, instr))
+ print 'total:', total_samples
+ assert len(samples) == 0
+
+ sys.exit(0)
+
+ def parse_event(self):
+ if self.eof():
+ return
+
+ line = self.consume()
+ assert line
+
+ callchain = self.parse_callchain()
+ if not callchain:
+ return
+
+ def parse_callchain(self):
+ callchain = []
+ while self.lookahead():
+ function = self.parse_call(len(callchain) == 0)
+ if function is None:
+ break
+ callchain.append(function)
+ if self.lookahead() == '':
+ self.consume()
+ return callchain
+
+ call_re = re.compile(r'^\s+(?P<address>[0-9a-fA-F]+)\s+(?P<symbol>.*)\s+\((?P<module>[^)]*)\)$')
+
+ def parse_call(self, first):
+ line = self.consume()
+ mo = self.call_re.match(line)
+ assert mo
+ if not mo:
+ return None
+
+ if not first:
+ return None
+
+ function_name = mo.group('symbol')
+ if not function_name:
+ function_name = mo.group('address')
+
+ module = mo.group('module')
+
+ function_id = function_name + ':' + module
+
+ address = mo.group('address')
+ address = int(address, 16)
+
+ if function_name != self.symbol:
+ return None
+
+ start_address = lookupMap(module, function_name)
+ address -= start_address
+
+ #print function_name, module, address
+
+ samples[address] = samples.get(address, 0) + 1
+
+ return True
+
+
+def main():
+ """Main program."""
+
+ optparser = optparse.OptionParser(
+ usage="\n\t%prog [options] symbol_name")
+ (options, args) = optparser.parse_args(sys.argv[1:])
+ if len(args) != 1:
+ optparser.error('wrong number of arguments')
+
+ symbol = args[0]
+
+ p = subprocess.Popen(['perf', 'script'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ parser = PerfParser(p.stdout, symbol)
+ parser.parse()
+
+
+if __name__ == '__main__':
+ main()
+
+
+# vim: set sw=4 et:
diff --git a/mesalib/bin/shortlog_mesa.sh b/mesalib/bin/shortlog_mesa.sh
index b20c52fdd..2ba0815de 100644
--- a/mesalib/bin/shortlog_mesa.sh
+++ b/mesalib/bin/shortlog_mesa.sh
@@ -2,6 +2,12 @@
# This script is used to generate the list of changes that
# appears in the release notes files, with HTML formatting.
+#
+# Usage examples:
+#
+# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3
+# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 > changes
+# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee changes
typeset -i in_log=0
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 81d4a3f3e..521331bb4 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -31,7 +31,7 @@ AC_SUBST([OSMESA_VERSION])
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.24
-LIBDRM_RADEON_REQUIRED=2.4.42
+LIBDRM_RADEON_REQUIRED=2.4.45
LIBDRM_INTEL_REQUIRED=2.4.38
LIBDRM_NVVIEUX_REQUIRED=2.4.33
LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41"
@@ -652,7 +652,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
AC_ARG_WITH([gallium-drivers],
[AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
[comma delimited Gallium drivers list, e.g.
- "i915,nouveau,r300,r600,radeonsi,freedreno,svga,swrast"
+ "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast"
@<:@default=r300,r600,svga,swrast@:>@])],
[with_gallium_drivers="$withval"],
[with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
@@ -676,19 +676,23 @@ if test "x$enable_opengl" = xno -a \
AC_MSG_ERROR([at least one API should be enabled])
fi
-API_DEFINES=""
-if test "x$enable_opengl" = xno; then
- API_DEFINES="$API_DEFINES -DFEATURE_GL=0"
-else
- API_DEFINES="$API_DEFINES -DFEATURE_GL=1"
-fi
-if test "x$enable_gles1" = xyes; then
- API_DEFINES="$API_DEFINES -DFEATURE_ES1=1"
+# Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
+if test "x$enable_opengl" = xno -a \
+ "x$enable_gles1" = xyes; then
+ AC_MSG_ERROR([Building OpenGL ES1 without OpenGL is not supported])
fi
-if test "x$enable_gles2" = xyes; then
- API_DEFINES="$API_DEFINES -DFEATURE_ES2=1"
+
+if test "x$enable_opengl" = xno -a \
+ "x$enable_gles2" = xyes; then
+ AC_MSG_ERROR([Building OpenGL ES2 without OpenGL is not supported])
fi
-AC_SUBST([API_DEFINES])
+
+AM_CONDITIONAL(HAVE_OPENGL, test "x$enable_opengl" = xyes)
+AM_CONDITIONAL(HAVE_OPENGL_ES1, test "x$enable_gles1" = xyes)
+AM_CONDITIONAL(HAVE_OPENGL_ES2, test "x$enable_gles2" = xyes)
+AM_CONDITIONAL(NEED_OPENGL_COMMON, test "x$enable_opengl" = xyes -o \
+ "x$enable_gles1" = xyes -o \
+ "x$enable_gles2" = xyes)
if test "x$enable_glx" = xno; then
AC_MSG_WARN([GLX disabled, disabling Xlib-GLX])
@@ -717,6 +721,8 @@ if test "x$enable_glx" = xyes -a \
enable_glx=no
fi
+AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \
+ "x$enable_dri" = xyes)
AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
"x$enable_osmesa" = xyes)
@@ -733,80 +739,35 @@ if test "x$enable_dri" = xno; then
enable_shared_glapi=no
fi
-if test "x$enable_shared_glapi" = xyes; then
- # libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use
- # the remap table)
- DEFINES="$DEFINES -DIN_DRI_DRIVER"
- CORE_DIRS="mapi/shared-glapi"
-fi
AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
dnl
dnl Driver specific build directories
dnl
-GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_TARGET_DIRS=""
GALLIUM_WINSYS_DIRS="sw"
GALLIUM_DRIVERS_DIRS="galahad trace rbug noop identity"
GALLIUM_STATE_TRACKERS_DIRS=""
-# build glapi if OpenGL is enabled
-if test "x$enable_opengl" = xyes; then
- CORE_DIRS="$CORE_DIRS mapi/glapi"
-fi
-
-# build es1api if OpenGL ES 1.x is enabled
-if test "x$enable_gles1" = xyes; then
- CORE_DIRS="$CORE_DIRS mapi/es1api"
-fi
-
-# build es2api if OpenGL ES 2.x is enabled
-if test "x$enable_gles2" = xyes; then
- CORE_DIRS="$CORE_DIRS mapi/es2api"
-fi
-
-# build glsl and mesa if OpenGL or OpenGL ES is enabled
-case "x$enable_opengl$enable_gles1$enable_gles2" in
-x*yes*)
- CORE_DIRS="mapi/glapi/gen $CORE_DIRS gtest glsl mesa"
- ;;
-esac
-
case "x$enable_glx$enable_xlib_glx" in
xyesyes)
- DRIVER_DIRS="$DRIVER_DIRS x11"
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib"
GALLIUM_STATE_TRACKERS_DIRS="glx $GALLIUM_STATE_TRACKERS_DIRS"
- HAVE_WINSYS_XLIB="yes"
- ;;
-xyesno)
- # DRI-based GLX
- SRC_DIRS="$SRC_DIRS glx"
+ NEED_WINSYS_XLIB="yes"
;;
esac
if test "x$enable_dri" = xyes; then
- DRIVER_DIRS="$DRIVER_DIRS dri"
-
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/dri"
GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
- HAVE_ST_DRI="yes"
fi
if test "x$enable_osmesa" = xyes; then
- DRIVER_DIRS="$DRIVER_DIRS osmesa"
GALLIUM_STATE_TRACKERS_DIRS="osmesa $GALLIUM_STATE_TRACKERS_DIRS"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa"
fi
-AC_SUBST([SRC_DIRS])
-AC_SUBST([DRIVER_DIRS])
-AC_SUBST([GALLIUM_DIRS])
-AC_SUBST([GALLIUM_TARGET_DIRS])
-AC_SUBST([GALLIUM_WINSYS_DIRS])
-AC_SUBST([GALLIUM_DRIVERS_DIRS])
-AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
AC_SUBST([MESA_LLVM])
# Check for libdrm
@@ -977,7 +938,7 @@ DRI_DIRS=""
case "$with_dri_drivers" in
no) ;;
yes)
- # classic DRI drivers require FEATURE_GL to build
+ # classic DRI drivers
if test "x$enable_opengl" = xyes; then
DRI_DIRS="yes"
fi
@@ -1001,7 +962,7 @@ if test "x$enable_dri" = xyes; then
# Platform specific settings and drivers to build
case "$host_os" in
linux*)
- DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DHAVE_ALIAS"
case "$host_cpu" in
@@ -1026,21 +987,21 @@ if test "x$enable_dri" = xyes; then
;;
freebsd* | dragonfly* | *netbsd*)
DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
- DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
+ DEFINES="$DEFINES -DHAVE_ALIAS"
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
fi
;;
gnu*)
- DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DHAVE_ALIAS"
;;
solaris*)
- DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
;;
cygwin*)
- DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="swrast"
fi
@@ -1086,7 +1047,6 @@ if test "x$enable_dri" = xyes; then
GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
fi
AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
-AC_SUBST([DRI_DIRS])
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
AC_SUBST([GALLIUM_DRI_LIB_DEPS])
@@ -1197,8 +1157,6 @@ if test "x$enable_gbm" = xauto; then
esac
fi
if test "x$enable_gbm" = xyes; then
- SRC_DIRS="$SRC_DIRS gbm"
-
PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
AC_MSG_ERROR([gbm needs udev]))
@@ -1209,6 +1167,7 @@ if test "x$enable_gbm" = xyes; then
fi
fi
fi
+AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
GBM_PC_REQ_PRIV="libudev"
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
AC_SUBST([GBM_PC_REQ_PRIV])
@@ -1220,7 +1179,6 @@ dnl
EGL_CLIENT_APIS=""
if test "x$enable_egl" = xyes; then
- SRC_DIRS="$SRC_DIRS egl"
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS $PTHREAD_LIBS"
AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
@@ -1239,6 +1197,7 @@ if test "x$enable_egl" = xyes; then
fi
fi
+AM_CONDITIONAL(HAVE_EGL, test "x$enable_egl" = xyes)
AC_SUBST([EGL_LIB_DEPS])
dnl
@@ -1257,14 +1216,14 @@ if test "x$enable_gallium_egl" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static"
- HAVE_ST_EGL="yes"
fi
+AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
dnl
dnl gbm Gallium configuration
dnl
if test "x$enable_gallium_gbm" = xauto; then
- case "$enable_gbm$HAVE_ST_EGL$enable_dri$with_egl_platforms" in
+ case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
yesyesyes*drm*)
enable_gallium_gbm=yes ;;
*)
@@ -1285,9 +1244,9 @@ if test "x$enable_gallium_gbm" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
- HAVE_ST_GBM="yes"
enable_gallium_loader=yes
fi
+AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
dnl
dnl X.Org DDX configuration
@@ -1300,8 +1259,8 @@ if test "x$enable_xorg" = xyes; then
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
HAVE_XEXTPROTO_71="no")
GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS"
- HAVE_ST_XORG=yes
fi
+AM_CONDITIONAL(HAVE_ST_XORG, test "x$enable_xorg" = xyes)
dnl
dnl XA configuration
@@ -1317,11 +1276,11 @@ fi
fi
if test "x$enable_xa" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
- HAVE_ST_XA=yes
AC_SUBST(AWK)
AC_SUBST(GREP)
AC_SUBST(NM)
fi
+AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
dnl
dnl OpenVG configuration
@@ -1341,9 +1300,7 @@ if test "x$enable_openvg" = xyes; then
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
- CORE_DIRS="$CORE_DIRS mapi/vgapi"
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
- HAVE_ST_VEGA=yes
VG_PC_LIB_PRIV="-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
AC_SUBST([VG_PC_LIB_PRIV])
fi
@@ -1352,16 +1309,7 @@ AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes)
dnl
dnl Gallium G3DVL configuration
dnl
-AC_ARG_ENABLE([gallium-g3dvl],
- [AS_HELP_STRING([--enable-gallium-g3dvl],
- [build gallium g3dvl @<:@default=disabled@:>@])],
- [enable_gallium_g3dvl="$enableval"],
- [enable_gallium_g3dvl=no])
-if test "x$enable_gallium_g3dvl" = xyes; then
- if test "x$with_gallium_drivers" = x; then
- AC_MSG_ERROR([cannot enable G3DVL without Gallium])
- fi
-
+if test -n "$with_gallium_drivers"; then
if test "x$enable_xvmc" = xauto; then
PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no])
fi
@@ -1374,14 +1322,14 @@ fi
if test "x$enable_xvmc" = xyes; then
PKG_CHECK_MODULES([XVMC], [xvmc >= 1.0.6 x11-xcb xcb-dri2 >= 1.8])
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xvmc"
- HAVE_ST_XVMC="yes"
fi
+AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)
if test "x$enable_vdpau" = xyes; then
PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8])
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
- HAVE_ST_VDPAU="yes"
fi
+AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
dnl
dnl OpenCL configuration
@@ -1428,18 +1376,12 @@ if test "x$enable_opencl" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
enable_gallium_loader=yes
fi
-
-if test "x$enable_gallium_gbm" = xyes || test "x$enable_opencl" = xyes; then
- GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
-fi
+AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
dnl
dnl Gallium configuration
dnl
-if test "x$with_gallium_drivers" != x; then
- SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
-fi
-AM_CONDITIONAL(HAVE_GALLIUM, test "x$with_gallium_drivers" != x)
+AM_CONDITIONAL(HAVE_GALLIUM, test -n "$with_gallium_drivers")
AC_SUBST([LLVM_BINDIR])
AC_SUBST([LLVM_CFLAGS])
@@ -1455,10 +1397,8 @@ AC_SUBST([CLANG_RESOURCE_DIR])
case "x$enable_opengl$enable_gles1$enable_gles2" in
x*yes*)
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
- HAVE_OPENGL=yes
;;
esac
-AM_CONDITIONAL(HAVE_OPENGL, test "x$HAVE_OPENGL" = xyes)
AC_SUBST([VG_LIB_DEPS])
AC_SUBST([EGL_CLIENT_APIS])
@@ -1487,10 +1427,6 @@ fi
egl_platforms=`IFS=', '; echo $with_egl_platforms`
for plat in $egl_platforms; do
case "$plat" in
- fbdev|null)
- GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/$plat"
- ;;
-
wayland)
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
@@ -1513,7 +1449,7 @@ for plat in $egl_platforms; do
AC_MSG_ERROR([EGL platform drm needs gbm])
;;
- android|gdi)
+ android|fbdev|gdi|null)
;;
*)
@@ -1538,6 +1474,9 @@ fi
EGL_PLATFORMS="$egl_platforms"
+if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
+ NEED_WINSYS_XLIB=yes
+fi
AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1)
@@ -1644,12 +1583,13 @@ if test "x$enable_gallium_llvm" = xyes; then
if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
fi
- if $LLVM_CONFIG --components | grep -q '\<oprofilejit\>'; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} oprofilejit"
- fi
if test "x$enable_opencl" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
+ # LLVM 3.3 >= 177971 requires IRReader
+ if $LLVM_CONFIG --components | grep -q '\<irreader\>'; then
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
+ fi
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
@@ -1691,9 +1631,14 @@ dnl
dnl Gallium Tests
dnl
if test "x$enable_gallium_tests" = xyes; then
- SRC_DIRS="$SRC_DIRS gallium/tests/trivial gallium/tests/unit"
enable_gallium_loader=yes
fi
+AM_CONDITIONAL(HAVE_GALLIUM_TESTS, test "x$enable_gallium_tests" = xyes)
+
+if test "x$enable_gallium_loader" = xyes; then
+ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
+fi
+AM_CONDITIONAL(NEED_GALLIUM_LOADER, test "x$enable_gallium_loader" = xyes)
dnl Directory for VDPAU libs
AC_ARG_WITH([vdpau-libdir],
@@ -1715,28 +1660,26 @@ dnl
dnl Gallium helper functions
dnl
gallium_check_st() {
- if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes ||
- test "x$HAVE_ST_XA" = xyes || test "x$HAVE_ST_XVMC" = xyes ||
- test "x$HAVE_ST_VDPAU" = xyes; then
+ if test "x$NEED_NONNULL_WINSYS" = xyes; then
if test "x$have_libdrm" != xyes; then
AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
fi
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1"
fi
- if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then
+ if test "x$enable_dri" = xyes && test "x$2" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
HAVE_COMMON_DRI=yes
fi
- if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then
+ if test "x$enable_xorg" = xyes && test "x$3" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
fi
- if test "x$HAVE_ST_XA" = xyes && test "x$4" != x; then
+ if test "x$enable_xa" = xyes && test "x$4" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
fi
- if test "x$HAVE_ST_XVMC" = xyes && test "x$5" != x; then
+ if test "x$enable_xvmc" = xyes && test "x$5" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
fi
- if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then
+ if test "x$enable_vdpau" = xyes && test "x$6" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
fi
}
@@ -1762,23 +1705,29 @@ gallium_require_drm_loader() {
radeon_llvm_check() {
LLVM_REQUIRED_VERSION_MAJOR="3"
- LLVM_REQUIRED_VERSION_MINOR="2"
+ LLVM_REQUIRED_VERSION_MINOR="3"
if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
- AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with R600 target enabled is required.
- To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
- git://people.freedesktop.org/~tstellar/llvm master
- and build with --enable-experimental-targets=R600])
+ AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required for r600g and radeonsi.])
fi
if test true && $LLVM_CONFIG --targets-built | grep -qv '\<R600\>' ; then
AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM
sources with the --enable-experimental-targets=R600
configure flag])
fi
- AC_MSG_WARN([Please ensure you use the latest llvm tree from git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
- LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo"
+ NEED_RADEON_LLVM=yes
+ AC_CHECK_LIB([elf], [elf_memory], [ELF_LIB=-lelf],
+ [AC_MSG_ERROR([radeonsi and r600g require libelf when using LLVM])])
}
dnl Gallium drivers
+if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \
+ "x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \
+ "x$enable_vdpau" = xyes; then
+ NEED_NONNULL_WINSYS=yes
+fi
+AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes)
+
dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
if test "x$with_gallium_drivers" != x; then
gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
@@ -1799,6 +1748,13 @@ if test "x$with_gallium_drivers" != x; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw"
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
;;
+ xilo)
+ HAVE_GALLIUM_ILO=yes
+ PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
+ gallium_require_drm_loader
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS ilo"
+ gallium_check_st "intel/drm" "dri-ilo"
+ ;;
xr300)
HAVE_GALLIUM_R300=yes
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
@@ -1813,9 +1769,8 @@ if test "x$with_gallium_drivers" != x; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
radeon_llvm_check
- NEED_RADEON_GALLIUM=yes;
R600_NEED_RADEON_GALLIUM=yes;
- LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo bitreader asmparser"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
fi
if test "x$enable_r600_llvm" = xyes; then
USE_R600_LLVM_COMPILER=yes;
@@ -1831,7 +1786,6 @@ if test "x$with_gallium_drivers" != x; then
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
radeon_llvm_check
- NEED_RADEON_GALLIUM=yes;
gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
;;
xnouveau)
@@ -1856,20 +1810,18 @@ if test "x$with_gallium_drivers" != x; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
fi
- if test "x$HAVE_ST_DRI" = xyes; then
+ if test "x$enable_dri" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
fi
- if test "x$HAVE_ST_VDPAU" = xyes; then
+ if test "x$enable_vdpau" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe"
fi
- if test "x$HAVE_ST_XVMC" = xyes; then
+ if test "x$enable_xvmc" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
fi
- if test "x$HAVE_ST_VDPAU" = xyes ||
- test "x$HAVE_ST_XVMC" = xyes; then
- if test "x$HAVE_WINSYS_XLIB" != xyes; then
- GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
- fi
+ if test "x$enable_vdpau" = xyes -o "x$enable_xvmc" = xyes; then
+ NEED_WINSYS_XLIB=yes
+ GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
fi
;;
*)
@@ -1924,6 +1876,7 @@ fi
AM_CONDITIONAL(HAVE_GALLIUM_SVGA, test "x$HAVE_GALLIUM_SVGA" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_I915, test "x$HAVE_GALLIUM_I915" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_ILO, test "x$HAVE_GALLIUM_ILO" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_R300, test "x$HAVE_GALLIUM_R300" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_R600, test "x$HAVE_GALLIUM_R600" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_RADEONSI, test "x$HAVE_GALLIUM_RADEONSI" = xyes)
@@ -1932,23 +1885,22 @@ AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
+AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -o \
+ "x$HAVE_GALLIUM_I915" = xyes -o \
+ "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
+AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes -o \
+ "x$HAVE_GALLIUM_SOFTPIPE" = xyes -a \
+ "x$MESA_LLVM" = x1)
+
if test "x$enable_gallium_loader" = xyes; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
- GALLIUM_PIPE_LOADER_DEFINES="-DHAVE_PIPE_LOADER_SW"
- GALLIUM_PIPE_LOADER_LIBS="\$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la"
- GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la"
-
- if test "x$HAVE_WINSYS_XLIB" = xyes; then
- GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
- GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la"
- fi
if test "x$enable_gallium_drm_loader" = xyes; then
GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRM"
PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2],
pipe_loader_have_xcb=yes, pipe_loader_have_xcb=no)
if test "x$pipe_loader_have_xcb" = xyes; then
- GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DPIPE_LOADER_HAVE_XCB"
+ GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XCB"
GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS $GALLIUM_PIPE_LOADER_XCB_LIBS $LIBDRM_LIBS"
fi
fi
@@ -1957,24 +1909,6 @@ if test "x$enable_gallium_loader" = xyes; then
AC_SUBST([GALLIUM_PIPE_LOADER_LIBS])
fi
-dnl Tell Automake which drivers to build
-for driver in $GALLIUM_DRIVERS_DIRS; do
- case "x$driver" in
- xgalahad)
- HAVE_GALAHAD_GALLIUM=yes;
- ;;
- xidentity)
- HAVE_IDENTITY_GALLIUM=yes;
- ;;
- xnoop)
- HAVE_NOOP_GALLIUM=yes;
- ;;
- *)
- GALLIUM_MAKE_DIRS="$GALLIUM_MAKE_DIRS $driver"
- ;;
- esac
-done
-
AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes)
AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes)
AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes)
@@ -1983,10 +1917,14 @@ AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
-AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes)
-AM_CONDITIONAL(HAVE_IDENTITY_GALLIUM, test x$HAVE_IDENTITY_GALLIUM = xyes)
-AM_CONDITIONAL(HAVE_NOOP_GALLIUM, test x$HAVE_NOOP_GALLIUM = xyes)
-AM_CONDITIONAL(NEED_RADEON_GALLIUM, test x$NEED_RADEON_GALLIUM = xyes)
+AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \
+ "x$HAVE_GALLIUM_R300" = xyes -o \
+ "x$HAVE_GALLIUM_R600" = xyes -o \
+ "x$HAVE_GALLIUM_RADEONSI" = xyes)
+AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \
+ "x$HAVE_GALLIUM_SVGA" = xyes)
+AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)
+AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes)
AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
@@ -1995,12 +1933,13 @@ AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
-AC_SUBST([GALLIUM_MAKE_DIRS])
+AC_SUBST([ELF_LIB])
AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
"x$enable_xlib_glx" = xyes -o \
"x$enable_osmesa" = xyes)
-AM_CONDITIONAL(HAVE_X11_DRIVER, echo "$DRIVER_DIRS" | grep 'x11' >/dev/null 2>&1)
+AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)
+AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
@@ -2019,9 +1958,6 @@ AC_SUBST([XA_MINOR], 0)
AC_SUBST([XA_TINY], 0)
AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
-dnl prepend CORE_DIRS to SRC_DIRS
-SRC_DIRS="$CORE_DIRS $SRC_DIRS"
-
dnl Restore LDFLAGS and CPPFLAGS
LDFLAGS="$_SAVE_LDFLAGS"
CPPFLAGS="$_SAVE_CPPFLAGS"
@@ -2043,12 +1979,12 @@ AC_CONFIG_FILES([Makefile
src/egl/wayland/wayland-drm/Makefile
src/egl/wayland/wayland-egl/Makefile
src/egl/wayland/wayland-egl/wayland-egl.pc
- src/gallium/Makefile
src/gallium/auxiliary/Makefile
src/gallium/auxiliary/pipe-loader/Makefile
src/gallium/drivers/Makefile
src/gallium/drivers/freedreno/Makefile
src/gallium/drivers/i915/Makefile
+ src/gallium/drivers/ilo/Makefile
src/gallium/drivers/llvmpipe/Makefile
src/gallium/drivers/nouveau/Makefile
src/gallium/drivers/nv30/Makefile
@@ -2079,6 +2015,7 @@ AC_CONFIG_FILES([Makefile
src/gallium/targets/Makefile
src/gallium/targets/dri-freedreno/Makefile
src/gallium/targets/dri-i915/Makefile
+ src/gallium/targets/dri-ilo/Makefile
src/gallium/targets/dri-nouveau/Makefile
src/gallium/targets/dri-r300/Makefile
src/gallium/targets/dri-r600/Makefile
@@ -2112,10 +2049,10 @@ AC_CONFIG_FILES([Makefile
src/gallium/winsys/freedreno/drm/Makefile
src/gallium/winsys/i915/drm/Makefile
src/gallium/winsys/i915/sw/Makefile
+ src/gallium/winsys/intel/drm/Makefile
src/gallium/winsys/nouveau/drm/Makefile
src/gallium/winsys/radeon/drm/Makefile
src/gallium/winsys/svga/drm/Makefile
- src/gallium/winsys/sw/Makefile
src/gallium/winsys/sw/dri/Makefile
src/gallium/winsys/sw/fbdev/Makefile
src/gallium/winsys/sw/null/Makefile
@@ -2129,6 +2066,7 @@ AC_CONFIG_FILES([Makefile
src/glx/Makefile
src/glx/tests/Makefile
src/gtest/Makefile
+ src/mapi/Makefile
src/mapi/es1api/Makefile
src/mapi/es1api/glesv1_cm.pc
src/mapi/es2api/Makefile
@@ -2142,7 +2080,6 @@ AC_CONFIG_FILES([Makefile
src/mapi/vgapi/vg.pc
src/mesa/Makefile
src/mesa/gl.pc
- src/mesa/drivers/Makefile
src/mesa/drivers/dri/dri.pc
src/mesa/drivers/dri/common/Makefile
src/mesa/drivers/dri/common/xmlpool/Makefile
@@ -2167,7 +2104,6 @@ dnl Sort the dirs alphabetically
GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
-GALLIUM_MAKE_DIRS=`echo $GALLIUM_MAKE_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
AC_OUTPUT
@@ -2231,7 +2167,7 @@ if test "$enable_egl" = yes; then
egl_drivers="$egl_drivers builtin:egl_dri2"
fi
- if test "x$HAVE_ST_EGL" = xyes; then
+ if test "x$enable_gallium_egl" = xyes; then
echo " EGL drivers: ${egl_drivers} egl_gallium"
echo " EGL Gallium STs:$EGL_CLIENT_APIS"
else
@@ -2249,9 +2185,8 @@ else
fi
echo ""
-if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then
+if test -n "$with_gallium_drivers"; then
echo " Gallium: yes"
- echo " Gallium dirs: $GALLIUM_DIRS"
echo " Target dirs: $GALLIUM_TARGET_DIRS"
echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt
index d150b0874..f2152a31e 100644
--- a/mesalib/docs/GL3.txt
+++ b/mesalib/docs/GL3.txt
@@ -23,12 +23,12 @@ GL_EXT_texture_shared_exponent DONE (i965, r600, swrast)
Float depth buffers (GL_ARB_depth_buffer_float) DONE (i965, r600)
Framebuffer objects (GL_ARB_framebuffer_object) DONE (i965, r300, r600, swrast)
Half-float DONE
-Non-normalized Integer texture/framebuffer formats DONE (i965, r600)
+Non-normalized Integer texture/framebuffer formats DONE (i965, r600)
1D/2D Texture arrays DONE
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, swrast)
GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, swrast)
Red and red/green texture formats DONE (i965, swrast, gallium)
-Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600)
+Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600)
Vertex array objects (GL_APPLE_vertex_array_object) DONE (i965, r300, r600, swrast)
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600)
glClearBuffer commands DONE
@@ -56,8 +56,8 @@ Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600)
GL 3.2:
Core/compatibility profiles DONE
-GLSL 1.50 not started
-Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack)
+GLSL 1.50 in progress
+Geometry shaders (GL_ARB_geometry_shader4) partially done
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r300, r600, swrast)
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r300, r600, swrast)
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, swrast)
@@ -79,7 +79,7 @@ GL_ARB_sampler_objects DONE (i965, r300, r600)
GL_ARB_shader_bit_encoding DONE
GL_ARB_texture_rgb10_a2ui DONE (i965, r600)
GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r300, r600, swrast)
-GL_ARB_timer_query DONE (i965, r600)
+GL_ARB_timer_query DONE (i965, r600)
GL_ARB_instanced_arrays DONE (i965, r300, r600)
GL_ARB_vertex_type_2_10_10_10_rev DONE (i965, r600)
@@ -89,15 +89,15 @@ GL 4.0:
GLSL 4.0 not started
GL_ARB_texture_query_lod DONE (i965)
GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe)
-GL_ARB_draw_indirect not started
-GL_ARB_gpu_shader5 not started
+GL_ARB_draw_indirect started (Christoph)
+GL_ARB_gpu_shader5 started
GL_ARB_gpu_shader_fp64 not started
GL_ARB_sample_shading not started
GL_ARB_shader_subroutine not started
GL_ARB_tessellation_shader not started
GL_ARB_texture_buffer_object_rgb32 DONE (i965, softpipe)
GL_ARB_texture_cube_map_array DONE (i965, softpipe)
-GL_ARB_texture_gather not started
+GL_ARB_texture_gather started (Maxence, Chris)
GL_ARB_transform_feedback2 DONE
GL_ARB_transform_feedback3 DONE
@@ -124,7 +124,7 @@ GL_ARB_transform_feedback_instanced DONE
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi)
GL_ARB_shader_image_load_store not started
GL_ARB_conservative_depth DONE (softpipe)
-GL_ARB_shading_language_420pack not started
+GL_ARB_shading_language_420pack started (Todd)
GL_ARB_internalformat_query DONE (i965, gallium)
GL_ARB_map_buffer_alignment DONE (r300, r600, radeonsi)
diff --git a/mesalib/docs/README.UVD b/mesalib/docs/README.UVD
new file mode 100644
index 000000000..36b467edf
--- /dev/null
+++ b/mesalib/docs/README.UVD
@@ -0,0 +1,13 @@
+The software may implement third party technologies (e.g. third party
+libraries) that are not licensed to you by AMD and for which you may need
+to obtain licenses from other parties. Unless explicitly stated otherwise,
+these third party technologies are not licensed hereunder. Such third
+party technologies include, but are not limited, to H.264, MPEG-2, MPEG-4,
+AVC, and VC-1.
+
+For MPEG-2 Encoding Products ANY USE OF THIS PRODUCT IN ANY MANNER OTHER
+THAN PERSONAL USE THAT COMPLIES WITH THE MPEG-2 STANDARD FOR ENCODING VIDEO
+INFORMATION FOR PACKAGED MEDIA IS EXPRESSLY PROHIBITED WITHOUT A LICENSE
+UNDER APPLICABLE PATENTS IN THE MPEG-2 PATENT PORTFOLIO, WHICH LICENSES IS
+AVAILABLE FROM MPEG LA, LLC, 6312 S. Fiddlers Green Circle, Suite 400E,
+Greenwood Village, Colorado 80111 U.S.A.
diff --git a/mesalib/docs/devinfo.html b/mesalib/docs/devinfo.html
index c89bfc02e..f5eb4d468 100644
--- a/mesalib/docs/devinfo.html
+++ b/mesalib/docs/devinfo.html
@@ -197,16 +197,18 @@ branch is relevant.
<dl>
<dt>Makefile.am</dt>
+ <dt>SConstruct</dt>
+ <dt>Android.common.mk</dt>
<dd>PACKAGE_VERSION</dd>
<dt>configure.ac</dt>
<dd>AC_INIT</dd>
</dl>
<p>
-Create a docs/relnotes-x.y.z.html file.
-The bin/shortlog_mesa.sh script can be used to create a HTML-formatted list
-of changes to include in the file.
-Link the new docs/relnotes-x.y.z.html file into the main <a href="relnotes.html">relnotes.html</a> file.
+Create a docs/relnotes/x.y.z.html file.
+The bin/bugzilla_mesa.sh and bin/shortlog_mesa.sh scripts can be used to
+create the HTML-formatted lists of bugfixes and changes to include in the file.
+Link the new docs/relnotes/x.y.z.html file into the main <a href="relnotes.html">relnotes.html</a> file.
</p>
<p>
@@ -231,7 +233,7 @@ Make the distribution files. From inside the Mesa directory:
<p>
After the tarballs are created, the md5 checksums for the files will
be computed.
-Add them to the docs/relnotes-x.y.html file.
+Add them to the docs/relnotes/x.y.html file.
</p>
<p>
diff --git a/mesalib/docs/envvars.html b/mesalib/docs/envvars.html
index 5d855c630..389da62e6 100644
--- a/mesalib/docs/envvars.html
+++ b/mesalib/docs/envvars.html
@@ -32,6 +32,8 @@ sometimes be useful for debugging end-user issues.
<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
<li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
+<li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
+ calls per second.
</ul>
@@ -144,6 +146,9 @@ Mesa EGL supports different sets of environment variables. See the
<h2>Gallium environment variables</h2>
<ul>
+<li>GALLIUM_HUD - draws various information on the screen, like framerate,
+ cpu load, driver statistics, performance counters, etc.
+ Set GALLIUM_HUD=help and run e.g. glxgears for more info.
<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
rather than stderr.
<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
diff --git a/mesalib/docs/extensions.html b/mesalib/docs/extensions.html
index 5d790fb61..40f59d3b0 100644
--- a/mesalib/docs/extensions.html
+++ b/mesalib/docs/extensions.html
@@ -23,19 +23,27 @@ The specifications follow.
<ul>
-<li><a href="MESA_agp_offset.spec">MESA_agp_offset.spec</a>
-<li><a href="MESA_copy_sub_buffer.spec">MESA_copy_sub_buffer.spec</a>
-<li><a href="MESA_packed_depth_stencil.spec">MESA_packed_depth_stencil.spec</a>
-<li><a href="MESA_pack_invert.spec">MESA_pack_invert.spec</a>
-<li><a href="MESA_pixmap_colormap.spec">MESA_pixmap_colormap.spec</a>
-<li><a href="MESA_release_buffers.spec">MESA_release_buffers.spec</a>
-<li><a href="MESA_resize_buffers.spec">MESA_resize_buffers.spec</a>
-<li><a href="MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</a>
-<li><a href="MESA_sprite_point.spec">MESA_sprite_point.spec</a> (obsolete)
-<li><a href="MESA_texture_signed_rgba.spec">MESA_texture_signed_rgba.spec</a>
-<li><a href="MESA_trace.spec">MESA_trace.spec</a> (obsolete)
-<li><a href="MESA_window_pos.spec">MESA_window_pos.spec</a>
-<li><a href="MESA_ycbcr_texture.spec">MESA_ycbcr_texture.spec</a>
+<li><a href="specs/MESA_agp_offset.spec">MESA_agp_offset.spec</a>
+<li><a href="specs/MESA_copy_sub_buffer.spec">MESA_copy_sub_buffer.spec</a>
+<li><a href="specs/MESA_drm_image.spec">MESA_drm_image.spec</a>
+<li><a href="specs/MESA_multithread_makecurrent.spec">MESA_multithread_makecurrent.spec</a>
+<li><a href="specs/OLD/MESA_packed_depth_stencil.spec">MESA_packed_depth_stencil.spec</a> (obsolete)
+<li><a href="specs/MESA_pack_invert.spec">MESA_pack_invert.spec</a>
+<li><a href="specs/MESA_pixmap_colormap.spec">MESA_pixmap_colormap.spec</a>
+<li><a href="specs/OLD/MESA_program_debug.spec">MESA_program_debug.spec</a> (obsolete)
+<li><a href="specs/MESA_release_buffers.spec">MESA_release_buffers.spec</a>
+<li><a href="specs/MESA_resize_buffers.spec">MESA_resize_buffers.spec</a>
+<li><a href="specs/MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</a>
+<li><a href="specs/MESA_shader_debug.spec">MESA_shader_debug.spec</a>
+<li><a href="specs/OLD/MESA_sprite_point.spec">MESA_sprite_point.spec</a> (obsolete)
+<li><a href="specs/MESA_swap_control.spec">MESA_swap_control.spec</a>
+<li><a href="specs/MESA_swap_frame_usage.spec">MESA_swap_frame_usage.spec</a>
+<li><a href="specs/MESA_texture_array.spec">MESA_texture_array.spec</a>
+<li><a href="specs/MESA_texture_signed_rgba.spec">MESA_texture_signed_rgba.spec</a>
+<li><a href="specs/OLD/MESA_trace.spec">MESA_trace.spec</a> (obsolete)
+<li><a href="specs/MESA_window_pos.spec">MESA_window_pos.spec</a>
+<li><a href="specs/MESA_ycbcr_texture.spec">MESA_ycbcr_texture.spec</a>
+<li><a href="specs/WL_bind_wayland_display.spec">WL_bind_wayland_display.spec</a>
</ul>
</div>
diff --git a/mesalib/docs/index.html b/mesalib/docs/index.html
index e2ef92aee..be095820c 100644
--- a/mesalib/docs/index.html
+++ b/mesalib/docs/index.html
@@ -16,9 +16,21 @@
<h1>News</h1>
+<h2>May 21, 2013</h2>
+<p>
+<a href="relnotes/9.1.3.html">Mesa 9.1.3</a> is released.
+This is a bug fix release.
+</p>
+
+<h2>April 30, 2013</h2>
+<p>
+<a href="relnotes/9.1.2.html">Mesa 9.1.2</a> is released.
+This is a bug fix release.
+</p>
+
<h2>March 19, 2013</h2>
<p>
-<a href="relnotes-9.1.1.html">Mesa 9.1.1</a> is released.
+<a href="relnotes/9.1.1.html">Mesa 9.1.1</a> is released.
This is a bug fix release.
</p>
@@ -34,7 +46,7 @@ You can download it from <a href="ftp://ftp.freedesktop.org/pub/mesa/demos/8.1.0
<h2>February 22, 2013</h2>
<p>
-<a href="relnotes-9.1.html">Mesa 9.1</a> is released.
+<a href="relnotes/9.1.html">Mesa 9.1</a> is released.
This is a new development release.
See the release notes for more information about the release.
</p>
@@ -43,7 +55,7 @@ See the release notes for more information about the release.
<h2>February 21, 2013</h2>
<p>
-<a href="relnotes-9.0.3.html">Mesa 9.0.3</a> is released.
+<a href="relnotes/9.0.3.html">Mesa 9.0.3</a> is released.
This is a bug fix release.
</p>
@@ -51,7 +63,7 @@ This is a bug fix release.
<h2>January 22, 2013</h2>
<p>
-<a href="relnotes-9.0.2.html">Mesa 9.0.2</a> is released.
+<a href="relnotes/9.0.2.html">Mesa 9.0.2</a> is released.
This is a bug fix release.
</p>
@@ -59,7 +71,7 @@ This is a bug fix release.
<h2>November 16, 2012</h2>
<p>
-<a href="relnotes-9.0.1.html">Mesa 9.0.1</a> is released.
+<a href="relnotes/9.0.1.html">Mesa 9.0.1</a> is released.
This is a bug fix release.
</p>
@@ -67,7 +79,7 @@ This is a bug fix release.
<h2>October 24, 2012</h2>
<p>
-<a href="relnotes-8.0.5.html">Mesa 8.0.5</a> is released.
+<a href="relnotes/8.0.5.html">Mesa 8.0.5</a> is released.
This is a bug fix release.
</p>
@@ -75,7 +87,7 @@ This is a bug fix release.
<h2>October 8, 2012</h2>
<p>
-<a href="relnotes-9.0.html">Mesa 9.0</a> is released.
+<a href="relnotes/9.0.html">Mesa 9.0</a> is released.
This is the first version of Mesa to support OpenGL 3.1 and GLSL 1.40
(with the i965 driver).
See the release notes for more information about the release.
@@ -85,7 +97,7 @@ See the release notes for more information about the release.
<h2>July 10, 2012</h2>
<p>
-<a href="relnotes-8.0.4.html">Mesa 8.0.4</a> is released.
+<a href="relnotes/8.0.4.html">Mesa 8.0.4</a> is released.
This is a bug fix release.
</p>
@@ -93,7 +105,7 @@ This is a bug fix release.
<h2>May 18, 2012</h2>
<p>
-<a href="relnotes-8.0.3.html">Mesa 8.0.3</a> is released.
+<a href="relnotes/8.0.3.html">Mesa 8.0.3</a> is released.
This is a bug fix release.
</p>
@@ -101,7 +113,7 @@ This is a bug fix release.
<h2>March 21, 2012</h2>
<p>
-<a href="relnotes-8.0.2.html">Mesa 8.0.2</a> is released.
+<a href="relnotes/8.0.2.html">Mesa 8.0.2</a> is released.
This is a bug fix release.
</p>
@@ -109,14 +121,14 @@ This is a bug fix release.
<h2>February 16, 2012</h2>
<p>
-<a href="relnotes-8.0.1.html">Mesa 8.0.1</a> is released. This is a bug fix
+<a href="relnotes/8.0.1.html">Mesa 8.0.1</a> is released. This is a bug fix
release. See the release notes for more information about the release.
</p>
<h2>February 9, 2012</h2>
<p>
-<a href="relnotes-8.0.html">Mesa 8.0</a> is released.
+<a href="relnotes/8.0.html">Mesa 8.0</a> is released.
This is the first version of Mesa to support OpenGL 3.0 and GLSL 1.30
(with the i965 driver).
See the release notes for more information about the release.
@@ -126,7 +138,7 @@ See the release notes for more information about the release.
<h2>November 27, 2011</h2>
<p>
-<a href="relnotes-7.11.2.html">Mesa 7.11.2</a> is released. This is a bug fix
+<a href="relnotes/7.11.2.html">Mesa 7.11.2</a> is released. This is a bug fix
release. This release was made primarily to fix build problems with 7.11.1 on
Mandriva and to fix problems related to glCopyTexImage to luminance-alpha
textures. The later was believed to have been fixed in 7.11.1 but was not.
@@ -135,36 +147,36 @@ textures. The later was believed to have been fixed in 7.11.1 but was not.
<h2>November 17, 2011</h2>
<p>
-<a href="relnotes-7.11.1.html">Mesa 7.11.1</a> is released. This is a bug
+<a href="relnotes/7.11.1.html">Mesa 7.11.1</a> is released. This is a bug
fix release.
</p>
<h2>July 31, 2011</h2>
<p>
-<a href="relnotes-7.11.html">Mesa 7.11</a> (final) is released. This is a new
+<a href="relnotes/7.11.html">Mesa 7.11</a> (final) is released. This is a new
development release.
</p>
<h2>June 13, 2011</h2>
<p>
-<a href="relnotes-7.10.3.html">Mesa 7.10.3</a> is released. This is a bug
+<a href="relnotes/7.10.3.html">Mesa 7.10.3</a> is released. This is a bug
fix release.
</p>
<h2>April 6, 2011</h2>
<p>
-<a href="relnotes-7.10.2.html">Mesa 7.10.2</a> is released. This is a bug
+<a href="relnotes/7.10.2.html">Mesa 7.10.2</a> is released. This is a bug
fix release.
</p>
<h2>March 2, 2011</h2>
<p>
-<a href="relnotes-7.9.2.html">Mesa 7.9.2</a> and
-<a href="relnotes-7.10.1.html">Mesa 7.10.1</a> are released. These are
+<a href="relnotes/7.9.2.html">Mesa 7.9.2</a> and
+<a href="relnotes/7.10.1.html">Mesa 7.10.1</a> are released. These are
stable releases containing bug fixes since the 7.9.1 and 7.10 releases.
</p>
@@ -172,7 +184,7 @@ stable releases containing bug fixes since the 7.9.1 and 7.10 releases.
<h2>October 4, 2010</h2>
<p>
-<a href="relnotes-7.9.html">Mesa 7.9</a> (final) is released. This is a new
+<a href="relnotes/7.9.html">Mesa 7.9</a> (final) is released. This is a new
development release.
</p>
@@ -180,7 +192,7 @@ development release.
<h2>September 27, 2010</h2>
<p>
-<a href="relnotes-7.9.html">Mesa 7.9.0-rc1</a> is released. This is a
+<a href="relnotes/7.9.html">Mesa 7.9.0-rc1</a> is released. This is a
release candidate for the 7.9 development release.
</p>
@@ -188,7 +200,7 @@ release candidate for the 7.9 development release.
<h2>June 16, 2010</h2>
<p>
-<a href="relnotes-7.8.2.html">Mesa 7.8.2</a> is released. This is a bug-fix
+<a href="relnotes/7.8.2.html">Mesa 7.8.2</a> is released. This is a bug-fix
release collecting fixes since the 7.8.1 release.
</p>
@@ -196,18 +208,18 @@ release collecting fixes since the 7.8.1 release.
<h2>April 5, 2010</h2>
<p>
-<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
+<a href="relnotes/7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
release for a few critical issues in the 7.8 release.
</p>
<h2>March 28, 2010</h2>
<p>
-<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
+<a href="relnotes/7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
release fixing issues found in the 7.7 release.
</p>
<p>
-Also, <a href="relnotes-7.8.html">Mesa 7.8</a> is released. This is a new
+Also, <a href="relnotes/7.8.html">Mesa 7.8</a> is released. This is a new
development release.
</p>
@@ -215,37 +227,37 @@ development release.
<h2>December 21, 2009</h2>
<p>
-<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix
+<a href="relnotes/7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix
release fixing issues found in the 7.6 release.
</p>
<p>
-Also, <a href="relnotes-7.7.html">Mesa 7.7</a> is released. This is a new
+Also, <a href="relnotes/7.7.html">Mesa 7.7</a> is released. This is a new
development release.
</p>
<h2>September 28, 2009</h2>
<p>
-<a href="relnotes-7.6.html">Mesa 7.6</a> is released. This is a new feature
+<a href="relnotes/7.6.html">Mesa 7.6</a> is released. This is a new feature
release. Those especially concerned about stability may want to wait for the
follow-on 7.6.1 bug-fix release.
</p>
<p>
-<a href="relnotes-7.5.2.html">Mesa 7.5.2</a> is also released.
+<a href="relnotes/7.5.2.html">Mesa 7.5.2</a> is also released.
This is a stable release fixing bugs since the 7.5.1 release.
</p>
<h2>September 3, 2009</h2>
<p>
-<a href="relnotes-7.5.1.html">Mesa 7.5.1</a> is released.
+<a href="relnotes/7.5.1.html">Mesa 7.5.1</a> is released.
This is a bug-fix release which fixes bugs found in version 7.5.
</p>
<h2>July 17, 2009</h2>
<p>
-<a href="relnotes-7.5.html">Mesa 7.5</a> is released.
+<a href="relnotes/7.5.html">Mesa 7.5</a> is released.
This is a new features release. People especially concerned about
stability may want to wait for the follow-on 7.5.1 bug-fix release.
</p>
@@ -253,7 +265,7 @@ stability may want to wait for the follow-on 7.5.1 bug-fix release.
<h2>June 23, 2009</h2>
<p>
-<a href="relnotes-7.4.4.html">Mesa 7.4.4</a> is released.
+<a href="relnotes/7.4.4.html">Mesa 7.4.4</a> is released.
This is a stable release that fixes a regression in the i915/i965 drivers
that slipped into the 7.4.3 release.
</p>
@@ -261,35 +273,35 @@ that slipped into the 7.4.3 release.
<h2>June 19, 2009</h2>
<p>
-<a href="relnotes-7.4.3.html">Mesa 7.4.3</a> is released.
+<a href="relnotes/7.4.3.html">Mesa 7.4.3</a> is released.
This is a stable release fixing bugs since the 7.4.2 release.
</p>
<h2>May 15, 2009</h2>
<p>
-<a href="relnotes-7.4.2.html">Mesa 7.4.2</a> is released.
+<a href="relnotes/7.4.2.html">Mesa 7.4.2</a> is released.
This is a stable release fixing bugs since the 7.4.1 release.
</p>
<h2>April 18, 2009</h2>
<p>
-<a href="relnotes-7.4.1.html">Mesa 7.4.1</a> is released.
+<a href="relnotes/7.4.1.html">Mesa 7.4.1</a> is released.
This is a stable release fixing bugs since the 7.4 release.
</p>
<h2>March 27, 2009</h2>
<p>
-<a href="relnotes-7.4.html">Mesa 7.4</a> is released.
+<a href="relnotes/7.4.html">Mesa 7.4</a> is released.
This is a stable release fixing bugs since the 7.3 release.
</p>
<h2>January 22, 2009</h2>
<p>
-<a href="relnotes-7.3.html">Mesa 7.3</a> is released.
+<a href="relnotes/7.3.html">Mesa 7.3</a> is released.
This is a new development release.
Mesa 7.4 will follow and will have bug fixes relative to 7.3.
</p>
@@ -297,14 +309,14 @@ Mesa 7.4 will follow and will have bug fixes relative to 7.3.
<h2>September 20, 2008</h2>
<p>
-<a href="relnotes-7.2.html">Mesa 7.2</a> is released.
+<a href="relnotes/7.2.html">Mesa 7.2</a> is released.
This is a stable, bug-fix release.
</p>
<h2>August 26, 2008</h2>
<p>
-<a href="relnotes-7.1.html">Mesa 7.1</a> is released.
+<a href="relnotes/7.1.html">Mesa 7.1</a> is released.
This is a new development release.
It should be relatively stable, but those especially concerned about
stability should wait for the 7.2 release or use Mesa 7.0.4 (the
@@ -314,14 +326,14 @@ previous stable release).
<h2>August 16, 2008</h2>
<p>
-<a href="relnotes-7.0.4.html">Mesa 7.0.4</a> is released.
+<a href="relnotes/7.0.4.html">Mesa 7.0.4</a> is released.
This is a bug-fix release.
</p>
<h2>April 4, 2008</h2>
<p>
-<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
+<a href="relnotes/7.0.3.html">Mesa 7.0.3</a> is released.
This is a bug-fix release.
</p>
@@ -350,28 +362,28 @@ but other drivers will be coming...
<h2>November 10, 2007</h2>
<p>
-<a href="relnotes-7.0.2.html">Mesa 7.0.2</a> is released.
+<a href="relnotes/7.0.2.html">Mesa 7.0.2</a> is released.
This is a bug-fix release.
</p>
<h2>August 3, 2007</h2>
<p>
-<a href="relnotes-7.0.1.html">Mesa 7.0.1</a> is released.
+<a href="relnotes/7.0.1.html">Mesa 7.0.1</a> is released.
This is a bug-fix release.
</p>
<h2>June 22, 2007</h2>
<p>
-<a href="relnotes-7.0.html">Mesa 7.0</a> is released.
+<a href="relnotes/7.0.html">Mesa 7.0</a> is released.
This is a stable release featuring OpenGL 2.1 support.
</p>
<h2>April 27, 2007</h2>
<p>
-<a href="relnotes-6.5.3.html">Mesa 6.5.3</a> is released.
+<a href="relnotes/6.5.3.html">Mesa 6.5.3</a> is released.
This is a development release which will lead up to the Mesa 7.0 release
(which will advertise OpenGL 2.1 API support).
</p>
@@ -402,33 +414,33 @@ See the <a href="repository.html">repository page</a> for more information.
<h2>December 2, 2006</h2>
<p>
-<a href="relnotes-6.5.2.html">Mesa 6.5.2</a> has been released.
+<a href="relnotes/6.5.2.html">Mesa 6.5.2</a> has been released.
This is a new development release.
</p>
<h2>September 15, 2006</h2>
<p>
-<a href="relnotes-6.5.1.html">Mesa 6.5.1</a> has been released.
+<a href="relnotes/6.5.1.html">Mesa 6.5.1</a> has been released.
This is a new development release.
</p>
<h2>March 31, 2006</h2>
<p>
-<a href="relnotes-6.5.html">Mesa 6.5</a> has been released.
+<a href="relnotes/6.5.html">Mesa 6.5</a> has been released.
This is a new development release.
</p>
<h2>February 2, 2006</h2>
<p>
-<a href="relnotes-6.4.2.html">Mesa 6.4.2</a> has been released.
+<a href="relnotes/6.4.2.html">Mesa 6.4.2</a> has been released.
This is stable, bug-fix release.
</p>
<h2>November 29, 2005</h2>
<p>
-<a href="relnotes-6.4.1.html">Mesa 6.4.1</a> has been released.
+<a href="relnotes/6.4.1.html">Mesa 6.4.1</a> has been released.
This is stable, bug-fix release.
</p>
@@ -436,7 +448,7 @@ This is stable, bug-fix release.
<h2>October 24, 2005</h2>
<p>
-<a href="relnotes-6.4.html">Mesa 6.4</a> has been released.
+<a href="relnotes/6.4.html">Mesa 6.4</a> has been released.
This is stable, bug-fix release.
</p>
@@ -755,8 +767,8 @@ OpenGL 1.5 features.
- demo of per-pixel lighting with a fragment program (demos/fplight.c)
- new version (18) of glext.h header
- new spriteblast.c demo of GL_ARB_point_sprite
- - faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1)
- - faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1)
+ - faster glDrawPixels in X11 driver in some cases (see relnotes/5.1)
+ - faster glCopyPixels in X11 driver in some cases (see relnotes/5.1)
Bug fixes:
- really enable OpenGL 1.4 features in DOS driver.
- fixed issues in glDrawPixels and glCopyPixels for very wide images
diff --git a/mesalib/docs/license.html b/mesalib/docs/license.html
index 35f85853d..80bb60400 100644
--- a/mesalib/docs/license.html
+++ b/mesalib/docs/license.html
@@ -75,9 +75,10 @@ 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.
+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.
</pre>
diff --git a/mesalib/docs/llvmpipe.html b/mesalib/docs/llvmpipe.html
index be0308321..80f8a0176 100644
--- a/mesalib/docs/llvmpipe.html
+++ b/mesalib/docs/llvmpipe.html
@@ -130,38 +130,38 @@ need to ask, don't even try it.
<h1>Profiling</h1>
-To profile llvmpipe you should pass the options
-
+<p>
+To profile llvmpipe you should build as
+</p>
<pre>
scons build=profile &lt;same-as-before&gt;
</pre>
+<p>
This will ensure that frame pointers are used both in C and JIT functions, and
that no tail call optimizations are done by gcc.
+</p>
-To better profile JIT code you'll need to build LLVM with oprofile integration.
-
-<pre>
- ./configure \
- --prefix=$install_dir \
- --enable-optimized \
- --disable-profiling \
- --enable-targets=host-only \
- --with-oprofile
-
- make -C "$build_dir"
- make -C "$build_dir" install
-
- find "$install_dir/lib" -iname '*.a' -print0 | xargs -0 strip --strip-debug
-</pre>
+<h2>Linux perf integration</h2>
-The you should define
+<p>
+On Linux, it is possible to have symbol resolution of JIT code with <a href="http://perf.wiki.kernel.org/">Linux perf</a>:
+</p>
<pre>
- export LLVM=/path/to/llvm-2.6-profile
+ perf record -g /my/application
+ perf report
</pre>
-and rebuild.
+<p>
+When run inside Linux perf, llvmpipe will create a /tmp/perf-XXXXX.map file with
+symbol address table. It also dumps assembly code to /tmp/perf-XXXXX.map.asm,
+which can be used by the bin/perf-annotate-jit script to produce disassembly of
+the generated code annotated with the samples.
+</p>
+
+<p>You can obtain a call graph via
+<a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#linux_perf">Gprof2Dot</a>.</p>
<h1>Unit testing</h1>
diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html
index 2e11bc497..04eea158a 100644
--- a/mesalib/docs/relnotes.html
+++ b/mesalib/docs/relnotes.html
@@ -21,58 +21,62 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<ul>
-<li><a href="relnotes-9.1.html">9.1 release notes</a>
-<li><a href="relnotes-9.0.3.html">9.0.3 release notes</a>
-<li><a href="relnotes-9.0.2.html">9.0.2 release notes</a>
-<li><a href="relnotes-9.0.1.html">9.0.1 release notes</a>
-<li><a href="relnotes-9.0.html">9.0 release notes</a>
-<li><a href="relnotes-8.0.5.html">8.0.5 release notes</a>
-<li><a href="relnotes-8.0.4.html">8.0.4 release notes</a>
-<li><a href="relnotes-8.0.3.html">8.0.3 release notes</a>
-<li><a href="relnotes-8.0.2.html">8.0.2 release notes</a>
-<li><a href="relnotes-8.0.1.html">8.0.1 release notes</a>
-<li><a href="relnotes-8.0.html">8.0 release notes</a>
-<li><a href="relnotes-7.11.2.html">7.11.2 release notes</a>
-<li><a href="relnotes-7.11.1.html">7.11.1 release notes</a>
-<li><a href="relnotes-7.11.html">7.11 release notes</a>
-<li><a href="relnotes-7.10.3.html">7.10.3 release notes</a>
-<li><a href="relnotes-7.10.2.html">7.10.2 release notes</a>
-<li><a href="relnotes-7.10.1.html">7.10.1 release notes</a>
-<li><a href="relnotes-7.10.html">7.10 release notes</a>
-<li><a href="relnotes-7.9.2.html">7.9.2 release notes</a>
-<li><a href="relnotes-7.9.1.html">7.9.1 release notes</a>
-<li><a href="relnotes-7.9.html">7.9 release notes</a>
-<li><a href="relnotes-7.8.3.html">7.8.3 release notes</a>
-<li><a href="relnotes-7.8.2.html">7.8.2 release notes</a>
-<li><a href="relnotes-7.8.1.html">7.8.1 release notes</a>
-<li><a href="relnotes-7.8.html">7.8 release notes</a>
-<li><a href="relnotes-7.7.1.html">7.7.1 release notes</a>
-<li><a href="relnotes-7.7.html">7.7 release notes</a>
-<li><a href="relnotes-7.6.1.html">7.6.1 release notes</a>
-<li><a href="relnotes-7.6.html">7.6 release notes</a>
-<li><a href="relnotes-7.5.2.html">7.5.2 release notes</a>
-<li><a href="relnotes-7.5.1.html">7.5.1 release notes</a>
-<li><a href="relnotes-7.5.html">7.5 release notes</a>
-<li><a href="relnotes-7.4.4.html">7.4.4 release notes</a>
-<li><a href="relnotes-7.4.3.html">7.4.3 release notes</a>
-<li><a href="relnotes-7.4.2.html">7.4.2 release notes</a>
-<li><a href="relnotes-7.4.1.html">7.4.1 release notes</a>
-<li><a href="relnotes-7.4.html">7.4 release notes</a>
-<li><a href="relnotes-7.3.html">7.3 release notes</a>
-<li><a href="relnotes-7.2.html">7.2 release notes</a>
-<li><a href="relnotes-7.1.html">7.1 release notes</a>
-<li><a href="relnotes-7.0.4.html">7.0.4 release notes</a>
-<li><a href="relnotes-7.0.3.html">7.0.3 release notes</a>
-<li><a href="relnotes-7.0.2.html">7.0.2 release notes</a>
-<li><a href="relnotes-7.0.1.html">7.0.1 release notes</a>
-<li><a href="relnotes-7.0.html">7.0 release notes</a>
-<li><a href="relnotes-6.5.3.html">6.5.3 release notes</a>
-<li><a href="relnotes-6.5.2.html">6.5.2 release notes</a>
-<li><a href="relnotes-6.5.1.html">6.5.1 release notes</a>
-<li><a href="relnotes-6.5.html">6.5 release notes</a>
-<li><a href="relnotes-6.4.2.html">6.4.2 release notes</a>
-<li><a href="relnotes-6.4.1.html">6.4.1 release notes</a>
-<li><a href="relnotes-6.4.html">6.4 release notes</a>
+<li><a href="relnotes/9.2.html">9.2 release notes</a>
+<li><a href="relnotes/9.1.3.html">9.1.3 release notes</a>
+<li><a href="relnotes/9.1.2.html">9.1.2 release notes</a>
+<li><a href="relnotes/9.1.1.html">9.1.1 release notes</a>
+<li><a href="relnotes/9.1.html">9.1 release notes</a>
+<li><a href="relnotes/9.0.3.html">9.0.3 release notes</a>
+<li><a href="relnotes/9.0.2.html">9.0.2 release notes</a>
+<li><a href="relnotes/9.0.1.html">9.0.1 release notes</a>
+<li><a href="relnotes/9.0.html">9.0 release notes</a>
+<li><a href="relnotes/8.0.5.html">8.0.5 release notes</a>
+<li><a href="relnotes/8.0.4.html">8.0.4 release notes</a>
+<li><a href="relnotes/8.0.3.html">8.0.3 release notes</a>
+<li><a href="relnotes/8.0.2.html">8.0.2 release notes</a>
+<li><a href="relnotes/8.0.1.html">8.0.1 release notes</a>
+<li><a href="relnotes/8.0.html">8.0 release notes</a>
+<li><a href="relnotes/7.11.2.html">7.11.2 release notes</a>
+<li><a href="relnotes/7.11.1.html">7.11.1 release notes</a>
+<li><a href="relnotes/7.11.html">7.11 release notes</a>
+<li><a href="relnotes/7.10.3.html">7.10.3 release notes</a>
+<li><a href="relnotes/7.10.2.html">7.10.2 release notes</a>
+<li><a href="relnotes/7.10.1.html">7.10.1 release notes</a>
+<li><a href="relnotes/7.10.html">7.10 release notes</a>
+<li><a href="relnotes/7.9.2.html">7.9.2 release notes</a>
+<li><a href="relnotes/7.9.1.html">7.9.1 release notes</a>
+<li><a href="relnotes/7.9.html">7.9 release notes</a>
+<li><a href="relnotes/7.8.3.html">7.8.3 release notes</a>
+<li><a href="relnotes/7.8.2.html">7.8.2 release notes</a>
+<li><a href="relnotes/7.8.1.html">7.8.1 release notes</a>
+<li><a href="relnotes/7.8.html">7.8 release notes</a>
+<li><a href="relnotes/7.7.1.html">7.7.1 release notes</a>
+<li><a href="relnotes/7.7.html">7.7 release notes</a>
+<li><a href="relnotes/7.6.1.html">7.6.1 release notes</a>
+<li><a href="relnotes/7.6.html">7.6 release notes</a>
+<li><a href="relnotes/7.5.2.html">7.5.2 release notes</a>
+<li><a href="relnotes/7.5.1.html">7.5.1 release notes</a>
+<li><a href="relnotes/7.5.html">7.5 release notes</a>
+<li><a href="relnotes/7.4.4.html">7.4.4 release notes</a>
+<li><a href="relnotes/7.4.3.html">7.4.3 release notes</a>
+<li><a href="relnotes/7.4.2.html">7.4.2 release notes</a>
+<li><a href="relnotes/7.4.1.html">7.4.1 release notes</a>
+<li><a href="relnotes/7.4.html">7.4 release notes</a>
+<li><a href="relnotes/7.3.html">7.3 release notes</a>
+<li><a href="relnotes/7.2.html">7.2 release notes</a>
+<li><a href="relnotes/7.1.html">7.1 release notes</a>
+<li><a href="relnotes/7.0.4.html">7.0.4 release notes</a>
+<li><a href="relnotes/7.0.3.html">7.0.3 release notes</a>
+<li><a href="relnotes/7.0.2.html">7.0.2 release notes</a>
+<li><a href="relnotes/7.0.1.html">7.0.1 release notes</a>
+<li><a href="relnotes/7.0.html">7.0 release notes</a>
+<li><a href="relnotes/6.5.3.html">6.5.3 release notes</a>
+<li><a href="relnotes/6.5.2.html">6.5.2 release notes</a>
+<li><a href="relnotes/6.5.1.html">6.5.1 release notes</a>
+<li><a href="relnotes/6.5.html">6.5 release notes</a>
+<li><a href="relnotes/6.4.2.html">6.4.2 release notes</a>
+<li><a href="relnotes/6.4.1.html">6.4.1 release notes</a>
+<li><a href="relnotes/6.4.html">6.4 release notes</a>
</ul>
<p>
@@ -81,29 +85,31 @@ Versions of Mesa prior to 6.4 are summarized in the
</p>
<ul>
-<li><a href="RELNOTES-6.3.2">RELNOTES-6.3.2</a>
-<li><a href="RELNOTES-6.3">RELNOTES-6.3</a>
-<li><a href="RELNOTES-6.2.1">RELNOTES-6.2.1</a>
-<li><a href="RELNOTES-6.2">RELNOTES-6.2</a>
-<li><a href="RELNOTES-6.1">RELNOTES-6.1</a>
-<li><a href="RELNOTES-6.0">RELNOTES-6.0</a>
-<li><a href="RELNOTES-5.1">RELNOTES-5.1</a>
-<li><a href="RELNOTES-5.0.2">RELNOTES-5.0.2</a>
-<li><a href="RELNOTES-5.0.1">RELNOTES-5.0.1</a>
-<li><a href="RELNOTES-5.0">RELNOTES-5.0</a>
-<li><a href="RELNOTES-4.1">RELNOTES-4.1</a>
-<li><a href="RELNOTES-4.0.3">RELNOTES-4.0.3</a>
-<li><a href="RELNOTES-4.0.2">RELNOTES-4.0.2</a>
-<li><a href="RELNOTES-4.0.1">RELNOTES-4.0.1</a>
-<li><a href="RELNOTES-4.0">RELNOTES-4.0</a>
-<li><a href="RELNOTES-3.5">RELNOTES-3.5</a>
-<li><a href="RELNOTES-3.4.2">RELNOTES-3.4.2</a>
-<li><a href="RELNOTES-3.4.1">RELNOTES-3.4.1</a>
-<li><a href="RELNOTES-3.4">RELNOTES-3.4</a>
-<li><a href="RELNOTES-3.3">RELNOTES-3.3</a>
-<li><a href="RELNOTES-3.2.1">RELNOTES-3.2.1</a>
-<li><a href="RELNOTES-3.2">RELNOTES-3.2</a>
-<li><a href="RELNOTES-3.1">RELNOTES-3.1</a>
+<li><a href="relnotes/6.3.2">6.3.2 release notes</a>
+<li><a href="relnotes/6.3.1">6.3.1 release notes</a>
+<li><a href="relnotes/6.3">6.3 release notes</a>
+<li><a href="relnotes/6.2.1">6.2.1 release notes</a>
+<li><a href="relnotes/6.2">6.2 release notes</a>
+<li><a href="relnotes/6.1">6.1 release notes</a>
+<li><a href="relnotes/6.0.1">6.0.1 release notes</a>
+<li><a href="relnotes/6.0">6.0 release notes</a>
+<li><a href="relnotes/5.1">5.1 release notes</a>
+<li><a href="relnotes/5.0.2">5.0.2 release notes</a>
+<li><a href="relnotes/5.0.1">5.0.1 release notes</a>
+<li><a href="relnotes/5.0">5.0 release notes</a>
+<li><a href="relnotes/4.1">4.1 release notes</a>
+<li><a href="relnotes/4.0.3">4.0.3 release notes</a>
+<li><a href="relnotes/4.0.2">4.0.2 release notes</a>
+<li><a href="relnotes/4.0.1">4.0.1 release notes</a>
+<li><a href="relnotes/4.0">4.0 release notes</a>
+<li><a href="relnotes/3.5">3.5 release notes</a>
+<li><a href="relnotes/3.4.2">3.4.2 release notes</a>
+<li><a href="relnotes/3.4.1">3.4.1 release notes</a>
+<li><a href="relnotes/3.4">3.4 release notes</a>
+<li><a href="relnotes/3.3">3.3 release notes</a>
+<li><a href="relnotes/3.2.1">3.2.1 release notes</a>
+<li><a href="relnotes/3.2">3.2 release notes</a>
+<li><a href="relnotes/3.1">3.1 release notes</a>
</ul>
</div>
diff --git a/mesalib/docs/RELNOTES-3.1 b/mesalib/docs/relnotes/3.1
index 65324eb49..65324eb49 100644
--- a/mesalib/docs/RELNOTES-3.1
+++ b/mesalib/docs/relnotes/3.1
diff --git a/mesalib/docs/RELNOTES-3.2 b/mesalib/docs/relnotes/3.2
index ec7d4f8dc..ec7d4f8dc 100644
--- a/mesalib/docs/RELNOTES-3.2
+++ b/mesalib/docs/relnotes/3.2
diff --git a/mesalib/docs/RELNOTES-3.2.1 b/mesalib/docs/relnotes/3.2.1
index d34efcc86..d34efcc86 100644
--- a/mesalib/docs/RELNOTES-3.2.1
+++ b/mesalib/docs/relnotes/3.2.1
diff --git a/mesalib/docs/RELNOTES-3.3 b/mesalib/docs/relnotes/3.3
index 3850767bb..3850767bb 100644
--- a/mesalib/docs/RELNOTES-3.3
+++ b/mesalib/docs/relnotes/3.3
diff --git a/mesalib/docs/RELNOTES-3.4 b/mesalib/docs/relnotes/3.4
index 657ccdaab..657ccdaab 100644
--- a/mesalib/docs/RELNOTES-3.4
+++ b/mesalib/docs/relnotes/3.4
diff --git a/mesalib/docs/RELNOTES-3.4.1 b/mesalib/docs/relnotes/3.4.1
index 73d75c64d..73d75c64d 100644
--- a/mesalib/docs/RELNOTES-3.4.1
+++ b/mesalib/docs/relnotes/3.4.1
diff --git a/mesalib/docs/RELNOTES-3.4.2 b/mesalib/docs/relnotes/3.4.2
index 9caea900d..9caea900d 100644
--- a/mesalib/docs/RELNOTES-3.4.2
+++ b/mesalib/docs/relnotes/3.4.2
diff --git a/mesalib/docs/RELNOTES-3.5 b/mesalib/docs/relnotes/3.5
index b2aa1b852..b2aa1b852 100644
--- a/mesalib/docs/RELNOTES-3.5
+++ b/mesalib/docs/relnotes/3.5
diff --git a/mesalib/docs/RELNOTES-4.0 b/mesalib/docs/relnotes/4.0
index 2f729db15..2f729db15 100644
--- a/mesalib/docs/RELNOTES-4.0
+++ b/mesalib/docs/relnotes/4.0
diff --git a/mesalib/docs/RELNOTES-4.0.1 b/mesalib/docs/relnotes/4.0.1
index e84df6bf8..e84df6bf8 100644
--- a/mesalib/docs/RELNOTES-4.0.1
+++ b/mesalib/docs/relnotes/4.0.1
diff --git a/mesalib/docs/RELNOTES-4.0.2 b/mesalib/docs/relnotes/4.0.2
index b476956ba..b476956ba 100644
--- a/mesalib/docs/RELNOTES-4.0.2
+++ b/mesalib/docs/relnotes/4.0.2
diff --git a/mesalib/docs/RELNOTES-4.0.3 b/mesalib/docs/relnotes/4.0.3
index 0b3e34bef..0b3e34bef 100644
--- a/mesalib/docs/RELNOTES-4.0.3
+++ b/mesalib/docs/relnotes/4.0.3
diff --git a/mesalib/docs/RELNOTES-4.1 b/mesalib/docs/relnotes/4.1
index 24e9299eb..24e9299eb 100644
--- a/mesalib/docs/RELNOTES-4.1
+++ b/mesalib/docs/relnotes/4.1
diff --git a/mesalib/docs/RELNOTES-5.0 b/mesalib/docs/relnotes/5.0
index 1b22996d8..1b22996d8 100644
--- a/mesalib/docs/RELNOTES-5.0
+++ b/mesalib/docs/relnotes/5.0
diff --git a/mesalib/docs/RELNOTES-5.0.1 b/mesalib/docs/relnotes/5.0.1
index f37e9c4a7..f37e9c4a7 100644
--- a/mesalib/docs/RELNOTES-5.0.1
+++ b/mesalib/docs/relnotes/5.0.1
diff --git a/mesalib/docs/RELNOTES-5.0.2 b/mesalib/docs/relnotes/5.0.2
index d0e05b2c7..d0e05b2c7 100644
--- a/mesalib/docs/RELNOTES-5.0.2
+++ b/mesalib/docs/relnotes/5.0.2
diff --git a/mesalib/docs/RELNOTES-5.1 b/mesalib/docs/relnotes/5.1
index aed6e102b..59b7964a0 100644
--- a/mesalib/docs/RELNOTES-5.1
+++ b/mesalib/docs/relnotes/5.1
@@ -106,7 +106,7 @@ Vertex/Fragment program debugger
GL_MESA_program_debug is an experimental extension to support
interactive debugging of vertex and fragment programs. See the
-docs/MESA_program_debug.spec file for details.
+docs/specs/OLD/MESA_program_debug.spec file for details.
The bulk of the vertex/fragment program debugger is implemented
outside of Mesa. The GL_MESA_program_debug extension just has minimal
diff --git a/mesalib/docs/RELNOTES-6.0 b/mesalib/docs/relnotes/6.0
index 1a3c2fb1a..1a3c2fb1a 100644
--- a/mesalib/docs/RELNOTES-6.0
+++ b/mesalib/docs/relnotes/6.0
diff --git a/mesalib/docs/RELNOTES-6.0.1 b/mesalib/docs/relnotes/6.0.1
index 1444b9fc8..1444b9fc8 100644
--- a/mesalib/docs/RELNOTES-6.0.1
+++ b/mesalib/docs/relnotes/6.0.1
diff --git a/mesalib/docs/RELNOTES-6.1 b/mesalib/docs/relnotes/6.1
index 8de64d1f1..8de64d1f1 100644
--- a/mesalib/docs/RELNOTES-6.1
+++ b/mesalib/docs/relnotes/6.1
diff --git a/mesalib/docs/RELNOTES-6.2 b/mesalib/docs/relnotes/6.2
index 06cfba0c7..06cfba0c7 100644
--- a/mesalib/docs/RELNOTES-6.2
+++ b/mesalib/docs/relnotes/6.2
diff --git a/mesalib/docs/RELNOTES-6.2.1 b/mesalib/docs/relnotes/6.2.1
index c7baa5d42..c7baa5d42 100644
--- a/mesalib/docs/RELNOTES-6.2.1
+++ b/mesalib/docs/relnotes/6.2.1
diff --git a/mesalib/docs/RELNOTES-6.3 b/mesalib/docs/relnotes/6.3
index 6b4dfaaf9..6b4dfaaf9 100644
--- a/mesalib/docs/RELNOTES-6.3
+++ b/mesalib/docs/relnotes/6.3
diff --git a/mesalib/docs/RELNOTES-6.3.1 b/mesalib/docs/relnotes/6.3.1
index eacc952ae..eacc952ae 100644
--- a/mesalib/docs/RELNOTES-6.3.1
+++ b/mesalib/docs/relnotes/6.3.1
diff --git a/mesalib/docs/RELNOTES-6.3.2 b/mesalib/docs/relnotes/6.3.2
index e5243ef78..e5243ef78 100644
--- a/mesalib/docs/RELNOTES-6.3.2
+++ b/mesalib/docs/relnotes/6.3.2
diff --git a/mesalib/docs/RELNOTES-6.4 b/mesalib/docs/relnotes/6.4
index 1a945a103..1a945a103 100644
--- a/mesalib/docs/RELNOTES-6.4
+++ b/mesalib/docs/relnotes/6.4
diff --git a/mesalib/docs/relnotes-6.4.1.html b/mesalib/docs/relnotes/6.4.1.html
index d050f7935..c9df78786 100644
--- a/mesalib/docs/relnotes-6.4.1.html
+++ b/mesalib/docs/relnotes/6.4.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.4.1 / November 29, 2006</h1>
diff --git a/mesalib/docs/relnotes-6.4.2.html b/mesalib/docs/relnotes/6.4.2.html
index e894e73e2..4c8a75c9b 100644
--- a/mesalib/docs/relnotes-6.4.2.html
+++ b/mesalib/docs/relnotes/6.4.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.4.2 / February 2, 2006</h1>
diff --git a/mesalib/docs/relnotes-6.4.html b/mesalib/docs/relnotes/6.4.html
index 9dfa74668..9f7d9b8de 100644
--- a/mesalib/docs/relnotes-6.4.html
+++ b/mesalib/docs/relnotes/6.4.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.4 / October 24, 2005</h1>
diff --git a/mesalib/docs/relnotes-6.5.1.html b/mesalib/docs/relnotes/6.5.1.html
index e600c1757..97a705a51 100644
--- a/mesalib/docs/relnotes-6.5.1.html
+++ b/mesalib/docs/relnotes/6.5.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.5.1 Release Notes / September 15, 2006</h1>
diff --git a/mesalib/docs/relnotes-6.5.2.html b/mesalib/docs/relnotes/6.5.2.html
index f73dce18b..b14f24f28 100644
--- a/mesalib/docs/relnotes-6.5.2.html
+++ b/mesalib/docs/relnotes/6.5.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.5.2 Release Notes / December 2, 2006</h1>
diff --git a/mesalib/docs/relnotes-6.5.3.html b/mesalib/docs/relnotes/6.5.3.html
index 0e6526c04..207a36cad 100644
--- a/mesalib/docs/relnotes-6.5.3.html
+++ b/mesalib/docs/relnotes/6.5.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.5.3 Release Notes / April 27, 2007</h1>
@@ -56,7 +56,7 @@ for the same reason.
<ul>
<li>OpenGL 2.0 and 2.1 API support.
<li>Entirely new Shading Language code generator. See the
-<a href="shading.html">Shading Language</a> page for more information.
+<a href="../shading.html">Shading Language</a> page for more information.
<li>Much faster software execution of vertex, fragment shaders.
<li>New vertex buffer object (vbo) infrastructure
<li>Updated glext.h file (version 39)
diff --git a/mesalib/docs/relnotes-6.5.html b/mesalib/docs/relnotes/6.5.html
index b6430a2f4..de7a99a18 100644
--- a/mesalib/docs/relnotes-6.5.html
+++ b/mesalib/docs/relnotes/6.5.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 6.5 Release Notes / March 31, 2006</h1>
diff --git a/mesalib/docs/relnotes-7.0.1.html b/mesalib/docs/relnotes/7.0.1.html
index c8a2ad090..686f30d53 100644
--- a/mesalib/docs/relnotes-7.0.1.html
+++ b/mesalib/docs/relnotes/7.0.1.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.0.1 Release Notes / August 3, 2007</h1>
diff --git a/mesalib/docs/relnotes-7.0.2.html b/mesalib/docs/relnotes/7.0.2.html
index 9238d2b38..b69e5493a 100644
--- a/mesalib/docs/relnotes-7.0.2.html
+++ b/mesalib/docs/relnotes/7.0.2.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.0.2 Release Notes / November 10, 2007</h1>
diff --git a/mesalib/docs/relnotes-7.0.3.html b/mesalib/docs/relnotes/7.0.3.html
index 4fcb94dcc..ccc02e68d 100644
--- a/mesalib/docs/relnotes-7.0.3.html
+++ b/mesalib/docs/relnotes/7.0.3.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.0.3 Release Notes / April 4, 2008</h1>
diff --git a/mesalib/docs/relnotes-7.0.4.html b/mesalib/docs/relnotes/7.0.4.html
index 66b85c409..dbaf1b49b 100644
--- a/mesalib/docs/relnotes-7.0.4.html
+++ b/mesalib/docs/relnotes/7.0.4.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.0.4 Release Notes / August 16, 2008</h1>
diff --git a/mesalib/docs/relnotes-7.0.html b/mesalib/docs/relnotes/7.0.html
index 3240bb298..850a5dcaf 100644
--- a/mesalib/docs/relnotes-7.0.html
+++ b/mesalib/docs/relnotes/7.0.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.0 Release Notes / June 22, 2007</h1>
diff --git a/mesalib/docs/relnotes-7.1.html b/mesalib/docs/relnotes/7.1.html
index 07f5ac900..03b2f361c 100644
--- a/mesalib/docs/relnotes-7.1.html
+++ b/mesalib/docs/relnotes/7.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.1 Release Notes / August 26, 2008</h1>
diff --git a/mesalib/docs/relnotes-7.10.1.html b/mesalib/docs/relnotes/7.10.1.html
index 675bab225..260cb9d26 100644
--- a/mesalib/docs/relnotes-7.10.1.html
+++ b/mesalib/docs/relnotes/7.10.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.10.1 Release Notes / March 2, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.10.2.html b/mesalib/docs/relnotes/7.10.2.html
index 753eb6ceb..4703f5ebd 100644
--- a/mesalib/docs/relnotes-7.10.2.html
+++ b/mesalib/docs/relnotes/7.10.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.10.2 Release Notes / April 6, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.10.3.html b/mesalib/docs/relnotes/7.10.3.html
index db655179a..94527354d 100644
--- a/mesalib/docs/relnotes-7.10.3.html
+++ b/mesalib/docs/relnotes/7.10.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.10.3 Release Notes / June 13, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.10.html b/mesalib/docs/relnotes/7.10.html
index 6bf8f30e5..a88811e50 100644
--- a/mesalib/docs/relnotes-7.10.html
+++ b/mesalib/docs/relnotes/7.10.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.10 Release Notes / January 7, 2011</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
@@ -699,7 +699,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
<li>st/egl: Plug pbuffer leaks.</li>
<li>st/egl: Fix eglCopyBuffers.</li>
<li>st/egl: Assorted fixes for dri2_display_get_configs.</li>
- <li>docs/egl: Update egl.html.</li>
+ <li>docs/egl: Update ../egl.html.</li>
<li>st/egl: Fix eglChooseConfig when configs is NULL.</li>
<li>docs: Add an example for EGL_DRIVERS_PATH.</li>
<li>autoconf: Fix --with-driver=xlib --enable-openvg.</li>
diff --git a/mesalib/docs/relnotes-7.11.1.html b/mesalib/docs/relnotes/7.11.1.html
index 2c23acb82..7579ef579 100644
--- a/mesalib/docs/relnotes-7.11.1.html
+++ b/mesalib/docs/relnotes/7.11.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.11.1 Release Notes / November 17, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.11.2.html b/mesalib/docs/relnotes/7.11.2.html
index 985ce879a..9b89fa38c 100644
--- a/mesalib/docs/relnotes-7.11.2.html
+++ b/mesalib/docs/relnotes/7.11.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.11.2 Release Notes / November 27, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.11.html b/mesalib/docs/relnotes/7.11.html
index 8573908c5..721da9ca3 100644
--- a/mesalib/docs/relnotes-7.11.html
+++ b/mesalib/docs/relnotes/7.11.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.11 Release Notes / July 31, 2011</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.2.html b/mesalib/docs/relnotes/7.2.html
index 596af3fca..4c1ae7fd8 100644
--- a/mesalib/docs/relnotes-7.2.html
+++ b/mesalib/docs/relnotes/7.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.2 Release Notes / 20 September 2008</h1>
diff --git a/mesalib/docs/relnotes-7.3.html b/mesalib/docs/relnotes/7.3.html
index 409274f77..7ff5ed1fa 100644
--- a/mesalib/docs/relnotes-7.3.html
+++ b/mesalib/docs/relnotes/7.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.3 Release Notes / 22 January 2009</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.4.1.html b/mesalib/docs/relnotes/7.4.1.html
index 9b584a02b..104f185e3 100644
--- a/mesalib/docs/relnotes-7.4.1.html
+++ b/mesalib/docs/relnotes/7.4.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.4.1 Release Notes / 18 April 2009</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.4.2.html b/mesalib/docs/relnotes/7.4.2.html
index 79652605f..770db8f29 100644
--- a/mesalib/docs/relnotes-7.4.2.html
+++ b/mesalib/docs/relnotes/7.4.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.4.2 Release Notes / May 15, 2009</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.4.3.html b/mesalib/docs/relnotes/7.4.3.html
index 25e2bd12b..ebe973012 100644
--- a/mesalib/docs/relnotes-7.4.3.html
+++ b/mesalib/docs/relnotes/7.4.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.4.3 Release Notes / 19 June 2009</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.4.4.html b/mesalib/docs/relnotes/7.4.4.html
index 667805d88..41fec5a2c 100644
--- a/mesalib/docs/relnotes-7.4.4.html
+++ b/mesalib/docs/relnotes/7.4.4.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.4.4 Release Notes / 23 June 2009</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.4.html b/mesalib/docs/relnotes/7.4.html
index f29cbd942..0bfe68e2a 100644
--- a/mesalib/docs/relnotes-7.4.html
+++ b/mesalib/docs/relnotes/7.4.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.4 Release Notes / 27 March 2009</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.5.1.html b/mesalib/docs/relnotes/7.5.1.html
index 61ab293f9..cf5a5691d 100644
--- a/mesalib/docs/relnotes-7.5.1.html
+++ b/mesalib/docs/relnotes/7.5.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.5.1 Release Notes, 3 September 2009</h1>
@@ -29,7 +29,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.5.2.html b/mesalib/docs/relnotes/7.5.2.html
index 350ce4383..13389fdb4 100644
--- a/mesalib/docs/relnotes-7.5.2.html
+++ b/mesalib/docs/relnotes/7.5.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.5.2 Release Notes, 28 September 2009</h1>
@@ -29,7 +29,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.5.html b/mesalib/docs/relnotes/7.5.html
index e4318060c..9e96aa329 100644
--- a/mesalib/docs/relnotes-7.5.html
+++ b/mesalib/docs/relnotes/7.5.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.5 Release Notes / 17 July 2009</h1>
@@ -31,7 +31,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<p>
diff --git a/mesalib/docs/relnotes-7.6.1.html b/mesalib/docs/relnotes/7.6.1.html
index 086f21f5f..bc84f5725 100644
--- a/mesalib/docs/relnotes-7.6.1.html
+++ b/mesalib/docs/relnotes/7.6.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.6.1 Release Notes, 21 December 2009</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.6.html b/mesalib/docs/relnotes/7.6.html
index 30e9f7eea..86ad4a848 100644
--- a/mesalib/docs/relnotes-7.6.html
+++ b/mesalib/docs/relnotes/7.6.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.6 Release Notes, 28 September 2009</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
@@ -48,7 +48,7 @@ c49c19c2bbef4f3b7f1389974dff25f4 MesaGLUT-7.6.zip
<h2>New features</h2>
<ul>
-<li><a href="openvg.html">OpenVG</a> front-end (state tracker for Gallium).
+<li><a href="../openvg.html">OpenVG</a> front-end (state tracker for Gallium).
This was written by Zack Rusin at Tungsten Graphics.
<li>GL_ARB_vertex_array_object and GL_APPLE_vertex_array_object extensions
(supported in Gallium drivers, Intel DRI drivers, and software drivers)</li>
diff --git a/mesalib/docs/relnotes-7.7.1.html b/mesalib/docs/relnotes/7.7.1.html
index 00805ea5f..3a295a895 100644
--- a/mesalib/docs/relnotes-7.7.1.html
+++ b/mesalib/docs/relnotes/7.7.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.7.1 Release Notes / March 28, 2010</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.7.html b/mesalib/docs/relnotes/7.7.html
index 7ee9a1bfd..46ee7c2a8 100644
--- a/mesalib/docs/relnotes-7.7.html
+++ b/mesalib/docs/relnotes/7.7.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.7 Release Notes / 21 December 2009</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.8.1.html b/mesalib/docs/relnotes/7.8.1.html
index f7b4dfb8e..72317ca20 100644
--- a/mesalib/docs/relnotes-7.8.1.html
+++ b/mesalib/docs/relnotes/7.8.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.8.1 Release Notes / April 5, 2010</h1>
@@ -29,7 +29,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.8.2.html b/mesalib/docs/relnotes/7.8.2.html
index 6d076a3ac..ab18402d9 100644
--- a/mesalib/docs/relnotes-7.8.2.html
+++ b/mesalib/docs/relnotes/7.8.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.8.2 Release Notes / June 17, 2010</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.8.3.html b/mesalib/docs/relnotes/7.8.3.html
index f63a94dba..ad885f2ef 100644
--- a/mesalib/docs/relnotes-7.8.3.html
+++ b/mesalib/docs/relnotes/7.8.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.8.3 Release Notes / (date tbd)</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.8.html b/mesalib/docs/relnotes/7.8.html
index 8d8bc653f..d8cc3e9a9 100644
--- a/mesalib/docs/relnotes-7.8.html
+++ b/mesalib/docs/relnotes/7.8.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.8 Release Notes / March 28, 2010</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
@@ -53,8 +53,8 @@ b54581aeb79b585b158d6a32f94feff2 MesaGLUT-7.8.zip
<li>GL_ARB_fragment_coord_conventions extension (for swrast, i965, and Gallium drivers)
<li>GL_EXT_texture_array extension (swrast driver only)
<li>GL_APPLE_object_purgeable extension (swrast and i945/i965 DRI drivers)
-<li>Much improved support for <a href="egl.html">EGL in Mesa</a>
-<li>New state trackers for <a href="opengles.html">OpenGL ES 1.1 and 2.0</a>
+<li>Much improved support for <a href="../egl.html">EGL in Mesa</a>
+<li>New state trackers for <a href="../opengles.html">OpenGL ES 1.1 and 2.0</a>
<li>Dedicated documentation for Gallium
</ul>
diff --git a/mesalib/docs/relnotes-7.9.1.html b/mesalib/docs/relnotes/7.9.1.html
index 5d5b4a983..7a9835e1b 100644
--- a/mesalib/docs/relnotes-7.9.1.html
+++ b/mesalib/docs/relnotes/7.9.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.9.1 Release Notes / January 7, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.9.2.html b/mesalib/docs/relnotes/7.9.2.html
index 9d4f7ecda..c98d7f821 100644
--- a/mesalib/docs/relnotes-7.9.2.html
+++ b/mesalib/docs/relnotes/7.9.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.9.2 Release Notes / March 2, 2011</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-7.9.html b/mesalib/docs/relnotes/7.9.html
index aa10e2f68..1e6baba7a 100644
--- a/mesalib/docs/relnotes-7.9.html
+++ b/mesalib/docs/relnotes/7.9.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 7.9 Release Notes / October 4, 2010</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
@@ -46,7 +46,7 @@ cd2b6ecec759b0457475e94bbb38fedb MesaLib-7.9.zip
<h2>New features</h2>
<ul>
<li>New, improved GLSL compiler written by Intel.
- See the <a href="shading.html"> Shading Language</a> page for
+ See the <a href="../shading.html"> Shading Language</a> page for
more information.
<li>New, very experimental Gallium driver for R600-R700 Radeons.
<li>Support for AMD Evergreen-based Radeons (HD 5xxx)
diff --git a/mesalib/docs/relnotes-8.0.1.html b/mesalib/docs/relnotes/8.0.1.html
index 33c61982c..3cf61adb6 100644
--- a/mesalib/docs/relnotes-8.0.1.html
+++ b/mesalib/docs/relnotes/8.0.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 8.0.1 Release Notes / February 16, 2012</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.0.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-8.0.2.html b/mesalib/docs/relnotes/8.0.2.html
index 460917504..9bb43a72b 100644
--- a/mesalib/docs/relnotes-8.0.2.html
+++ b/mesalib/docs/relnotes/8.0.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 8.0.2 Release Notes / March 21, 2012</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.0.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-8.0.3.html b/mesalib/docs/relnotes/8.0.3.html
index 1a5ecbb51..0586e2829 100644
--- a/mesalib/docs/relnotes-8.0.3.html
+++ b/mesalib/docs/relnotes/8.0.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 8.0.3 Release Notes / May 18, 2012</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.0.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-8.0.4.html b/mesalib/docs/relnotes/8.0.4.html
index 4ceaad2c2..00b31520d 100644
--- a/mesalib/docs/relnotes-8.0.4.html
+++ b/mesalib/docs/relnotes/8.0.4.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 8.0.4 Release Notes / July 10, 2012</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.0.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-8.0.5.html b/mesalib/docs/relnotes/8.0.5.html
index eb7595bb3..f8aeae8d8 100644
--- a/mesalib/docs/relnotes-8.0.5.html
+++ b/mesalib/docs/relnotes/8.0.5.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 8.0.5 Release Notes / October 24, 2012</h1>
@@ -25,7 +25,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.0.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-8.0.html b/mesalib/docs/relnotes/8.0.html
index 6987544ac..d19ed3c95 100644
--- a/mesalib/docs/relnotes-8.0.html
+++ b/mesalib/docs/relnotes/8.0.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 8.0 Release Notes / February 9, 2012</h1>
@@ -27,7 +27,7 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.0.
</p>
<p>
-See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+See the <a href="../install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
diff --git a/mesalib/docs/relnotes-9.0.1.html b/mesalib/docs/relnotes/9.0.1.html
index 50e8b70fd..cf8156d2d 100644
--- a/mesalib/docs/relnotes-9.0.1.html
+++ b/mesalib/docs/relnotes/9.0.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.0.1 Release Notes / November 16th, 2012</h1>
diff --git a/mesalib/docs/relnotes-9.0.2.html b/mesalib/docs/relnotes/9.0.2.html
index 65b9b1116..affc23d8b 100644
--- a/mesalib/docs/relnotes-9.0.2.html
+++ b/mesalib/docs/relnotes/9.0.2.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.0.2 Release Notes / January 22th, 2013</h1>
diff --git a/mesalib/docs/relnotes-9.0.3.html b/mesalib/docs/relnotes/9.0.3.html
index e8ec62964..95a6b7936 100644
--- a/mesalib/docs/relnotes-9.0.3.html
+++ b/mesalib/docs/relnotes/9.0.3.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.0.3 Release Notes / February 21th, 2013</h1>
diff --git a/mesalib/docs/relnotes-9.0.html b/mesalib/docs/relnotes/9.0.html
index 16b1417f3..1810ad4c6 100644
--- a/mesalib/docs/relnotes-9.0.html
+++ b/mesalib/docs/relnotes/9.0.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.0 Release Notes / October 8, 2012</h1>
diff --git a/mesalib/docs/relnotes-9.1.1.html b/mesalib/docs/relnotes/9.1.1.html
index a73c97424..5c1707436 100644
--- a/mesalib/docs/relnotes-9.1.1.html
+++ b/mesalib/docs/relnotes/9.1.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.1.1 Release Notes / March 19th, 2013</h1>
diff --git a/mesalib/docs/relnotes/9.1.2.html b/mesalib/docs/relnotes/9.1.2.html
new file mode 100644
index 000000000..885457af2
--- /dev/null
+++ b/mesalib/docs/relnotes/9.1.2.html
@@ -0,0 +1,237 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Mesa Release Notes</title>
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+ <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 9.1.2 Release Notes / April 30th, 2013</h1>
+
+<p>
+Mesa 9.1.2 is a bug fix release which fixes bugs found since the 9.1.1 release.
+</p>
+<p>
+Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.1. OpenGL
+3.1 is <strong>only</strong> available if requested at context creation
+because GL_ARB_compatibility is not supported.
+</p>
+
+<h2>MD5 checksums</h2>
+<pre>
+df2aab86ff4a510ce5b0d074caa0a59f MesaLib-9.1.2.tar.bz2
+415c2bc3a9eb571aafbfa474ebf5a2e0 MesaLib-9.1.2.tar.gz
+b1ae5a4d9255953980bc9254f5323420 MesaLib-9.1.2.zip
+</pre>
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+
+<p>This list is likely incomplete.</p>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=44567">Bug 44567</a> - [965gm] green artifacts when using GLSL in XBMC</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59238">Bug 59238</a> - many new symbols in libxatracker after recent automake work</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59445">Bug 59445</a> - [SNB/IVB/HSW Bisected]Oglc draw-buffers2(advanced.blending.none) segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59495">Bug 59495</a> - [i965 Bisected]Oglc fbblit(advanced.blitFb-3d-cube.mirror.both) fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60503">Bug 60503</a> - [r300g] Unigine Heaven 3.0: all objects are black</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60510">Bug 60510</a> - Firefox 18.0.2 Crash On Nvidia GeForce2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61197">Bug 61197</a> - [SNB Bisected] kwin_gles screen corruption</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61317">Bug 61317</a> - [IVB] corrupt rendering with UBOs</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61395">Bug 61395</a> - glEdgeFlag can't be set to false</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61947">Bug 61947</a> - nullpointer dereference causes xorg-server segfault when nouveau DRI driver is loaded</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62357">Bug 62357</a> - llvmpipe: Fragment Shader with &quot;return&quot; in main causes back output</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62434">Bug 62434</a> - [bisected] 3284.073] (EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/r600_dri.so failed (/usr/lib/libllvmradeon9.2.0.so: undefined symbol: lp_build_tgsi_intrinsic)</li>
+
+<li><a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349437">Debian bug #349437</a> - mesa - FTBFS: error: 'IEEE_ONE' undeclared</li>
+
+<li><a href="http://bugzilla.redhat.com/show_bug.cgi?id=918661">Redhat bug #918661</a> - crash in routine Avogadro UI manipulation</li>
+
+</ul>
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-9.1.1..mesa-9.1.2
+</pre>
+
+<p>Adam Jackson (2):</p>
+<ul>
+ <li>glx: Build with VISIBILITY_CFLAGS in automake</li>
+ <li>linux: Don't emit a .note.ABI-tag section anymore (#26663)</li>
+</ul>
+
+<p>Alan Hourihane (3):</p>
+<ul>
+ <li>Add missing GL_TEXTURE_CUBE_MAP entry in _mesa_legal_texture_dimensions</li>
+ <li>Unreference sampler object when it's currently bound to texture unit.</li>
+ <li>mesa: fix glGetInteger*(GL_SAMPLER_BINDING).</li>
+</ul>
+
+<p>Alex Deucher (1):</p>
+<ul>
+ <li>r600g: disable hyperz by default on 9.1</li>
+</ul>
+
+<p>Andreas Boll (5):</p>
+<ul>
+ <li>radeon/llvm: Link against libgallium.la to fix an undefined symbol</li>
+ <li>mesa: use ieee fp on s390 and m68k</li>
+ <li>build: Enable x86 assembler on Hurd.</li>
+ <li>osmesa: fix out-of-tree build</li>
+ <li>gallium/egl: fix out-of-tree build</li>
+</ul>
+
+<p>Anuj Phogat (1):</p>
+<ul>
+ <li>mesa: Fix FB blitting in case of zero size src or dst rect</li>
+</ul>
+
+<p>Brian Paul (4):</p>
+<ul>
+ <li>mesa: flush current state when querying GL_EDGE_FLAG</li>
+ <li>vbo: fix crash found with shared display lists</li>
+ <li>llvmpipe: tweak CMD_BLOCK_MAX and LP_SCENE_MAX_SIZE</li>
+ <li>llvmpipe: add some scene limit sanity check assertions</li>
+</ul>
+
+<p>Carl Worth (1):</p>
+<ul>
+ <li>i965: Avoid segfault in gen6_upload_state</li>
+</ul>
+
+<p>Chris Forbes (1):</p>
+<ul>
+ <li>i965/vs: Fix Gen4/5 VUE map inconsistency with gl_ClipVertex</li>
+</ul>
+
+<p>Christoph Bumiller (4):</p>
+<ul>
+ <li>nv50: fix 3D render target setup</li>
+ <li>nv50,nvc0: disable DEPTH_RANGE_NEAR/FAR clipping during blit</li>
+ <li>nv50,nvc0: fix 3d blits, restore viewport after blit</li>
+ <li>nvc0: fix for 2d engine R source formats writing RRR1 and not R001</li>
+</ul>
+
+<p>Eric Anholt (5):</p>
+<ul>
+ <li>i965/fs: Fix register allocation for uniform pull constants in 16-wide.</li>
+ <li>i965/fs: Fix broken rendering in large shaders with UBO loads.</li>
+ <li>i965/fs: Also do the gen4 SEND dependency workaround against other SENDs.</li>
+ <li>i965: Add definitions for gen7+ data cache messages.</li>
+ <li>mesa: Disable validate_ir_tree() on release builds.</li>
+</ul>
+
+<p>Ian Romanick (5):</p>
+<ul>
+ <li>docs: Add 9.1.1 release md5sums</li>
+ <li>mesa: Add previously picked commit to .cherry-ignore</li>
+ <li>glsl: Add missing bool case in glsl_type::get_scalar_type</li>
+ <li>mesa: Note that patch dbf94d1 should't actually get picked to the 9.1 branch</li>
+ <li>mesa: Bump version to 9.1.2</li>
+</ul>
+
+<p>Jan de Groot (1):</p>
+<ul>
+ <li>dri/nouveau: fix crash in nouveau_flush</li>
+</ul>
+
+<p>José Fonseca (3):</p>
+<ul>
+ <li>autotools: Add missing top-level include dir.</li>
+ <li>mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.</li>
+ <li>include: Fix build with VS 11 (i.e, 2012).</li>
+</ul>
+
+<p>Kenneth Graunke (4):</p>
+<ul>
+ <li>i965: Fix INTEL_DEBUG=shader_time for Haswell.</li>
+ <li>i965: Specialize SURFACE_STATE creation for shader time.</li>
+ <li>i965: Make INTEL_DEBUG=shader_time use the RAW surface format.</li>
+ <li>i965: Don't use texture swizzling to force alpha to 1.0 if unnecessary.</li>
+</ul>
+
+<p>Maarten Lankhorst (2):</p>
+<ul>
+ <li>gallium/build: Fix visibility CFLAGS in automake</li>
+ <li>radeon/llvm: Do not link against libgallium when building statically.</li>
+</ul>
+
+<p>Marcin Slusarz (1):</p>
+<ul>
+ <li>dri/nouveau: NV17_3D class is not available for NV1a chipset</li>
+</ul>
+
+<p>Marek Olšák (3):</p>
+<ul>
+ <li>mesa: don't allocate a texture if width or height is 0 in CopyTexImage</li>
+ <li>gallium/tgsi: fix valgrind warning</li>
+ <li>mesa: handle HALF_FLOAT like FLOAT in get_tex_rgba</li>
+</ul>
+
+<p>Martin Andersson (1):</p>
+<ul>
+ <li>r600g: Use virtual address for PIPE_QUERY_SO* in r600_emit_query_end</li>
+</ul>
+
+<p>Matt Turner (3):</p>
+<ul>
+ <li>configure.ac: Don't check for X11 unconditionally.</li>
+ <li>configure.ac: Remove stale comment about --x-* arguments.</li>
+ <li>mesa: Implement TEXTURE_IMMUTABLE_LEVELS for ES 3.0.</li>
+</ul>
+
+<p>Michel Dänzer (1):</p>
+<ul>
+ <li>radeonsi: Emit pixel shader state even when only the vertex shader changed</li>
+</ul>
+
+<p>Paul Berry (1):</p>
+<ul>
+ <li>i965: Apply depthstencil alignment workaround when doing fast clears.</li>
+</ul>
+
+<p>Roland Scheidegger (1):</p>
+<ul>
+ <li>gallivm: fix return opcode handling in main function of a shader</li>
+</ul>
+
+<p>Tapani Pälli (1):</p>
+<ul>
+ <li>intel: Fix regression in intel_create_image_from_name stride handling</li>
+</ul>
+
+<p>Tom Stellard (1):</p>
+<ul>
+ <li>r300g: Fix bug in OMOD optimization</li>
+</ul>
+
+</div>
+</body>
+</html>
diff --git a/mesalib/docs/relnotes/9.1.3.html b/mesalib/docs/relnotes/9.1.3.html
new file mode 100644
index 000000000..049bf0f07
--- /dev/null
+++ b/mesalib/docs/relnotes/9.1.3.html
@@ -0,0 +1,230 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Mesa Release Notes</title>
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+ <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 9.1.3 Release Notes / May 21st, 2013</h1>
+
+<p>
+Mesa 9.1.3 is a bug fix release which fixes bugs found since the 9.1.1 release.
+</p>
+<p>
+Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.1. OpenGL
+3.1 is <strong>only</strong> available if requested at context creation
+because GL_ARB_compatibility is not supported.
+</p>
+
+<h2>MD5 checksums</h2>
+<pre>
+952ccd03547ed72333b64e1746cf8ada MesaLib-9.1.3.tar.bz2
+26d2f1aa8e9db388d51fcbd163c61fb7 MesaLib-9.1.3.tar.gz
+7017b7bdf0ebfd39a5c46cee7cf6b567 MesaLib-9.1.3.zip
+</pre>
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+
+<p>This list is likely incomplete.</p>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=39251">Bug 39251</a> - Second Life viewers from release 2.7.4.235167 to the last 3.4.0.264911 crash on start.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47478">Bug 47478</a> - [wine] GLX_DONT_CARE does not work for GLX_DRAWABLE_TYPE or GLX_RENDER_TYPE</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56416">Bug 56416</a> - [SNB bisected] SNB hang with rc6 and hiz on glxgears (and other GL apps) immediately after xinit.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57436">Bug 57436</a> - [GLSL1.40 IVB/HSW]Piglit spec/glsl-1.40/compiler_built-in-functions/inverse-mat2.frag fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61554">Bug 61554</a> - [ivb] Mesa 9.1 performance regression on KWin's Lanczos shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61773">Bug 61773</a> - abort is an incredibly not-smart way to handle IR validation</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62868">Bug 62868</a> - solaris build broken with missing ffsll</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62999">Bug 62999</a> - glXChooseFBConfig with GLX_DRAWABLE_TYPE, GLX_DONT_CARE fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63078">Bug 63078</a> - EGL X11 Regression: Maximum swap interval is 0 (worked with 9.0)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63447">Bug 63447</a> - [i965 Bisected]Ogles1conform/Ogles2conform/Ogles3conform cases segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64662">Bug 64662</a> - [SNB 9.1 Bisected]Ogles2conform GL2ExtensionTests/depth_texture_cube_map/depth_texture_cube_map.test fail</li>
+
+</ul>
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-9.1.2..mesa-9.1.3
+</pre>
+
+<p>Alex Deucher (2):</p>
+<ul>
+ <li>r600g: add new richland pci ids</li>
+ <li>radeonsi: add new SI pci ids</li>
+</ul>
+
+<p>Alexander Monakov (1):</p>
+<ul>
+ <li>Honor GLX_DONT_CARE in MATCH_MASK</li>
+</ul>
+
+<p>Andreas Boll (2):</p>
+<ul>
+ <li>mesa: Add a script to generate the list of fixed bugs</li>
+ <li>mesa: add usage examples to get-pick-list and shortlog scripts</li>
+</ul>
+
+<p>Aras Pranckevicius (1):</p>
+<ul>
+ <li>GLSL: fix lower_jumps to report progress properly</li>
+</ul>
+
+<p>Brian Paul (3):</p>
+<ul>
+ <li>mesa: remove platform checks around __builtin_ffs, __builtin_ffsll</li>
+ <li>gallium/u_blitter: fix is_blit_generic_supported() stencil checking</li>
+ <li>mesa: enable GL_ARB_texture_float if TEXTURE_FLOAT_ENABLED is defined</li>
+</ul>
+
+<p>Chad Versace (2):</p>
+<ul>
+ <li>egl/dri2: Fix min/max swap interval of configs</li>
+ <li>intel: Allocate hiz in intel_renderbuffer_move_to_temp()</li>
+</ul>
+
+<p>Chris Forbes (2):</p>
+<ul>
+ <li>i965/fs: Don't try to use bogus interpolation modes pre-Gen6.</li>
+ <li>mesa: don't memcmp() off the end of a cache key.</li>
+</ul>
+
+<p>Dave Airlie (2):</p>
+<ul>
+ <li>st/mesa: fix UBO offsets.</li>
+ <li>ralloc: don't write to memory in case of alloc fail.</li>
+</ul>
+
+<p>Eric Anholt (11):</p>
+<ul>
+ <li>i965/fs: Remove creation of a MOV instruction that's never used.</li>
+ <li>i965/fs: Move varying uniform offset compuation into the helper func.</li>
+ <li>i965: Make the constant surface interface take a normal byte size.</li>
+ <li>i965/fs: Avoid inappropriate optimization with regs_written &gt; 1.</li>
+ <li>i965/fs: Do CSE on gen7's varying-index pull constant loads.</li>
+ <li>i965/fs: Clean up the setup of gen4 simd16 message destinations.</li>
+ <li>i965/gen7: Skip resetting SOL offsets at batch start with HW contexts.</li>
+ <li>i965/gen6: Reduce updates of transform feedback offsets with HW contexts.</li>
+ <li>i965: Fix SNB GPU hangs when a blorp batch is the first thing to execute.</li>
+ <li>i965: Fix hangs on HSW since the gen6 blorp fix.</li>
+ <li>i965: Disable write masking when setting up texturing m0.</li>
+</ul>
+
+<p>Haixia Shi (1):</p>
+<ul>
+ <li>ACTIVE_UNIFORM_MAX_LENGTH should include 3 extra characters for arrays.</li>
+</ul>
+
+<p>Ian Romanick (11):</p>
+<ul>
+ <li>docs: Add 9.1.2 release md5sums</li>
+ <li>mesa: Note that patch 0967c36 shouldn't actually get picked to the 9.1 branch</li>
+ <li>mesa: NULL check the pointer before trying to dereference it</li>
+ <li>egl/dri2: NULL check value returned by dri2_create_surface</li>
+ <li>mesa: Don't leak shared state when context initialization fails</li>
+ <li>mesa: Don't leak gl_context::BeginEnd at context destruction</li>
+ <li>mesa/swrast: Refactor no-memory error checking in blit_linear</li>
+ <li>mesa/swrast: Move free calls outside the attachment loop</li>
+ <li>intel: Don't dereference a NULL pointer of calloc fails</li>
+ <li>mesa: Note that a824692 is already back ported</li>
+ <li>mesa: Bump version to 9.1.3</li>
+</ul>
+
+<p>José Fonseca (1):</p>
+<ul>
+ <li>winsys/sw/xlib: Prevent shared memory segment leakage.</li>
+</ul>
+
+<p>Kenneth Graunke (9):</p>
+<ul>
+ <li>mesa: Add new ctx-&gt;Stencil._WriteEnabled derived state flag.</li>
+ <li>i965: Fix stencil write enable flag in 3DSTATE_DEPTH_BUFFER on Gen7+.</li>
+ <li>mesa: Fix unpack function for ETC2_SRGB8_PUNCHTHROUGH_ALPHA1.</li>
+ <li>mesa: Add an unpack function for ARGB2101010_UINT.</li>
+ <li>mesa: Add unpack functions for R/RG/RGB [U]INT8/16/32 formats.</li>
+ <li>mesa: Add unpack functions for A/I/L/LA [U]INT8/16/32 formats.</li>
+ <li>glsl: Ignore redundant prototypes after a function's been defined.</li>
+ <li>i965: Lower textureGrad() for samplerCubeShadow.</li>
+ <li>i965/vs: Fix textureGrad() with shadow samplers on Haswell.</li>
+</ul>
+
+<p>Maarten Lankhorst (1):</p>
+<ul>
+ <li>nvc0: Fix fd leak in nvc0_create_decoder</li>
+</ul>
+
+<p>Marek Olšák (5):</p>
+<ul>
+ <li>radeonsi: add more cases for copying unsupported formats to resource_copy_region</li>
+ <li>mesa: fix glGet queries depending on derived framebuffer state (v2)</li>
+ <li>gallium/u_blitter: implement buffer clearing</li>
+ <li>r600g: initialize CMASK and HTILE with the GPU using streamout</li>
+ <li>st/mesa: depth-stencil-alpha state also depends on _NEW_BUFFERS</li>
+</ul>
+
+<p>Martin Andersson (1):</p>
+<ul>
+ <li>r600g: Fix UMAD on Cayman</li>
+</ul>
+
+<p>Michel Dänzer (1):</p>
+<ul>
+ <li>radeonsi: Handle arbitrary 2-byte formats in resource_copy_region</li>
+</ul>
+
+<p>Paul Berry (7):</p>
+<ul>
+ <li>glsl: Fix array indexing when constant folding built-in functions.</li>
+ <li>i965: Reduce code duplication in handling of depth, stencil, and HiZ.</li>
+ <li>glsl/linker: fix varying packing for non-flat integer varyings.</li>
+ <li>glsl: Document lower_packed_varyings' "flat" requirement with an assert.</li>
+ <li>glsl/linker: Adapt flat varying handling in preparation for geometry shaders.</li>
+ <li>glsl/linker: Reduce scope of non-flat integer varying fix.</li>
+ <li>intel: Do a depth resolve before copying images between miptrees.</li>
+</ul>
+
+<p>Ralf Jung (1):</p>
+<ul>
+ <li>egl/x11: Fix initialisation of swap_interval</li>
+</ul>
+
+<p>Roland Scheidegger (1):</p>
+<ul>
+ <li>gallivm: fix small but severe bug in handling multiple lod level strides</li>
+</ul>
+
+<p>Vadim Girlin (1):</p>
+<ul>
+ <li>gallium: handle drirc disable_glsl_line_continuations option</li>
+</ul>
+
+</div>
+</body>
+</html>
diff --git a/mesalib/docs/relnotes-9.1.html b/mesalib/docs/relnotes/9.1.html
index 8232ab8ee..6ecb7c000 100644
--- a/mesalib/docs/relnotes-9.1.html
+++ b/mesalib/docs/relnotes/9.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
- <link rel="stylesheet" type="text/css" href="mesa.css">
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
@@ -11,7 +11,7 @@
<h1>The Mesa 3D Graphics Library</h1>
</div>
-<iframe src="contents.html"></iframe>
+<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.1 Release Notes / February 22, 2013</h1>
diff --git a/mesalib/docs/relnotes/9.2.html b/mesalib/docs/relnotes/9.2.html
new file mode 100644
index 000000000..0dcc9605d
--- /dev/null
+++ b/mesalib/docs/relnotes/9.2.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Mesa Release Notes</title>
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+ <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 9.2 Release Notes / (date TBD)</h1>
+
+<p>
+Mesa 9.2 is a new development release.
+People who are concerned with stability and reliability should stick
+with a previous release or wait for Mesa 9.2.1.
+</p>
+<p>
+Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.1. OpenGL
+3.1 is <strong>only</strong> available if requested at context creation
+because GL_ARB_compatibility is not supported.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+tbd
+</pre>
+
+
+<h2>New features</h2>
+
+<p>
+Note: some of the new features are only available with certain drivers.
+</p>
+
+<ul>
+<li>GL_ARB_texture_buffer_range</li>
+<li>GL_ARB_texture_multisample</li>
+<li>GL_ARB_texture_storage_multisample</li>
+<li>GL_ARB_texture_query_lod</li>
+<li>Added new freedreno gallium driver</li>
+<li>OSMesa interface for gallium llvmpipe/softpipe drivers</li>
+<li>Gallium Heads-Up Display (HUD) feature for performance monitoring</li>
+</ul>
+
+
+<h2>Bug fixes</h2>
+
+<p>TBD -- This list is likely incomplete.</p>
+
+
+<h2>Changes</h2>
+
+<ul>
+<li>Removed d3d1x state tracker (unused, unmaintained and broken)</li>
+</ul>
+
+</div>
+</body>
+</html>
diff --git a/mesalib/docs/MESA_agp_offset.spec b/mesalib/docs/specs/MESA_agp_offset.spec
index 06e1d902e..06e1d902e 100644
--- a/mesalib/docs/MESA_agp_offset.spec
+++ b/mesalib/docs/specs/MESA_agp_offset.spec
diff --git a/mesalib/docs/MESA_copy_sub_buffer.spec b/mesalib/docs/specs/MESA_copy_sub_buffer.spec
index 752a014b3..752a014b3 100644
--- a/mesalib/docs/MESA_copy_sub_buffer.spec
+++ b/mesalib/docs/specs/MESA_copy_sub_buffer.spec
diff --git a/mesalib/docs/MESA_drm_image.spec b/mesalib/docs/specs/MESA_drm_image.spec
index 1150a4c43..1150a4c43 100644
--- a/mesalib/docs/MESA_drm_image.spec
+++ b/mesalib/docs/specs/MESA_drm_image.spec
diff --git a/mesalib/docs/MESA_multithread_makecurrent.spec b/mesalib/docs/specs/MESA_multithread_makecurrent.spec
index 5065c2fc0..5065c2fc0 100644
--- a/mesalib/docs/MESA_multithread_makecurrent.spec
+++ b/mesalib/docs/specs/MESA_multithread_makecurrent.spec
diff --git a/mesalib/docs/MESA_pack_invert.spec b/mesalib/docs/specs/MESA_pack_invert.spec
index 33fb3c7bf..33fb3c7bf 100644
--- a/mesalib/docs/MESA_pack_invert.spec
+++ b/mesalib/docs/specs/MESA_pack_invert.spec
diff --git a/mesalib/docs/MESA_pixmap_colormap.spec b/mesalib/docs/specs/MESA_pixmap_colormap.spec
index fb0b441cc..fb0b441cc 100644
--- a/mesalib/docs/MESA_pixmap_colormap.spec
+++ b/mesalib/docs/specs/MESA_pixmap_colormap.spec
diff --git a/mesalib/docs/MESA_release_buffers.spec b/mesalib/docs/specs/MESA_release_buffers.spec
index 52d1e5a9c..52d1e5a9c 100644
--- a/mesalib/docs/MESA_release_buffers.spec
+++ b/mesalib/docs/specs/MESA_release_buffers.spec
diff --git a/mesalib/docs/MESA_resize_buffers.spec b/mesalib/docs/specs/MESA_resize_buffers.spec
index dabc7c421..dabc7c421 100644
--- a/mesalib/docs/MESA_resize_buffers.spec
+++ b/mesalib/docs/specs/MESA_resize_buffers.spec
diff --git a/mesalib/docs/MESA_set_3dfx_mode.spec b/mesalib/docs/specs/MESA_set_3dfx_mode.spec
index 06d97ca02..06d97ca02 100644
--- a/mesalib/docs/MESA_set_3dfx_mode.spec
+++ b/mesalib/docs/specs/MESA_set_3dfx_mode.spec
diff --git a/mesalib/docs/MESA_shader_debug.spec b/mesalib/docs/specs/MESA_shader_debug.spec
index fab92abc7..fab92abc7 100644
--- a/mesalib/docs/MESA_shader_debug.spec
+++ b/mesalib/docs/specs/MESA_shader_debug.spec
diff --git a/mesalib/docs/MESA_swap_control.spec b/mesalib/docs/specs/MESA_swap_control.spec
index a002563c9..a002563c9 100644
--- a/mesalib/docs/MESA_swap_control.spec
+++ b/mesalib/docs/specs/MESA_swap_control.spec
diff --git a/mesalib/docs/MESA_swap_frame_usage.spec b/mesalib/docs/specs/MESA_swap_frame_usage.spec
index 5023eadd8..5023eadd8 100644
--- a/mesalib/docs/MESA_swap_frame_usage.spec
+++ b/mesalib/docs/specs/MESA_swap_frame_usage.spec
diff --git a/mesalib/docs/MESA_texture_array.spec b/mesalib/docs/specs/MESA_texture_array.spec
index b146821f7..b146821f7 100644
--- a/mesalib/docs/MESA_texture_array.spec
+++ b/mesalib/docs/specs/MESA_texture_array.spec
diff --git a/mesalib/docs/MESA_texture_signed_rgba.spec b/mesalib/docs/specs/MESA_texture_signed_rgba.spec
index e3a6b59af..e3a6b59af 100644
--- a/mesalib/docs/MESA_texture_signed_rgba.spec
+++ b/mesalib/docs/specs/MESA_texture_signed_rgba.spec
diff --git a/mesalib/docs/MESA_window_pos.spec b/mesalib/docs/specs/MESA_window_pos.spec
index 9e81e9c4d..9e81e9c4d 100644
--- a/mesalib/docs/MESA_window_pos.spec
+++ b/mesalib/docs/specs/MESA_window_pos.spec
diff --git a/mesalib/docs/MESA_ycbcr_texture.spec b/mesalib/docs/specs/MESA_ycbcr_texture.spec
index 6a730e81c..6a730e81c 100644
--- a/mesalib/docs/MESA_ycbcr_texture.spec
+++ b/mesalib/docs/specs/MESA_ycbcr_texture.spec
diff --git a/mesalib/docs/WL_bind_wayland_display.spec b/mesalib/docs/specs/WL_bind_wayland_display.spec
index 02bd6ea21..02bd6ea21 100644
--- a/mesalib/docs/WL_bind_wayland_display.spec
+++ b/mesalib/docs/specs/WL_bind_wayland_display.spec
diff --git a/mesalib/docs/enums.txt b/mesalib/docs/specs/enums.txt
index b37768e20..b37768e20 100644
--- a/mesalib/docs/enums.txt
+++ b/mesalib/docs/specs/enums.txt
diff --git a/mesalib/docs/versions.html b/mesalib/docs/versions.html
index 0047ee0fd..30c1817e1 100644
--- a/mesalib/docs/versions.html
+++ b/mesalib/docs/versions.html
@@ -1403,8 +1403,8 @@ New:
<li>demo of per-pixel lighting with a fragment program (demos/fplight.c)
<li>new version (18) of glext.h header
<li>new spriteblast.c demo of GL_ARB_point_sprite
-<li>faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1)
-<li>faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1)
+<li>faster glDrawPixels in X11 driver in some cases (see relnotes/5.1)
+<li>faster glCopyPixels in X11 driver in some cases (see relnotes/5.1)
</ul>
Bug fixes:
<ul>
diff --git a/mesalib/docs/viewperf.html b/mesalib/docs/viewperf.html
index 3bbe1978a..23c6028d2 100644
--- a/mesalib/docs/viewperf.html
+++ b/mesalib/docs/viewperf.html
@@ -232,6 +232,36 @@ glClear is called so clearing the depth buffer would be a no-op anyway.
</p>
+<h2>Proe-05 test 6</h2>
+
+<p>
+This test draws an engine model with a two-pass algorithm.
+The first pass is drawn with polygon stipple enabled.
+The second pass is drawn without polygon stipple but with blending
+and GL_DEPTH_FUNC=GL_LEQUAL.
+If either of the two passes happen to use a software fallback of some
+sort, the Z values of fragments may be different between the two passes.
+This leads to incorrect rendering.
+</p>
+
+<p>
+For example, the VMware SVGA gallium driver uses a special semi-fallback path
+for drawing with polygon stipple.
+Since the two passes are rendered with different vertex transformation
+implementations, the rendering doesn't appear as expected.
+Setting the SVGA_FORCE_SWTNL environment variable to 1 will force the
+driver to use the software vertex path all the time and clears up this issue.
+</p>
+
+<p>
+According to the OpenGL invariance rules, there's no guarantee that
+the pixels produced by these two rendering states will match.
+To achieve invariance, both passes should enable polygon stipple and
+blending with appropriate patterns/modes to ensure the same fragments
+are produced in both passes.
+</p>
+
+
</div>
</body>
</html>
diff --git a/mesalib/docs/xlibdriver.html b/mesalib/docs/xlibdriver.html
index 6b7b02903..ce1ff3b13 100644
--- a/mesalib/docs/xlibdriver.html
+++ b/mesalib/docs/xlibdriver.html
@@ -221,7 +221,7 @@ See the xdemos/glxpixmap.c file for an example of how to use this
extension.
</p>
<p>
-<a href="MESA_pixmap_colormap.spec">GLX_MESA_pixmap_colormap specification</a>
+<a href="specs/MESA_pixmap_colormap.spec">GLX_MESA_pixmap_colormap specification</a>
</p>
@@ -250,7 +250,7 @@ just before an X window is destroyed. For example:
XDestroyWindow( dpy, window );
</pre>
<p>
-<a href="MESA_release_buffers.spec">GLX_MESA_release_buffers specification</a>
+<a href="specs/MESA_release_buffers.spec">GLX_MESA_release_buffers specification</a>
</p>
<p>
This extension was added in Mesa 2.0.
@@ -263,7 +263,7 @@ like glXSwapBuffers() but only copies a sub-region of the window
instead of the whole window.
</p>
<p>
-<a href="MESA_copy_sub_buffer.spec">GLX_MESA_copy_sub_buffer specification</a>
+<a href="specs/MESA_copy_sub_buffer.spec">GLX_MESA_copy_sub_buffer specification</a>
</p>
<p>
This extension was added in Mesa 2.6
diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h
index b2b5a8038..1d6817838 100644
--- a/mesalib/include/EGL/eglext.h
+++ b/mesalib/include/EGL/eglext.h
@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
-** Copyright (c) 2007-2012 The Khronos Group Inc.
+** Copyright (c) 2007-2013 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -34,8 +34,8 @@ extern "C" {
/* Header file version number */
/* Current version at http://www.khronos.org/registry/egl/ */
-/* $Revision: 19987 $ on $Date: 2012-12-13 16:46:46 -0800 (Thu, 13 Dec 2012) $ */
-#define EGL_EGLEXT_VERSION 14
+/* $Revision: 21254 $ on $Date: 2013-04-25 03:11:55 -0700 (Thu, 25 Apr 2013) $ */
+#define EGL_EGLEXT_VERSION 16
#ifndef EGL_KHR_config_attribs
#define EGL_KHR_config_attribs 1
@@ -532,6 +532,45 @@ typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy,
#define EGL_BUFFER_AGE_EXT 0x313D
#endif
+#ifndef EGL_EXT_image_dma_buf_import
+#define EGL_EXT_image_dma_buf_import 1
+#define EGL_LINUX_DMA_BUF_EXT 0x3270
+#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
+#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
+#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
+#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
+#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
+#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
+#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
+#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
+#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
+#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
+#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
+#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
+#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
+#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
+#define EGL_ITU_REC601_EXT 0x327F
+#define EGL_ITU_REC709_EXT 0x3280
+#define EGL_ITU_REC2020_EXT 0x3281
+#define EGL_YUV_FULL_RANGE_EXT 0x3282
+#define EGL_YUV_NARROW_RANGE_EXT 0x3283
+#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
+#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
+#endif
+
+#ifndef EGL_ARM_pixmap_multisample_discard
+#define EGL_ARM_pixmap_multisample_discard 1
+#define EGL_DISCARD_SAMPLES_ARM 0x3286
+#endif
+
+#ifndef EGL_EXT_swap_buffers_with_damage
+#define EGL_EXT_swap_buffers_with_damage 1
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT( EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#endif
+
#include <EGL/eglmesaext.h>
#ifdef __cplusplus
diff --git a/mesalib/include/GL/gl.h b/mesalib/include/GL/gl.h
index e9dd921fa..975cfe87f 100644
--- a/mesalib/include/GL/gl.h
+++ b/mesalib/include/GL/gl.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/include/GL/glx.h b/mesalib/include/GL/glx.h
index acbd9e2c9..7c8635cc7 100644
--- a/mesalib/include/GL/glx.h
+++ b/mesalib/include/GL/glx.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/include/GL/glx_mangle.h b/mesalib/include/GL/glx_mangle.h
index fa664a7f5..240de495f 100644
--- a/mesalib/include/GL/glx_mangle.h
+++ b/mesalib/include/GL/glx_mangle.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/include/GL/osmesa.h b/mesalib/include/GL/osmesa.h
index 304655e7c..571ef4ada 100644
--- a/mesalib/include/GL/osmesa.h
+++ b/mesalib/include/GL/osmesa.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/scons/crossmingw.py b/mesalib/scons/crossmingw.py
index 23c56c0a2..1287e0ec8 100644
--- a/mesalib/scons/crossmingw.py
+++ b/mesalib/scons/crossmingw.py
@@ -130,40 +130,6 @@ SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
-def compile_without_gstabs(env, sources, c_file):
- '''This is a hack used to compile some source files without the
- -gstabs option.
-
- It seems that some versions of mingw32's gcc (4.4.2 at least) die
- when compiling large files with the -gstabs option. -gstabs is
- related to debug symbols and can be omitted from the effected
- files.
-
- This function compiles the given c_file without -gstabs, removes
- the c_file from the sources list, then appends the new .o file to
- sources. Then return the new sources list.
- '''
-
- # Modify CCFLAGS to not have -gstabs option:
- env2 = env.Clone()
- flags = str(env2['CCFLAGS'])
- flags = flags.replace("-gstabs", "")
- env2['CCFLAGS'] = SCons.Util.CLVar(flags)
-
- # Build the special-case files:
- obj_file = env2.SharedObject(c_file)
-
- # Replace ".cpp" or ".c" with ".o"
- o_file = c_file.replace(".cpp", ".o")
- o_file = o_file.replace(".c", ".o")
-
- # Replace the .c files with the specially-compiled .o file
- sources.remove(c_file)
- sources.append(o_file)
-
- return sources
-
-
def generate(env):
mingw_prefix = find(env)
@@ -221,13 +187,5 @@ def generate(env):
env['LIBPREFIXES'] = [ 'lib', '' ]
env['LIBSUFFIXES'] = [ '.a', '.lib' ]
- # MinGW x86 port of gdb does not handle well dwarf debug info which is the
- # default in recent gcc versions. The x64 port gdb from mingw-w64 seems to
- # handle it fine though, so stick with the default there.
- if env['machine'] != 'x86_64':
- env.AppendUnique(CCFLAGS = ['-gstabs'])
-
- env.AddMethod(compile_without_gstabs, 'compile_without_gstabs')
-
def exists(env):
return find(env)
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index 57b5b418f..2e341e99f 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -152,7 +152,7 @@ def generate(env):
platform = env['platform']
x86 = env['machine'] == 'x86'
ppc = env['machine'] == 'ppc'
- gcc = env['gcc']
+ gcc_compat = env['gcc'] or env['clang']
msvc = env['msvc']
suncc = env['suncc']
icc = env['icc']
@@ -279,7 +279,7 @@ def generate(env):
('_WIN32_WINNT', '0x0601'),
('WINVER', '0x0601'),
]
- if gcc:
+ if gcc_compat:
cppdefines += [('__MSVCRT_VERSION__', '0x0700')]
if msvc:
cppdefines += [
@@ -309,19 +309,20 @@ def generate(env):
cflags = [] # C
cxxflags = [] # C++
ccflags = [] # C & C++
- if gcc:
+ if gcc_compat:
ccversion = env['CCVERSION']
if env['build'] == 'debug':
ccflags += ['-O0']
- elif ccversion.startswith('4.2.'):
+ elif env['gcc'] and ccversion.startswith('4.2.'):
# gcc 4.2.x optimizer is broken
print "warning: gcc 4.2.x optimizer is broken -- disabling optimizations"
ccflags += ['-O0']
else:
ccflags += ['-O3']
- # gcc's builtin memcmp is slower than glibc's
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
- ccflags += ['-fno-builtin-memcmp']
+ if env['gcc']:
+ # gcc's builtin memcmp is slower than glibc's
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+ ccflags += ['-fno-builtin-memcmp']
# Work around aliasing bugs - developers should comment this out
ccflags += ['-fno-strict-aliasing']
ccflags += ['-g']
@@ -329,8 +330,9 @@ def generate(env):
# See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling?
ccflags += [
'-fno-omit-frame-pointer',
- '-fno-optimize-sibling-calls',
]
+ if env['gcc']:
+ ccflags += ['-fno-optimize-sibling-calls']
if env['machine'] == 'x86':
ccflags += [
'-m32',
@@ -448,7 +450,7 @@ def generate(env):
env.Append(SHCCFLAGS = ['/LD'])
# Assembler options
- if gcc:
+ if gcc_compat:
if env['machine'] == 'x86':
env.Append(ASFLAGS = ['-m32'])
if env['machine'] == 'x86_64':
@@ -457,7 +459,7 @@ def generate(env):
# Linker options
linkflags = []
shlinkflags = []
- if gcc:
+ if gcc_compat:
if env['machine'] == 'x86':
linkflags += ['-m32']
if env['machine'] == 'x86_64':
@@ -495,7 +497,7 @@ def generate(env):
env.Append(SHLINKFLAGS = shlinkflags)
# We have C++ in several libraries, so always link with the C++ compiler
- if env['gcc'] or env['clang']:
+ if gcc_compat:
env['LINK'] = env['CXX']
# Default libs
@@ -533,7 +535,6 @@ def generate(env):
env.PkgCheckModules('XF86VIDMODE', ['xxf86vm'])
env.PkgCheckModules('DRM', ['libdrm >= 2.4.24'])
env.PkgCheckModules('DRM_INTEL', ['libdrm_intel >= 2.4.30'])
- env.PkgCheckModules('DRM_RADEON', ['libdrm_radeon >= 2.4.42'])
env.PkgCheckModules('XORG', ['xorg-server >= 1.6.0'])
env.PkgCheckModules('KMS', ['libkms >= 2.4.24'])
env.PkgCheckModules('UDEV', ['libudev > 150'])
diff --git a/mesalib/src/Makefile.am b/mesalib/src/Makefile.am
index d6a7946ef..b3dc44d6f 100644
--- a/mesalib/src/Makefile.am
+++ b/mesalib/src/Makefile.am
@@ -1,4 +1,53 @@
-SUBDIRS=$(SRC_DIRS)
+# Copyright © 2013 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.
-all-local:
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR)
+SUBDIRS = gtest mapi
+
+if NEED_OPENGL_COMMON
+SUBDIRS += glsl mesa
+endif
+
+if HAVE_DRI_GLX
+SUBDIRS += glx
+endif
+
+if HAVE_GBM
+SUBDIRS += gbm
+endif
+
+if HAVE_EGL
+SUBDIRS += egl
+endif
+
+if HAVE_GALLIUM
+SUBDIRS += \
+ gallium/auxiliary \
+ gallium/drivers \
+ gallium/state_trackers \
+ gallium/winsys \
+ gallium/targets
+
+if HAVE_GALLIUM_TESTS
+SUBDIRS += \
+ gallium/tests/trivial \
+ gallium/tests/unit
+endif
+endif
diff --git a/mesalib/src/gallium/Android.mk b/mesalib/src/gallium/Android.mk
index 1d002d053..4e5acc86f 100644
--- a/mesalib/src/gallium/Android.mk
+++ b/mesalib/src/gallium/Android.mk
@@ -39,6 +39,11 @@ ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
SUBDIRS += winsys/i915/drm drivers/i915
endif
+# ilo
+ifneq ($(filter ilo, $(MESA_GPU_DRIVERS)),)
+SUBDIRS += winsys/intel/drm drivers/ilo
+endif
+
# nouveau
ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
SUBDIRS += \
diff --git a/mesalib/src/gallium/SConscript b/mesalib/src/gallium/SConscript
index f281f4c65..ca75f37f9 100644
--- a/mesalib/src/gallium/SConscript
+++ b/mesalib/src/gallium/SConscript
@@ -27,28 +27,6 @@ if not env['msvc']:
'drivers/i915/SConscript',
])
-if env['drm']:
- # These drivers depend on drm headers
- if env['drm_radeon']:
- SConscript([
- 'drivers/r300/SConscript',
- 'drivers/r600/SConscript',
- ])
- if env['llvm']:
- SConscript([
- 'drivers/radeonsi/SConscript',
- ])
- # XXX: nouveau drivers have a tight dependency on libdrm, so to enable
- # we need some version logic before we enable them. Also, ATM there is
- # no nouveau target in scons
- # if env['drm_nouveau']:
- # SConscript([
- # 'drivers/nouveau/SConscript',
- # 'drivers/nv50/SConscript',
- # 'drivers/nvc0/SConscript',
- # 'drivers/nvfx/SConscript',
- # ])
-
#
# State trackers
#
@@ -96,6 +74,11 @@ if not env['msvc']:
'winsys/i915/sw/SConscript',
])
+if env['platform'] == 'haiku':
+ SConscript([
+ 'winsys/sw/hgl/SConscript',
+ ])
+
if env['dri']:
SConscript([
'winsys/sw/dri/SConscript',
@@ -110,11 +93,6 @@ if env['dri']:
'winsys/i915/drm/SConscript',
])
- if env['drm_radeon']:
- SConscript([
- 'winsys/radeon/drm/SConscript',
- ])
-
#
# Targets
#
@@ -141,32 +119,25 @@ if not env['embedded']:
'targets/libgl-gdi/SConscript',
])
+ if env['platform'] == 'haiku':
+ SConscript([
+ 'targets/haiku-softpipe/SConscript',
+ ])
+
if env['dri']:
SConscript([
'targets/SConscript.dri',
'targets/dri-swrast/SConscript',
'targets/dri-vmwgfx/SConscript',
- #'targets/dri-nouveau/SConscript',
])
if env['drm_intel']:
SConscript([
'targets/dri-i915/SConscript',
])
- if env['drm_radeon']:
- SConscript([
- 'targets/dri-r300/SConscript',
- 'targets/dri-r600/SConscript',
- ])
- if env['llvm']:
- SConscript([
- 'targets/dri-radeonsi/SConscript',
- ])
if env['xorg'] and env['drm']:
SConscript([
#'targets/xorg-i915/SConscript',
- #'targets/xorg-nouveau/SConscript',
- #'targets/xorg-radeon/SConscript',
])
diff --git a/mesalib/src/gallium/auxiliary/Makefile.sources b/mesalib/src/gallium/auxiliary/Makefile.sources
index 79def2177..20ff5ba73 100644
--- a/mesalib/src/gallium/auxiliary/Makefile.sources
+++ b/mesalib/src/gallium/auxiliary/Makefile.sources
@@ -23,6 +23,7 @@ C_SOURCES := \
draw/draw_pipe_vbuf.c \
draw/draw_pipe_wide_line.c \
draw/draw_pipe_wide_point.c \
+ draw/draw_prim_assembler.c \
draw/draw_pt.c \
draw/draw_pt_emit.c \
draw/draw_pt_fetch.c \
diff --git a/mesalib/src/gallium/auxiliary/SConscript b/mesalib/src/gallium/auxiliary/SConscript
index bfd5ec34c..31dfed316 100644
--- a/mesalib/src/gallium/auxiliary/SConscript
+++ b/mesalib/src/gallium/auxiliary/SConscript
@@ -51,10 +51,6 @@ if env['llvm']:
'GALLIVM_CPP_SOURCES'
])
- if env['toolchain'] == 'crossmingw':
- # compile lp_bld_misc.cpp without -gstabs option
- source = env.compile_without_gstabs(source, "gallivm/lp_bld_misc.cpp")
-
gallium = env.ConvenienceLibrary(
target = 'gallium',
source = source,
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_context.c b/mesalib/src/gallium/auxiliary/hud/hud_context.c
index 983f05756..de032b6ba 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_context.c
+++ b/mesalib/src/gallium/auxiliary/hud/hud_context.c
@@ -90,10 +90,6 @@ struct hud_context {
unsigned max_num_vertices;
unsigned num_vertices;
} text, bg, whitelines;
-
- struct {
- boolean query_pipeline_statistics;
- } cap;
};
@@ -467,7 +463,7 @@ hud_draw(struct hud_context *hud, struct pipe_resource *tex)
cso_set_constant_buffer(cso, PIPE_SHADER_VERTEX, 0, &hud->constbuf);
/* prepare vertex buffers */
- hud_alloc_vertices(hud, &hud->bg, 4 * 64, 2 * sizeof(float));
+ hud_alloc_vertices(hud, &hud->bg, 4 * 128, 2 * sizeof(float));
hud_alloc_vertices(hud, &hud->whitelines, 4 * 256, 2 * sizeof(float));
hud_alloc_vertices(hud, &hud->text, 4 * 512, 4 * sizeof(float));
@@ -695,6 +691,12 @@ has_streamout(struct pipe_screen *screen)
return screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0;
}
+static boolean
+has_pipeline_stats_query(struct pipe_screen *screen)
+{
+ return screen->get_param(screen, PIPE_CAP_QUERY_PIPELINE_STATISTICS) != 0;
+}
+
static void
hud_parse_env_var(struct hud_context *hud, const char *env)
{
@@ -728,7 +730,8 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
return;
}
- /* add a graph */
+ /* Add a graph. */
+ /* IF YOU CHANGE THIS, UPDATE print_help! */
if (strcmp(name, "fps") == 0) {
hud_fps_graph_install(pane);
}
@@ -748,8 +751,11 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
hud_pipe_query_install(pane, hud->pipe, "primitives-generated",
PIPE_QUERY_PRIMITIVES_GENERATED, 0, 0, FALSE);
}
- else if (strncmp(name, "pipeline-statistics-", 20) == 0) {
- if (hud->cap.query_pipeline_statistics) {
+ else {
+ boolean processed = FALSE;
+
+ /* pipeline statistics queries */
+ if (has_pipeline_stats_query(hud->pipe->screen)) {
static const char *pipeline_statistics_names[] =
{
"ia-vertices",
@@ -765,22 +771,21 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
"cs-invocations"
};
for (i = 0; i < Elements(pipeline_statistics_names); ++i)
- if (strcmp(&name[20], pipeline_statistics_names[i]) == 0)
+ if (strcmp(name, pipeline_statistics_names[i]) == 0)
break;
- if (i < Elements(pipeline_statistics_names))
- hud_pipe_query_install(pane, hud->pipe, &name[20],
+ if (i < Elements(pipeline_statistics_names)) {
+ hud_pipe_query_install(pane, hud->pipe, name,
PIPE_QUERY_PIPELINE_STATISTICS, i,
0, FALSE);
- else
- fprintf(stderr, "gallium_hud: invalid pipeline-statistics-*\n");
- } else {
- fprintf(stderr, "gallium_hud: PIPE_QUERY_PIPELINE_STATISTICS "
- "not supported by the driver\n");
+ processed = TRUE;
+ }
}
- }
- else {
- if (!hud_driver_query_install(pane, hud->pipe, name)){
- fprintf(stderr, "gallium_hud: unknown driver query '%s'\n", name);
+
+ /* driver queries */
+ if (!processed) {
+ if (!hud_driver_query_install(pane, hud->pipe, name)){
+ fprintf(stderr, "gallium_hud: unknown driver query '%s'\n", name);
+ }
}
}
@@ -877,10 +882,24 @@ print_help(struct pipe_screen *screen)
printf(" cpu%i\n", i);
if (has_occlusion_query(screen))
- puts(" pixels-rendered");
+ puts(" samples-passed");
if (has_streamout(screen))
puts(" primitives-generated");
+ if (has_pipeline_stats_query(screen)) {
+ puts(" ia-vertices");
+ puts(" ia-primitives");
+ puts(" vs-invocations");
+ puts(" gs-invocations");
+ puts(" gs-primitives");
+ puts(" clipper-invocations");
+ puts(" clipper-primitives-generated");
+ puts(" ps-invocations");
+ puts(" hs-invocations");
+ puts(" ds-invocations");
+ puts(" cs-invocations");
+ }
+
if (screen->get_driver_query_info){
struct pipe_driver_query_info info;
num_queries = screen->get_driver_query_info(screen, 0, NULL);
@@ -971,7 +990,8 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
}
/* rasterizer */
- hud->rasterizer.gl_rasterization_rules = 1;
+ hud->rasterizer.half_pixel_center = 1;
+ hud->rasterizer.bottom_edge_rule = 1;
hud->rasterizer.depth_clip = 1;
hud->rasterizer.line_width = 1;
hud->rasterizer.line_last_pixel = 1;
@@ -1045,9 +1065,6 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
LIST_INITHEAD(&hud->pane_list);
- hud->cap.query_pipeline_statistics =
- pipe->screen->get_param(pipe->screen, PIPE_CAP_QUERY_PIPELINE_STATISTICS);
-
hud_parse_env_var(hud, env);
return hud;
}
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_fps.c b/mesalib/src/gallium/auxiliary/hud/hud_fps.c
index 71cdfd04e..80381f547 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_fps.c
+++ b/mesalib/src/gallium/auxiliary/hud/hud_fps.c
@@ -47,7 +47,8 @@ query_fps(struct hud_graph *gr)
if (info->last_time) {
if (info->last_time + gr->pane->period <= now) {
- double fps = info->frames * 1000000 / (double)(now - info->last_time);
+ double fps = (uint64_t)info->frames * 1000000 /
+ (double)(now - info->last_time);
info->frames = 0;
info->last_time = now;
diff --git a/mesalib/src/gallium/auxiliary/util/u_blit.c b/mesalib/src/gallium/auxiliary/util/u_blit.c
index 9fe15b810..cda66d157 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blit.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blit.c
@@ -118,7 +118,8 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
/* rasterizer */
ctx->rasterizer.cull_face = PIPE_FACE_NONE;
- ctx->rasterizer.gl_rasterization_rules = 1;
+ ctx->rasterizer.half_pixel_center = 1;
+ ctx->rasterizer.bottom_edge_rule = 1;
ctx->rasterizer.depth_clip = 1;
/* samplers */
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c
index 2a4a13e9f..8c871fdf9 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c
@@ -100,7 +100,7 @@ struct blitter_context_priv
void *velem_state;
void *velem_uint_state;
void *velem_sint_state;
- void *velem_state_readbuf;
+ void *velem_state_readbuf[4]; /**< X, XY, XYZ, XYZW */
/* Sampler state. */
void *sampler_state;
@@ -239,7 +239,8 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
/* rasterizer state */
memset(&rs_state, 0, sizeof(rs_state));
rs_state.cull_face = PIPE_FACE_NONE;
- rs_state.gl_rasterization_rules = 1;
+ rs_state.half_pixel_center = 1;
+ rs_state.bottom_edge_rule = 1;
rs_state.flatshade = 1;
rs_state.depth_clip = 1;
ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state);
@@ -285,9 +286,19 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
}
if (ctx->has_stream_out) {
- velem[0].src_format = PIPE_FORMAT_R32_UINT;
- velem[0].vertex_buffer_index = ctx->base.vb_slot;
- ctx->velem_state_readbuf = pipe->create_vertex_elements_state(pipe, 1, &velem[0]);
+ static enum pipe_format formats[4] = {
+ PIPE_FORMAT_R32_UINT,
+ PIPE_FORMAT_R32G32_UINT,
+ PIPE_FORMAT_R32G32B32_UINT,
+ PIPE_FORMAT_R32G32B32A32_UINT
+ };
+
+ for (i = 0; i < 4; i++) {
+ velem[0].src_format = formats[i];
+ velem[0].vertex_buffer_index = ctx->base.vb_slot;
+ ctx->velem_state_readbuf[i] =
+ pipe->create_vertex_elements_state(pipe, 1, &velem[0]);
+ }
}
/* fragment shaders are created on-demand */
@@ -352,8 +363,11 @@ void util_blitter_destroy(struct blitter_context *blitter)
pipe->delete_vertex_elements_state(pipe, ctx->velem_sint_state);
pipe->delete_vertex_elements_state(pipe, ctx->velem_uint_state);
}
- if (ctx->velem_state_readbuf)
- pipe->delete_vertex_elements_state(pipe, ctx->velem_state_readbuf);
+ for (i = 0; i < 4; i++) {
+ if (ctx->velem_state_readbuf[i]) {
+ pipe->delete_vertex_elements_state(pipe, ctx->velem_state_readbuf[i]);
+ }
+ }
for (i = 0; i < PIPE_MAX_TEXTURE_TYPES; i++) {
if (ctx->fs_texfetch_col[i])
@@ -490,7 +504,7 @@ static void blitter_restore_fragment_states(struct blitter_context_priv *ctx)
/* XXX check whether these are saved and whether they need to be restored
* (depending on the operation) */
pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref);
- pipe->set_viewport_state(pipe, &ctx->base.saved_viewport);
+ pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport);
}
static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx)
@@ -585,7 +599,7 @@ static void blitter_set_rectangle(struct blitter_context_priv *ctx,
ctx->viewport.translate[1] = 0.5f * ctx->dst_height;
ctx->viewport.translate[2] = 0.0f;
ctx->viewport.translate[3] = 0.0f;
- ctx->base.pipe->set_viewport_state(ctx->base.pipe, &ctx->viewport);
+ ctx->base.pipe->set_viewport_states(ctx->base.pipe, 0, 1, &ctx->viewport);
}
static void blitter_set_clear_color(struct blitter_context_priv *ctx,
@@ -1387,7 +1401,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
if (scissor) {
- pipe->set_scissor_state(pipe, scissor);
+ pipe->set_scissor_states(pipe, 0, 1, scissor);
}
blitter_set_common_draw_rect_state(ctx, scissor != NULL);
@@ -1482,7 +1496,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
blitter_restore_textures(ctx);
blitter_restore_fb_state(ctx);
if (scissor) {
- pipe->set_scissor_state(pipe, &ctx->base.saved_scissor);
+ pipe->set_scissor_states(pipe, 0, 1, &ctx->base.saved_scissor);
}
blitter_restore_render_cond(ctx);
blitter_unset_running_flag(ctx);
@@ -1739,7 +1753,7 @@ void util_blitter_copy_buffer(struct blitter_context *blitter,
vb.stride = 4;
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
- pipe->bind_vertex_elements_state(pipe, ctx->velem_state_readbuf);
+ pipe->bind_vertex_elements_state(pipe, ctx->velem_state_readbuf[0]);
pipe->bind_vs_state(pipe, ctx->vs_pos_only);
if (ctx->has_geometry_shader)
pipe->bind_gs_state(pipe, NULL);
@@ -1756,6 +1770,66 @@ void util_blitter_copy_buffer(struct blitter_context *blitter,
pipe_so_target_reference(&so_target, NULL);
}
+void util_blitter_clear_buffer(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned offset, unsigned size,
+ unsigned num_channels,
+ const union pipe_color_union *clear_value)
+{
+ struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
+ struct pipe_context *pipe = ctx->base.pipe;
+ struct pipe_vertex_buffer vb = {0};
+ struct pipe_stream_output_target *so_target;
+
+ assert(num_channels >= 1);
+ assert(num_channels <= 4);
+
+ /* IMPORTANT: DON'T DO ANY BOUNDS CHECKING HERE!
+ *
+ * R600 uses this to initialize texture resources, so width0 might not be
+ * what you think it is.
+ */
+
+ /* Streamout is required. */
+ if (!ctx->has_stream_out) {
+ assert(!"Streamout unsupported in util_blitter_clear_buffer()");
+ return;
+ }
+
+ /* Some alignment is required. */
+ if (offset % 4 != 0 || size % 4 != 0) {
+ assert(!"Bad alignment in util_blitter_clear_buffer()");
+ return;
+ }
+
+ u_upload_data(ctx->upload, 0, num_channels*4, clear_value,
+ &vb.buffer_offset, &vb.buffer);
+ vb.stride = 0;
+
+ blitter_set_running_flag(ctx);
+ blitter_check_saved_vertex_states(ctx);
+ blitter_disable_render_cond(ctx);
+
+ pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
+ pipe->bind_vertex_elements_state(pipe,
+ ctx->velem_state_readbuf[num_channels-1]);
+ pipe->bind_vs_state(pipe, ctx->vs_pos_only);
+ if (ctx->has_geometry_shader)
+ pipe->bind_gs_state(pipe, NULL);
+ pipe->bind_rasterizer_state(pipe, ctx->rs_discard_state);
+
+ so_target = pipe->create_stream_output_target(pipe, dst, offset, size);
+ pipe->set_stream_output_targets(pipe, 1, &so_target, 0);
+
+ util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 4);
+
+ blitter_restore_vertex_states(ctx);
+ blitter_restore_render_cond(ctx);
+ blitter_unset_running_flag(ctx);
+ pipe_so_target_reference(&so_target, NULL);
+ pipe_resource_reference(&vb.buffer, NULL);
+}
+
/* probably radeon specific */
void util_blitter_custom_resolve_color(struct blitter_context *blitter,
struct pipe_resource *dst,
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h
index 20e69ed5b..19015844e 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.h
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h
@@ -276,7 +276,7 @@ void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ,
/**
* Copy data from one buffer to another using the Stream Output functionality.
- * Some alignment is required, otherwise software fallback is used.
+ * 4-byte alignment is required, otherwise software fallback is used.
*/
void util_blitter_copy_buffer(struct blitter_context *blitter,
struct pipe_resource *dst,
@@ -286,6 +286,22 @@ void util_blitter_copy_buffer(struct blitter_context *blitter,
unsigned size);
/**
+ * Clear the contents of a buffer using the Stream Output functionality.
+ * 4-byte alignment is required.
+ *
+ * "num_channels" can be 1, 2, 3, or 4, and specifies if the clear value is
+ * R, RG, RGB, or RGBA.
+ *
+ * For each element, only "num_channels" components of "clear_value" are
+ * copied to the buffer, then the offset is incremented by num_channels*4.
+ */
+void util_blitter_clear_buffer(struct blitter_context *blitter,
+ struct pipe_resource *dst,
+ unsigned offset, unsigned size,
+ unsigned num_channels,
+ const union pipe_color_union *clear_value);
+
+/**
* Clear a region of a (color) surface to a constant value.
*
* These states must be saved in the blitter in addition to the state objects
diff --git a/mesalib/src/gallium/auxiliary/util/u_debug_symbol.c b/mesalib/src/gallium/auxiliary/util/u_debug_symbol.c
index 3d2f8ebc3..0ef111c3b 100644
--- a/mesalib/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/mesalib/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -151,10 +151,8 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
}
#endif
-#ifdef __GLIBC__
-#ifndef __UCLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
#include <execinfo.h>
-#endif
/* This can only provide dynamic symbols, or binary offsets into a file.
*
@@ -179,7 +177,7 @@ debug_symbol_name(const void *addr, char* buf, unsigned size)
return;
#endif
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
debug_symbol_name_glibc(addr, buf, size);
if(buf[0])
return;
diff --git a/mesalib/src/gallium/auxiliary/util/u_dump_state.c b/mesalib/src/gallium/auxiliary/util/u_dump_state.c
index 2f28f3c84..12f1d2d6e 100644
--- a/mesalib/src/gallium/auxiliary/util/u_dump_state.c
+++ b/mesalib/src/gallium/auxiliary/util/u_dump_state.c
@@ -327,7 +327,8 @@ util_dump_rasterizer_state(FILE *stream, const struct pipe_rasterizer_state *sta
util_dump_member(stream, uint, state, line_stipple_pattern);
util_dump_member(stream, bool, state, line_last_pixel);
util_dump_member(stream, bool, state, flatshade_first);
- util_dump_member(stream, bool, state, gl_rasterization_rules);
+ util_dump_member(stream, bool, state, half_pixel_center);
+ util_dump_member(stream, bool, state, bottom_edge_rule);
util_dump_member(stream, bool, state, rasterizer_discard);
util_dump_member(stream, bool, state, depth_clip);
util_dump_member(stream, uint, state, clip_plane_enable);
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.c b/mesalib/src/gallium/auxiliary/util/u_format.c
index 18456371c..9bdc2eabf 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format.c
@@ -632,6 +632,40 @@ void util_format_compose_swizzles(const unsigned char swz1[4],
}
}
+void util_format_apply_color_swizzle(union pipe_color_union *dst,
+ const union pipe_color_union *src,
+ const unsigned char swz[4],
+ const boolean is_integer)
+{
+ unsigned c;
+
+ if (is_integer) {
+ for (c = 0; c < 4; ++c) {
+ switch (swz[c]) {
+ case PIPE_SWIZZLE_RED: dst->ui[c] = src->ui[0]; break;
+ case PIPE_SWIZZLE_GREEN: dst->ui[c] = src->ui[1]; break;
+ case PIPE_SWIZZLE_BLUE: dst->ui[c] = src->ui[2]; break;
+ case PIPE_SWIZZLE_ALPHA: dst->ui[c] = src->ui[3]; break;
+ default:
+ dst->ui[c] = (swz[c] == PIPE_SWIZZLE_ONE) ? 1 : 0;
+ break;
+ }
+ }
+ } else {
+ for (c = 0; c < 4; ++c) {
+ switch (swz[c]) {
+ case PIPE_SWIZZLE_RED: dst->f[c] = src->f[0]; break;
+ case PIPE_SWIZZLE_GREEN: dst->f[c] = src->f[1]; break;
+ case PIPE_SWIZZLE_BLUE: dst->f[c] = src->f[2]; break;
+ case PIPE_SWIZZLE_ALPHA: dst->f[c] = src->f[3]; break;
+ default:
+ dst->f[c] = (swz[c] == PIPE_SWIZZLE_ONE) ? 1.0f : 0.0f;
+ break;
+ }
+ }
+ }
+}
+
void util_format_swizzle_4f(float *dst, const float *src,
const unsigned char swz[4])
{
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h
index ed942fb16..e4b9c365c 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.h
+++ b/mesalib/src/gallium/auxiliary/util/u_format.h
@@ -33,6 +33,9 @@
#include "pipe/p_format.h"
#include "util/u_debug.h"
+union pipe_color_union;
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -1117,6 +1120,15 @@ void util_format_compose_swizzles(const unsigned char swz1[4],
const unsigned char swz2[4],
unsigned char dst[4]);
+/* Apply the swizzle provided in \param swz (which is one of PIPE_SWIZZLE_x)
+ * to \param src and store the result in \param dst.
+ * \param is_integer determines the value written for PIPE_SWIZZLE_ONE.
+ */
+void util_format_apply_color_swizzle(union pipe_color_union *dst,
+ const union pipe_color_union *src,
+ const unsigned char swz[4],
+ const boolean is_integer);
+
void util_format_swizzle_4f(float *dst, const float *src,
const unsigned char swz[4]);
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_latc.c b/mesalib/src/gallium/auxiliary/util/u_format_latc.c
index 20feb241e..caab7e87a 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_latc.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_latc.c
@@ -15,9 +15,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_rgtc.c b/mesalib/src/gallium/auxiliary/util/u_format_rgtc.c
index ff04e37b5..758e33774 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_rgtc.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_rgtc.c
@@ -15,9 +15,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_s3tc.c b/mesalib/src/gallium/auxiliary/util/u_format_s3tc.c
index 4a9dc2237..35e3d3445 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_s3tc.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_s3tc.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
diff --git a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
index e1f18f39c..7974b1d76 100644
--- a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -1271,7 +1271,8 @@ util_create_gen_mipmap(struct pipe_context *pipe,
/* rasterizer */
memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer));
ctx->rasterizer.cull_face = PIPE_FACE_NONE;
- ctx->rasterizer.gl_rasterization_rules = 1;
+ ctx->rasterizer.half_pixel_center = 1;
+ ctx->rasterizer.bottom_edge_rule = 1;
ctx->rasterizer.depth_clip = 1;
/* sampler state */
diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h
index 7770cd514..6e65ee6c9 100644
--- a/mesalib/src/gallium/auxiliary/util/u_inlines.h
+++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h
@@ -485,8 +485,7 @@ util_get_min_point_size(const struct pipe_rasterizer_state *state)
{
/* The point size should be clamped to this value at the rasterizer stage.
*/
- return state->gl_rasterization_rules &&
- !state->point_quad_rasterization &&
+ return !state->point_quad_rasterization &&
!state->point_smooth &&
!state->multisample ? 1.0f : 0.0f;
}
diff --git a/mesalib/src/gallium/auxiliary/util/u_prim.h b/mesalib/src/gallium/auxiliary/util/u_prim.h
index d62c636f2..8f444a305 100644
--- a/mesalib/src/gallium/auxiliary/util/u_prim.h
+++ b/mesalib/src/gallium/auxiliary/util/u_prim.h
@@ -26,8 +26,8 @@
**************************************************************************/
-#ifndef U_BLIT_H
-#define U_BLIT_H
+#ifndef U_PRIM_H
+#define U_PRIM_H
#include "pipe/p_defines.h"
@@ -37,95 +37,125 @@
extern "C" {
#endif
-static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
-{
- boolean ok = TRUE;
+struct u_prim_vertex_count {
+ int min;
+ int incr;
+};
- switch (pipe_prim) {
- case PIPE_PRIM_POINTS:
- ok = (nr >= 1);
- break;
- case PIPE_PRIM_LINES:
- ok = (nr >= 2);
- break;
- case PIPE_PRIM_LINE_STRIP:
+/**
+ * Decompose a primitive that is a loop, a strip, or a fan. Return the
+ * original primitive if it is already decomposed.
+ */
+static INLINE unsigned
+u_decomposed_prim(unsigned prim)
+{
+ switch (prim) {
case PIPE_PRIM_LINE_LOOP:
- ok = (nr >= 2);
- break;
- case PIPE_PRIM_TRIANGLES:
- ok = (nr >= 3);
- break;
+ case PIPE_PRIM_LINE_STRIP:
+ return PIPE_PRIM_LINES;
case PIPE_PRIM_TRIANGLE_STRIP:
case PIPE_PRIM_TRIANGLE_FAN:
- case PIPE_PRIM_POLYGON:
- ok = (nr >= 3);
- break;
- case PIPE_PRIM_QUADS:
- ok = (nr >= 4);
- break;
+ return PIPE_PRIM_TRIANGLES;
case PIPE_PRIM_QUAD_STRIP:
- ok = (nr >= 4);
- break;
+ return PIPE_PRIM_QUADS;
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return PIPE_PRIM_LINES_ADJACENCY;
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
+ return PIPE_PRIM_TRIANGLES_ADJACENCY;
default:
- ok = 0;
- break;
+ return prim;
}
+}
- return ok;
+/**
+ * Reduce a primitive to one of PIPE_PRIM_POINTS, PIPE_PRIM_LINES, and
+ * PIPE_PRIM_TRIANGLES.
+ */
+static INLINE unsigned
+u_reduced_prim(unsigned prim)
+{
+ switch (prim) {
+ case PIPE_PRIM_POINTS:
+ return PIPE_PRIM_POINTS;
+ case PIPE_PRIM_LINES:
+ case PIPE_PRIM_LINE_LOOP:
+ case PIPE_PRIM_LINE_STRIP:
+ case PIPE_PRIM_LINES_ADJACENCY:
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return PIPE_PRIM_LINES;
+ default:
+ return PIPE_PRIM_TRIANGLES;
+ }
}
+/**
+ * Re-assemble a primitive to remove its adjacency.
+ */
+static INLINE unsigned
+u_assembled_prim(unsigned prim)
+{
+ switch (prim) {
+ case PIPE_PRIM_LINES_ADJACENCY:
+ case PIPE_PRIM_LINE_STRIP_ADJACENCY:
+ return PIPE_PRIM_LINES;
+ case PIPE_PRIM_TRIANGLES_ADJACENCY:
+ case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
+ return PIPE_PRIM_TRIANGLES;
+ default:
+ return prim;
+ }
+}
-static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
+/**
+ * Return the vertex count information for a primitive.
+ *
+ * Note that if this function is called directly or indirectly anywhere in a
+ * source file, it will increase the size of the binary slightly more than
+ * expected because of the use of a table.
+ */
+static INLINE const struct u_prim_vertex_count *
+u_prim_vertex_count(unsigned prim)
{
- boolean ok = TRUE;
- const static unsigned values[][2] = {
- { 1, 0 }, /* PIPE_PRIM_POINTS */
+ static const struct u_prim_vertex_count prim_table[PIPE_PRIM_MAX] = {
+ { 1, 1 }, /* PIPE_PRIM_POINTS */
{ 2, 2 }, /* PIPE_PRIM_LINES */
- { 2, 0 }, /* PIPE_PRIM_LINE_LOOP */
- { 2, 0 }, /* PIPE_PRIM_LINE_STRIP */
+ { 2, 1 }, /* PIPE_PRIM_LINE_LOOP */
+ { 2, 1 }, /* PIPE_PRIM_LINE_STRIP */
{ 3, 3 }, /* PIPE_PRIM_TRIANGLES */
- { 3, 0 }, /* PIPE_PRIM_TRIANGLE_STRIP */
- { 3, 0 }, /* PIPE_PRIM_TRIANGLE_FAN */
- { 4, 4 }, /* PIPE_PRIM_TRIANGLE_QUADS */
- { 4, 2 }, /* PIPE_PRIM_TRIANGLE_QUAD_STRIP */
- { 3, 0 }, /* PIPE_PRIM_TRIANGLE_POLYGON */
+ { 3, 1 }, /* PIPE_PRIM_TRIANGLE_STRIP */
+ { 3, 1 }, /* PIPE_PRIM_TRIANGLE_FAN */
+ { 4, 4 }, /* PIPE_PRIM_QUADS */
+ { 4, 2 }, /* PIPE_PRIM_QUAD_STRIP */
+ { 3, 1 }, /* PIPE_PRIM_POLYGON */
{ 4, 4 }, /* PIPE_PRIM_LINES_ADJACENCY */
- { 4, 0 }, /* PIPE_PRIM_LINE_STRIP_ADJACENCY */
- { 6, 5 }, /* PIPE_PRIM_TRIANGLES_ADJACENCY */
- { 4, 0 }, /* PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY */
+ { 4, 1 }, /* PIPE_PRIM_LINE_STRIP_ADJACENCY */
+ { 6, 6 }, /* PIPE_PRIM_TRIANGLES_ADJACENCY */
+ { 6, 2 }, /* PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY */
};
- if (unlikely(pipe_prim >= PIPE_PRIM_MAX)) {
- *nr = 0;
- return FALSE;
- }
-
- ok = (*nr >= values[pipe_prim][0]);
- if (values[pipe_prim][1])
- *nr -= (*nr % values[pipe_prim][1]);
+ return (likely(prim < PIPE_PRIM_MAX)) ? &prim_table[prim] : NULL;
+}
- if (!ok)
- *nr = 0;
+static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr )
+{
+ const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
- return ok;
+ return (count && nr >= count->min);
}
-static INLINE unsigned u_reduced_prim( unsigned pipe_prim )
+static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
{
- switch (pipe_prim) {
- case PIPE_PRIM_POINTS:
- return PIPE_PRIM_POINTS;
+ const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim);
- case PIPE_PRIM_LINES:
- case PIPE_PRIM_LINES_ADJACENCY:
- case PIPE_PRIM_LINE_STRIP:
- case PIPE_PRIM_LINE_STRIP_ADJACENCY:
- case PIPE_PRIM_LINE_LOOP:
- return PIPE_PRIM_LINES;
-
- default:
- return PIPE_PRIM_TRIANGLES;
+ if (count && *nr >= count->min) {
+ if (count->incr > 1)
+ *nr -= (*nr % count->incr);
+ return TRUE;
+ }
+ else {
+ *nr = 0;
+ return FALSE;
}
}
@@ -165,46 +195,71 @@ u_vertices_per_prim(int primitive)
/**
* Returns the number of decomposed primitives for the given
* vertex count.
- * Geometry shader is invoked once for each triangle in
+ * Parts of the pipline are invoked once for each triangle in
* triangle strip, triangle fans and triangles and once
- * for each line in line strip, line loop, lines.
+ * for each line in line strip, line loop, lines. Also
+ * statistics depend on knowing the exact number of decomposed
+ * primitives for a set of vertices.
*/
static INLINE unsigned
-u_gs_prims_for_vertices(int primitive, int vertices)
+u_decomposed_prims_for_vertices(int primitive, int vertices)
{
- switch(primitive) {
+ switch (primitive) {
case PIPE_PRIM_POINTS:
return vertices;
case PIPE_PRIM_LINES:
return vertices / 2;
case PIPE_PRIM_LINE_LOOP:
- return vertices;
+ return (vertices >= 2) ? vertices : 0;
case PIPE_PRIM_LINE_STRIP:
- return vertices - 1;
+ return (vertices >= 2) ? vertices - 1 : 0;
case PIPE_PRIM_TRIANGLES:
- return vertices / 3;
+ return vertices / 3;
case PIPE_PRIM_TRIANGLE_STRIP:
- return vertices - 2;
+ return (vertices >= 3) ? vertices - 2 : 0;
case PIPE_PRIM_TRIANGLE_FAN:
- return vertices - 2;
+ return (vertices >= 3) ? vertices - 2 : 0;
case PIPE_PRIM_LINES_ADJACENCY:
- return vertices / 2;
+ return vertices / 4;
case PIPE_PRIM_LINE_STRIP_ADJACENCY:
- return vertices - 1;
+ return (vertices >= 4) ? vertices - 3 : 0;
case PIPE_PRIM_TRIANGLES_ADJACENCY:
- return vertices / 3;
+ return vertices / 6;
case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
- return vertices - 2;
-
- /* following primitives should never be used
- * with geometry shaders abd their size is
- * undefined */
+ return (vertices >= 6) ? 1 + (vertices - 6) / 2 : 0;
+ case PIPE_PRIM_QUADS:
+ return vertices / 4;
+ case PIPE_PRIM_QUAD_STRIP:
+ return (vertices >= 4) ? (vertices - 2) / 2 : 0;
+ /* Polygons can't be decomposed
+ * because the number of their vertices isn't known so
+ * for them and whatever else we don't recognize just
+ * return 1 if the number of vertices is greater than
+ * or equal to 3 and zero otherwise */
case PIPE_PRIM_POLYGON:
+ default:
+ debug_printf("Invalid decomposition primitive!\n");
+ return (vertices >= 3) ? 1 : 0;
+ }
+}
+
+/**
+ * Returns the number of reduced/tessellated primitives for the given vertex
+ * count. Each quad is treated as two triangles. Polygons are treated as
+ * triangle fans.
+ */
+static INLINE unsigned
+u_reduced_prims_for_vertices(int primitive, int vertices)
+{
+ switch (primitive) {
case PIPE_PRIM_QUADS:
case PIPE_PRIM_QUAD_STRIP:
+ return u_decomposed_prims_for_vertices(primitive, vertices) * 2;
+ case PIPE_PRIM_POLYGON:
+ primitive = PIPE_PRIM_TRIANGLE_FAN;
+ /* fall through */
default:
- debug_printf("Unrecognized geometry shader primitive");
- return 3;
+ return u_decomposed_prims_for_vertices(primitive, vertices);
}
}
diff --git a/mesalib/src/gallium/auxiliary/util/u_simple_list.h b/mesalib/src/gallium/auxiliary/util/u_simple_list.h
index fe5977137..7a47c1a78 100644
--- a/mesalib/src/gallium/auxiliary/util/u_simple_list.h
+++ b/mesalib/src/gallium/auxiliary/util/u_simple_list.h
@@ -28,9 +28,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/gallium/auxiliary/util/u_sse.h b/mesalib/src/gallium/auxiliary/util/u_sse.h
index 1df6c8726..d100c4706 100644
--- a/mesalib/src/gallium/auxiliary/util/u_sse.h
+++ b/mesalib/src/gallium/auxiliary/util/u_sse.h
@@ -175,7 +175,12 @@ static INLINE void u_print_ps(const char *name, __m128 r)
* MSVC will never get in here as its intrinsics support do not rely on
* compiler command line options.
*/
-static __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+static __inline __m128i
+#ifdef __clang__
+ __attribute__((__always_inline__, __nodebug__))
+#else
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+#endif
_mm_shuffle_epi8(__m128i a, __m128i mask)
{
__m128i result;
diff --git a/mesalib/src/glsl/Makefile.am b/mesalib/src/glsl/Makefile.am
index d0e5cd1d0..2bbad3d65 100644
--- a/mesalib/src/glsl/Makefile.am
+++ b/mesalib/src/glsl/Makefile.am
@@ -27,8 +27,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/glsl/glcpp \
-I$(top_srcdir)/src/gtest/include \
- $(DEFINES) \
- $(API_DEFINES)
+ $(DEFINES)
AM_CFLAGS = $(VISIBILITY_CFLAGS)
AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
diff --git a/mesalib/src/glsl/Makefile.sources b/mesalib/src/glsl/Makefile.sources
index b5282a604..50bad85ad 100644
--- a/mesalib/src/glsl/Makefile.sources
+++ b/mesalib/src/glsl/Makefile.sources
@@ -16,6 +16,7 @@ LIBGLCPP_GENERATED_FILES = \
# libglsl
LIBGLSL_FILES = \
+ $(GLSL_SRCDIR)/ast_array_index.cpp \
$(GLSL_SRCDIR)/ast_expr.cpp \
$(GLSL_SRCDIR)/ast_function.cpp \
$(GLSL_SRCDIR)/ast_to_hir.cpp \
@@ -45,6 +46,7 @@ LIBGLSL_FILES = \
$(GLSL_SRCDIR)/ir_variable_refcount.cpp \
$(GLSL_SRCDIR)/linker.cpp \
$(GLSL_SRCDIR)/link_functions.cpp \
+ $(GLSL_SRCDIR)/link_interface_blocks.cpp \
$(GLSL_SRCDIR)/link_uniforms.cpp \
$(GLSL_SRCDIR)/link_uniform_initializers.cpp \
$(GLSL_SRCDIR)/link_uniform_block_active_visitor.cpp \
@@ -62,12 +64,14 @@ LIBGLSL_FILES = \
$(GLSL_SRCDIR)/lower_mat_op_to_vec.cpp \
$(GLSL_SRCDIR)/lower_noise.cpp \
$(GLSL_SRCDIR)/lower_packed_varyings.cpp \
+ $(GLSL_SRCDIR)/lower_named_interface_blocks.cpp \
$(GLSL_SRCDIR)/lower_packing_builtins.cpp \
$(GLSL_SRCDIR)/lower_texture_projection.cpp \
$(GLSL_SRCDIR)/lower_variable_index_to_cond_assign.cpp \
$(GLSL_SRCDIR)/lower_vec_index_to_cond_assign.cpp \
$(GLSL_SRCDIR)/lower_vec_index_to_swizzle.cpp \
$(GLSL_SRCDIR)/lower_vector.cpp \
+ $(GLSL_SRCDIR)/lower_vector_insert.cpp \
$(GLSL_SRCDIR)/lower_output_reads.cpp \
$(GLSL_SRCDIR)/lower_ubo_reference.cpp \
$(GLSL_SRCDIR)/opt_algebraic.cpp \
@@ -81,6 +85,7 @@ LIBGLSL_FILES = \
$(GLSL_SRCDIR)/opt_dead_code_local.cpp \
$(GLSL_SRCDIR)/opt_dead_functions.cpp \
$(GLSL_SRCDIR)/opt_flatten_nested_if_blocks.cpp \
+ $(GLSL_SRCDIR)/opt_flip_matrices.cpp \
$(GLSL_SRCDIR)/opt_function_inlining.cpp \
$(GLSL_SRCDIR)/opt_if_simplification.cpp \
$(GLSL_SRCDIR)/opt_noop_swizzle.cpp \
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h
index f920759d6..f73265bf3 100644
--- a/mesalib/src/glsl/ast.h
+++ b/mesalib/src/glsl/ast.h
@@ -809,9 +809,9 @@ public:
ast_compound_statement *body;
};
-class ast_uniform_block : public ast_node {
+class ast_interface_block : public ast_node {
public:
- ast_uniform_block(ast_type_qualifier layout,
+ ast_interface_block(ast_type_qualifier layout,
const char *instance_name,
ast_expression *array_size)
: layout(layout), block_name(NULL), instance_name(instance_name),
@@ -858,7 +858,17 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
exec_list *instructions,
struct _mesa_glsl_parse_state *state);
+extern ir_rvalue *
+_mesa_ast_array_index_to_hir(void *mem_ctx,
+ struct _mesa_glsl_parse_state *state,
+ ir_rvalue *array, ir_rvalue *idx,
+ YYLTYPE &loc, YYLTYPE &idx_loc);
+
void
emit_function(_mesa_glsl_parse_state *state, ir_function *f);
+extern void
+check_builtin_array_max_size(const char *name, unsigned size,
+ YYLTYPE loc, struct _mesa_glsl_parse_state *state);
+
#endif /* AST_H */
diff --git a/mesalib/src/glsl/ast_array_index.cpp b/mesalib/src/glsl/ast_array_index.cpp
new file mode 100644
index 000000000..4baeb6f9d
--- /dev/null
+++ b/mesalib/src/glsl/ast_array_index.cpp
@@ -0,0 +1,190 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "ast.h"
+#include "glsl_types.h"
+#include "ir.h"
+
+ir_rvalue *
+_mesa_ast_array_index_to_hir(void *mem_ctx,
+ struct _mesa_glsl_parse_state *state,
+ ir_rvalue *array, ir_rvalue *idx,
+ YYLTYPE &loc, YYLTYPE &idx_loc)
+{
+ if (!array->type->is_error()
+ && !array->type->is_array()
+ && !array->type->is_matrix()
+ && !array->type->is_vector()) {
+ _mesa_glsl_error(& idx_loc, state,
+ "cannot dereference non-array / non-matrix / "
+ "non-vector");
+ }
+
+ if (!idx->type->is_error()) {
+ if (!idx->type->is_integer()) {
+ _mesa_glsl_error(& idx_loc, state, "array index must be integer type");
+ } else if (!idx->type->is_scalar()) {
+ _mesa_glsl_error(& idx_loc, state, "array index must be scalar");
+ }
+ }
+
+ /* If the array index is a constant expression and the array has a
+ * declared size, ensure that the access is in-bounds. If the array
+ * index is not a constant expression, ensure that the array has a
+ * declared size.
+ */
+ ir_constant *const const_index = idx->constant_expression_value();
+ if (const_index != NULL && idx->type->is_integer()) {
+ const int idx = const_index->value.i[0];
+ const char *type_name = "error";
+ unsigned bound = 0;
+
+ /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec:
+ *
+ * "It is illegal to declare an array with a size, and then
+ * later (in the same shader) index the same array with an
+ * integral constant expression greater than or equal to the
+ * declared size. It is also illegal to index an array with a
+ * negative constant expression."
+ */
+ if (array->type->is_matrix()) {
+ if (array->type->row_type()->vector_elements <= idx) {
+ type_name = "matrix";
+ bound = array->type->row_type()->vector_elements;
+ }
+ } else if (array->type->is_vector()) {
+ if (array->type->vector_elements <= idx) {
+ type_name = "vector";
+ bound = array->type->vector_elements;
+ }
+ } else {
+ /* glsl_type::array_size() returns 0 for non-array types. This means
+ * that we don't need to verify that the type is an array before
+ * doing the bounds checking.
+ */
+ if ((array->type->array_size() > 0)
+ && (array->type->array_size() <= idx)) {
+ type_name = "array";
+ bound = array->type->array_size();
+ }
+ }
+
+ if (bound > 0) {
+ _mesa_glsl_error(& loc, state, "%s index must be < %u",
+ type_name, bound);
+ } else if (idx < 0) {
+ _mesa_glsl_error(& loc, state, "%s index must be >= 0",
+ type_name);
+ }
+
+ if (array->type->is_array()) {
+ /* If the array is a variable dereference, it dereferences the
+ * whole array, by definition. Use this to get the variable.
+ *
+ * FINISHME: Should some methods for getting / setting / testing
+ * FINISHME: array access limits be added to ir_dereference?
+ */
+ ir_variable *const v = array->whole_variable_referenced();
+ if ((v != NULL) && (unsigned(idx) > v->max_array_access)) {
+ v->max_array_access = idx;
+
+ /* Check whether this access will, as a side effect, implicitly
+ * cause the size of a built-in array to be too large.
+ */
+ check_builtin_array_max_size(v->name, idx+1, loc, state);
+ }
+ }
+ } else if (const_index == NULL && array->type->is_array()) {
+ if (array->type->array_size() == 0) {
+ _mesa_glsl_error(&loc, state, "unsized array index must be constant");
+ } else if (array->type->fields.array->is_interface()) {
+ /* Page 46 in section 4.3.7 of the OpenGL ES 3.00 spec says:
+ *
+ * "All indexes used to index a uniform block array must be
+ * constant integral expressions."
+ */
+ _mesa_glsl_error(&loc, state,
+ "uniform block array index must be constant");
+ } else {
+ /* whole_variable_referenced can return NULL if the array is a
+ * member of a structure. In this case it is safe to not update
+ * the max_array_access field because it is never used for fields
+ * of structures.
+ */
+ ir_variable *v = array->whole_variable_referenced();
+ if (v != NULL)
+ v->max_array_access = array->type->array_size() - 1;
+ }
+
+ /* From page 23 (29 of the PDF) of the GLSL 1.30 spec:
+ *
+ * "Samplers aggregated into arrays within a shader (using square
+ * brackets [ ]) can only be indexed with integral constant
+ * expressions [...]."
+ *
+ * This restriction was added in GLSL 1.30. Shaders using earlier
+ * version of the language should not be rejected by the compiler
+ * front-end for using this construct. This allows useful things such
+ * as using a loop counter as the index to an array of samplers. If the
+ * loop in unrolled, the code should compile correctly. Instead, emit a
+ * warning.
+ */
+ if (array->type->element_type()->is_sampler()) {
+ if (!state->is_version(130, 100)) {
+ if (state->es_shader) {
+ _mesa_glsl_warning(&loc, state,
+ "sampler arrays indexed with non-constant "
+ "expressions is optional in %s",
+ state->get_version_string());
+ } else {
+ _mesa_glsl_warning(&loc, state,
+ "sampler arrays indexed with non-constant "
+ "expressions will be forbidden in GLSL 1.30 "
+ "and later");
+ }
+ } else {
+ _mesa_glsl_error(&loc, state,
+ "sampler arrays indexed with non-constant "
+ "expressions is forbidden in GLSL 1.30 and "
+ "later");
+ }
+ }
+ }
+
+ /* After performing all of the error checking, generate the IR for the
+ * expression.
+ */
+ if (array->type->is_array()
+ || array->type->is_matrix()) {
+ return new(mem_ctx) ir_dereference_array(array, idx);
+ } else if (array->type->is_vector()) {
+ return new(mem_ctx) ir_expression(ir_binop_vector_extract, array, idx);
+ } else if (array->type->is_error()) {
+ return array;
+ } else {
+ ir_rvalue *result = new(mem_ctx) ir_dereference_array(array, idx);
+ result->type = glsl_type::error_type;
+
+ return result;
+ }
+}
diff --git a/mesalib/src/glsl/ast_function.cpp b/mesalib/src/glsl/ast_function.cpp
index 26f72cf8e..00e0c05dd 100644
--- a/mesalib/src/glsl/ast_function.cpp
+++ b/mesalib/src/glsl/ast_function.cpp
@@ -165,10 +165,18 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
actual->variable_referenced()->name);
return false;
} else if (!actual->is_lvalue()) {
- _mesa_glsl_error(&loc, state,
- "function parameter '%s %s' is not an lvalue",
- mode, formal->name);
- return false;
+ /* Even though ir_binop_vector_extract is not an l-value, let it
+ * slop through. generate_call will handle it correctly.
+ */
+ ir_expression *const expr = ((ir_rvalue *) actual)->as_expression();
+ if (expr == NULL
+ || expr->operation != ir_binop_vector_extract
+ || !expr->operands[0]->is_lvalue()) {
+ _mesa_glsl_error(&loc, state,
+ "function parameter '%s %s' is not an lvalue",
+ mode, formal->name);
+ return false;
+ }
}
}
@@ -178,6 +186,93 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
return true;
}
+static void
+fix_parameter(void *mem_ctx, ir_rvalue *actual, const glsl_type *formal_type,
+ exec_list *before_instructions, exec_list *after_instructions,
+ bool parameter_is_inout)
+{
+ ir_expression *const expr = actual->as_expression();
+
+ /* If the types match exactly and the parameter is not a vector-extract,
+ * nothing needs to be done to fix the parameter.
+ */
+ if (formal_type == actual->type
+ && (expr == NULL || expr->operation != ir_binop_vector_extract))
+ return;
+
+ /* To convert an out parameter, we need to create a temporary variable to
+ * hold the value before conversion, and then perform the conversion after
+ * the function call returns.
+ *
+ * This has the effect of transforming code like this:
+ *
+ * void f(out int x);
+ * float value;
+ * f(value);
+ *
+ * Into IR that's equivalent to this:
+ *
+ * void f(out int x);
+ * float value;
+ * int out_parameter_conversion;
+ * f(out_parameter_conversion);
+ * value = float(out_parameter_conversion);
+ *
+ * If the parameter is an ir_expression of ir_binop_vector_extract,
+ * additional conversion is needed in the post-call re-write.
+ */
+ ir_variable *tmp =
+ new(mem_ctx) ir_variable(formal_type, "inout_tmp", ir_var_temporary);
+
+ before_instructions->push_tail(tmp);
+
+ /* If the parameter is an inout parameter, copy the value of the actual
+ * parameter to the new temporary. Note that no type conversion is allowed
+ * here because inout parameters must match types exactly.
+ */
+ if (parameter_is_inout) {
+ /* Inout parameters should never require conversion, since that would
+ * require an implicit conversion to exist both to and from the formal
+ * parameter type, and there are no bidirectional implicit conversions.
+ */
+ assert (actual->type == formal_type);
+
+ ir_dereference_variable *const deref_tmp_1 =
+ new(mem_ctx) ir_dereference_variable(tmp);
+ ir_assignment *const assignment =
+ new(mem_ctx) ir_assignment(deref_tmp_1, actual);
+ before_instructions->push_tail(assignment);
+ }
+
+ /* Replace the parameter in the call with a dereference of the new
+ * temporary.
+ */
+ ir_dereference_variable *const deref_tmp_2 =
+ new(mem_ctx) ir_dereference_variable(tmp);
+ actual->replace_with(deref_tmp_2);
+
+
+ /* Copy the temporary variable to the actual parameter with optional
+ * type conversion applied.
+ */
+ ir_rvalue *rhs = new(mem_ctx) ir_dereference_variable(tmp);
+ if (actual->type != formal_type)
+ rhs = convert_component(rhs, actual->type);
+
+ ir_rvalue *lhs = actual;
+ if (expr != NULL && expr->operation == ir_binop_vector_extract) {
+ rhs = new(mem_ctx) ir_expression(ir_triop_vector_insert,
+ expr->operands[0]->type,
+ expr->operands[0]->clone(mem_ctx, NULL),
+ rhs,
+ expr->operands[1]->clone(mem_ctx, NULL));
+ lhs = expr->operands[0]->clone(mem_ctx, NULL);
+ }
+
+ ir_assignment *const assignment_2 = new(mem_ctx) ir_assignment(lhs, rhs);
+ after_instructions->push_tail(assignment_2);
+}
+
/**
* If a function call is generated, \c call_ir will point to it on exit.
* Otherwise \c call_ir will be set to \c NULL.
@@ -218,50 +313,10 @@ generate_call(exec_list *instructions, ir_function_signature *sig,
break;
}
case ir_var_function_out:
- if (actual->type != formal->type) {
- /* To convert an out parameter, we need to create a
- * temporary variable to hold the value before conversion,
- * and then perform the conversion after the function call
- * returns.
- *
- * This has the effect of transforming code like this:
- *
- * void f(out int x);
- * float value;
- * f(value);
- *
- * Into IR that's equivalent to this:
- *
- * void f(out int x);
- * float value;
- * int out_parameter_conversion;
- * f(out_parameter_conversion);
- * value = float(out_parameter_conversion);
- */
- ir_variable *tmp =
- new(ctx) ir_variable(formal->type,
- "out_parameter_conversion",
- ir_var_temporary);
- instructions->push_tail(tmp);
- ir_dereference_variable *deref_tmp_1
- = new(ctx) ir_dereference_variable(tmp);
- ir_dereference_variable *deref_tmp_2
- = new(ctx) ir_dereference_variable(tmp);
- ir_rvalue *converted_tmp
- = convert_component(deref_tmp_1, actual->type);
- ir_assignment *assignment
- = new(ctx) ir_assignment(actual, converted_tmp);
- post_call_conversions.push_tail(assignment);
- actual->replace_with(deref_tmp_2);
- }
- break;
case ir_var_function_inout:
- /* Inout parameters should never require conversion, since that
- * would require an implicit conversion to exist both to and
- * from the formal parameter type, and there are no
- * bidirectional implicit conversions.
- */
- assert (actual->type == formal->type);
+ fix_parameter(ctx, actual, formal->type,
+ instructions, &post_call_conversions,
+ formal->mode == ir_var_function_inout);
break;
default:
assert (!"Illegal formal parameter mode");
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index 92065f5b7..e918adeef 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -672,6 +672,30 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
void *ctx = state;
bool error_emitted = (lhs->type->is_error() || rhs->type->is_error());
+ /* If the assignment LHS comes back as an ir_binop_vector_extract
+ * expression, move it to the RHS as an ir_triop_vector_insert.
+ */
+ if (lhs->ir_type == ir_type_expression) {
+ ir_expression *const expr = lhs->as_expression();
+
+ if (unlikely(expr->operation == ir_binop_vector_extract)) {
+ ir_rvalue *new_rhs =
+ validate_assignment(state, lhs->type, rhs, is_initializer);
+
+ if (new_rhs == NULL) {
+ _mesa_glsl_error(& lhs_loc, state, "type mismatch");
+ return lhs;
+ } else {
+ rhs = new(ctx) ir_expression(ir_triop_vector_insert,
+ expr->operands[0]->type,
+ expr->operands[0],
+ new_rhs,
+ expr->operands[1]);
+ lhs = expr->operands[0]->clone(ctx, NULL);
+ }
+ }
+ }
+
ir_variable *lhs_var = lhs->variable_referenced();
if (lhs_var)
lhs_var->assigned = true;
@@ -904,7 +928,7 @@ get_scalar_boolean_operand(exec_list *instructions,
* If name refers to a builtin array whose maximum allowed size is less than
* size, report an error and return true. Otherwise return false.
*/
-static bool
+void
check_builtin_array_max_size(const char *name, unsigned size,
YYLTYPE loc, struct _mesa_glsl_parse_state *state)
{
@@ -918,7 +942,6 @@ check_builtin_array_max_size(const char *name, unsigned size,
_mesa_glsl_error(&loc, state, "`gl_TexCoord' array size cannot "
"be larger than gl_MaxTextureCoords (%u)\n",
state->Const.MaxTextureCoords);
- return true;
} else if (strcmp("gl_ClipDistance", name) == 0
&& size > state->Const.MaxClipPlanes) {
/* From section 7.1 (Vertex Shader Special Variables) of the
@@ -933,9 +956,7 @@ check_builtin_array_max_size(const char *name, unsigned size,
_mesa_glsl_error(&loc, state, "`gl_ClipDistance' array size cannot "
"be larger than gl_MaxClipDistances (%u)\n",
state->Const.MaxClipPlanes);
- return true;
}
- return false;
}
/**
@@ -1517,172 +1538,11 @@ ast_expression::hir(exec_list *instructions,
op[0] = subexpressions[0]->hir(instructions, state);
op[1] = subexpressions[1]->hir(instructions, state);
- error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
-
- ir_rvalue *const array = op[0];
-
- result = new(ctx) ir_dereference_array(op[0], op[1]);
-
- /* Do not use op[0] after this point. Use array.
- */
- op[0] = NULL;
-
+ result = _mesa_ast_array_index_to_hir(ctx, state, op[0], op[1],
+ loc, index_loc);
- if (error_emitted)
- break;
-
- if (!array->type->is_array()
- && !array->type->is_matrix()
- && !array->type->is_vector()) {
- _mesa_glsl_error(& index_loc, state,
- "cannot dereference non-array / non-matrix / "
- "non-vector");
+ if (result->type->is_error())
error_emitted = true;
- }
-
- if (!op[1]->type->is_integer()) {
- _mesa_glsl_error(& index_loc, state,
- "array index must be integer type");
- error_emitted = true;
- } else if (!op[1]->type->is_scalar()) {
- _mesa_glsl_error(& index_loc, state,
- "array index must be scalar");
- error_emitted = true;
- }
-
- /* If the array index is a constant expression and the array has a
- * declared size, ensure that the access is in-bounds. If the array
- * index is not a constant expression, ensure that the array has a
- * declared size.
- */
- ir_constant *const const_index = op[1]->constant_expression_value();
- if (const_index != NULL) {
- const int idx = const_index->value.i[0];
- const char *type_name;
- unsigned bound = 0;
-
- if (array->type->is_matrix()) {
- type_name = "matrix";
- } else if (array->type->is_vector()) {
- type_name = "vector";
- } else {
- type_name = "array";
- }
-
- /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec:
- *
- * "It is illegal to declare an array with a size, and then
- * later (in the same shader) index the same array with an
- * integral constant expression greater than or equal to the
- * declared size. It is also illegal to index an array with a
- * negative constant expression."
- */
- if (array->type->is_matrix()) {
- if (array->type->row_type()->vector_elements <= idx) {
- bound = array->type->row_type()->vector_elements;
- }
- } else if (array->type->is_vector()) {
- if (array->type->vector_elements <= idx) {
- bound = array->type->vector_elements;
- }
- } else {
- if ((array->type->array_size() > 0)
- && (array->type->array_size() <= idx)) {
- bound = array->type->array_size();
- }
- }
-
- if (bound > 0) {
- _mesa_glsl_error(& loc, state, "%s index must be < %u",
- type_name, bound);
- error_emitted = true;
- } else if (idx < 0) {
- _mesa_glsl_error(& loc, state, "%s index must be >= 0",
- type_name);
- error_emitted = true;
- }
-
- if (array->type->is_array()) {
- /* If the array is a variable dereference, it dereferences the
- * whole array, by definition. Use this to get the variable.
- *
- * FINISHME: Should some methods for getting / setting / testing
- * FINISHME: array access limits be added to ir_dereference?
- */
- ir_variable *const v = array->whole_variable_referenced();
- if ((v != NULL) && (unsigned(idx) > v->max_array_access)) {
- v->max_array_access = idx;
-
- /* Check whether this access will, as a side effect, implicitly
- * cause the size of a built-in array to be too large.
- */
- if (check_builtin_array_max_size(v->name, idx+1, loc, state))
- error_emitted = true;
- }
- }
- } else if (array->type->array_size() == 0) {
- _mesa_glsl_error(&loc, state, "unsized array index must be constant");
- } else if (array->type->is_array()
- && array->type->fields.array->is_interface()) {
- /* Page 46 in section 4.3.7 of the OpenGL ES 3.00 spec says:
- *
- * "All indexes used to index a uniform block array must be
- * constant integral expressions."
- */
- _mesa_glsl_error(&loc, state,
- "uniform block array index must be constant");
- } else {
- if (array->type->is_array()) {
- /* whole_variable_referenced can return NULL if the array is a
- * member of a structure. In this case it is safe to not update
- * the max_array_access field because it is never used for fields
- * of structures.
- */
- ir_variable *v = array->whole_variable_referenced();
- if (v != NULL)
- v->max_array_access = array->type->array_size() - 1;
- }
- }
-
- /* From page 23 (29 of the PDF) of the GLSL 1.30 spec:
- *
- * "Samplers aggregated into arrays within a shader (using square
- * brackets [ ]) can only be indexed with integral constant
- * expressions [...]."
- *
- * This restriction was added in GLSL 1.30. Shaders using earlier version
- * of the language should not be rejected by the compiler front-end for
- * using this construct. This allows useful things such as using a loop
- * counter as the index to an array of samplers. If the loop in unrolled,
- * the code should compile correctly. Instead, emit a warning.
- */
- if (array->type->is_array() &&
- array->type->element_type()->is_sampler() &&
- const_index == NULL) {
-
- if (!state->is_version(130, 100)) {
- if (state->es_shader) {
- _mesa_glsl_warning(&loc, state,
- "sampler arrays indexed with non-constant "
- "expressions is optional in %s",
- state->get_version_string());
- } else {
- _mesa_glsl_warning(&loc, state,
- "sampler arrays indexed with non-constant "
- "expressions will be forbidden in GLSL 1.30 and "
- "later");
- }
- } else {
- _mesa_glsl_error(&loc, state,
- "sampler arrays indexed with non-constant "
- "expressions is forbidden in GLSL 1.30 and "
- "later");
- error_emitted = true;
- }
- }
-
- if (error_emitted)
- result->type = glsl_type::error_type;
break;
}
@@ -1842,6 +1702,9 @@ process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size,
{
unsigned length = 0;
+ if (base == NULL)
+ return glsl_type::error_type;
+
/* From page 19 (page 25) of the GLSL 1.20 spec:
*
* "Only one-dimensional arrays may be declared."
@@ -1894,7 +1757,8 @@ process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size,
"allowed in GLSL ES 1.00.");
}
- return glsl_type::get_array_instance(base, length);
+ const glsl_type *array_type = glsl_type::get_array_instance(base, length);
+ return array_type != NULL ? array_type : glsl_type::error_type;
}
@@ -3365,10 +3229,17 @@ ast_function::hir(exec_list *instructions,
"match prototype", name);
}
- if (is_definition && sig->is_defined) {
- YYLTYPE loc = this->get_location();
-
- _mesa_glsl_error(& loc, state, "function `%s' redefined", name);
+ if (sig->is_defined) {
+ if (is_definition) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(& loc, state, "function `%s' redefined", name);
+ } else {
+ /* We just encountered a prototype that exactly matches a
+ * function that's already been defined. This is redundant,
+ * and we should ignore it.
+ */
+ return NULL;
+ }
}
}
} else {
@@ -4149,8 +4020,14 @@ ast_process_structure_or_interface_block(exec_list *instructions,
* blocks. All other types, arrays, and structures
* allowed for uniforms are allowed within a uniform
* block."
+ *
+ * It should be impossible for decl_type to be NULL here. Cases that
+ * might naturally lead to decl_type being NULL, especially for the
+ * is_interface case, will have resulted in compilation having
+ * already halted due to a syntax error.
*/
- const struct glsl_type *field_type = decl_type;
+ const struct glsl_type *field_type =
+ decl_type != NULL ? decl_type : glsl_type::error_type;
if (is_interface && field_type->contains_sampler()) {
YYLTYPE loc = decl_list->get_location();
@@ -4173,12 +4050,15 @@ ast_process_structure_or_interface_block(exec_list *instructions,
field_type = process_array_type(&loc, decl_type, decl->array_size,
state);
}
- fields[i].type = (field_type != NULL)
- ? field_type : glsl_type::error_type;
+ fields[i].type = field_type;
fields[i].name = decl->identifier;
if (qual->flags.q.row_major || qual->flags.q.column_major) {
- if (!field_type->is_matrix() && !field_type->is_record()) {
+ if (!qual->flags.q.uniform) {
+ _mesa_glsl_error(&loc, state,
+ "row_major and column_major can only be "
+ "applied to uniform interface blocks.");
+ } else if (!field_type->is_matrix() && !field_type->is_record()) {
_mesa_glsl_error(&loc, state,
"uniform block layout qualifiers row_major and "
"column_major can only be applied to matrix and "
@@ -4187,6 +4067,12 @@ ast_process_structure_or_interface_block(exec_list *instructions,
validate_matrix_layout_for_type(state, &loc, field_type);
}
+ if (qual->flags.q.uniform && qual->has_interpolation()) {
+ _mesa_glsl_error(&loc, state,
+ "interpolation qualifiers cannot be used "
+ "with uniform interface blocks");
+ }
+
if (field_type->is_matrix() ||
(field_type->is_array() && field_type->fields.array->is_matrix())) {
fields[i].row_major = block_row_major;
@@ -4244,12 +4130,12 @@ ast_struct_specifier::hir(exec_list *instructions,
}
ir_rvalue *
-ast_uniform_block::hir(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
+ast_interface_block::hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
{
YYLTYPE loc = this->get_location();
- /* The ast_uniform_block has a list of ast_declarator_lists. We
+ /* The ast_interface_block has a list of ast_declarator_lists. We
* need to turn those into ir_variables with an association
* with this uniform block.
*/
@@ -4276,16 +4162,32 @@ ast_uniform_block::hir(exec_list *instructions,
true,
block_row_major);
+ ir_variable_mode var_mode;
+ const char *iface_type_name;
+ if (this->layout.flags.q.in) {
+ var_mode = ir_var_shader_in;
+ iface_type_name = "in";
+ } else if (this->layout.flags.q.out) {
+ var_mode = ir_var_shader_out;
+ iface_type_name = "out";
+ } else if (this->layout.flags.q.uniform) {
+ var_mode = ir_var_uniform;
+ iface_type_name = "uniform";
+ } else {
+ assert(!"interface block layout qualifier not found!");
+ }
+
const glsl_type *block_type =
glsl_type::get_interface_instance(fields,
num_variables,
packing,
this->block_name);
- if (!state->symbols->add_type(block_type->name, block_type)) {
+ if (!state->symbols->add_interface(block_type->name, block_type, var_mode)) {
YYLTYPE loc = this->get_location();
- _mesa_glsl_error(&loc, state, "Uniform block name `%s' already taken in "
- "the current scope.\n", this->block_name);
+ _mesa_glsl_error(&loc, state, "Interface block `%s' with type `%s' "
+ "already taken in the current scope.\n",
+ this->block_name, iface_type_name);
}
/* Since interface blocks cannot contain statements, it should be
@@ -4309,11 +4211,11 @@ ast_uniform_block::hir(exec_list *instructions,
var = new(state) ir_variable(block_array_type,
this->instance_name,
- ir_var_uniform);
+ var_mode);
} else {
var = new(state) ir_variable(block_type,
this->instance_name,
- ir_var_uniform);
+ var_mode);
}
var->interface_type = block_type;
@@ -4329,7 +4231,7 @@ ast_uniform_block::hir(exec_list *instructions,
ir_variable *var =
new(state) ir_variable(fields[i].type,
ralloc_strdup(state, fields[i].name),
- ir_var_uniform);
+ var_mode);
var->interface_type = block_type;
state->symbols->add_variable(var);
diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp
index b0c7a2035..4bb361c2e 100644
--- a/mesalib/src/glsl/builtin_variables.cpp
+++ b/mesalib/src/glsl/builtin_variables.cpp
@@ -39,6 +39,12 @@ generate_ARB_draw_instanced_variables(exec_list *,
struct _mesa_glsl_parse_state *,
bool, _mesa_glsl_parser_targets);
+static void
+generate_AMD_vertex_shader_layer_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ bool warn,
+ _mesa_glsl_parser_targets target);
+
struct builtin_variable {
enum ir_variable_mode mode;
int slot;
@@ -535,7 +541,7 @@ generate_common_ES_uniforms(exec_list *instructions,
add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits",
state->Const.MaxTextureImageUnits);
add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformVectors",
- state->Const.MaxFragmentUniformComponents);
+ state->Const.MaxFragmentUniformComponents / 4);
add_uniform(instructions, symtab, "gl_DepthRange",
state->symbols->get_type("gl_DepthRangeParameters"));
@@ -818,6 +824,8 @@ generate_130_vs_variables(exec_list *instructions,
"gl_ClipDistance", clip_distance_array_type, ir_var_shader_out,
VARYING_SLOT_CLIP_DIST0);
+ generate_AMD_vertex_shader_layer_variables(instructions, state, false,
+ vertex_shader);
}
@@ -1020,6 +1028,29 @@ generate_ARB_draw_instanced_variables(exec_list *instructions,
}
}
+static void
+generate_AMD_vertex_shader_layer_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ bool warn,
+ _mesa_glsl_parser_targets target)
+{
+ /* gl_Layer is only available in the vertex shader for the
+ * AMD_vertex_shader_layer extension. It will also be available in the
+ * geometry shader when GLSL 1.50 is supported.
+ */
+ if (target != vertex_shader)
+ return;
+
+ if (state->AMD_vertex_shader_layer_enable) {
+ ir_variable *inst =
+ add_variable(instructions, state->symbols,
+ "gl_Layer", glsl_type::int_type,
+ ir_var_shader_out, VARYING_SLOT_LAYER);
+
+ if (warn)
+ inst->warn_extension = "GL_AMD_vertex_shader_layer";
+ }
+}
static void
generate_ARB_shader_stencil_export_variables(exec_list *instructions,
diff --git a/mesalib/src/glsl/glcpp/glcpp-parse.y b/mesalib/src/glsl/glcpp/glcpp-parse.y
index 00edbbfbd..81ba04bcc 100644
--- a/mesalib/src/glsl/glcpp/glcpp-parse.y
+++ b/mesalib/src/glsl/glcpp/glcpp-parse.y
@@ -1236,6 +1236,12 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
if (extensions->ARB_texture_query_lod)
add_builtin_define(parser, "GL_ARB_texture_query_lod", 1);
+
+ if (extensions->ARB_gpu_shader5)
+ add_builtin_define(parser, "GL_ARB_gpu_shader5", 1);
+
+ if (extensions->AMD_vertex_shader_layer)
+ add_builtin_define(parser, "GL_AMD_vertex_shader_layer", 1);
}
}
diff --git a/mesalib/src/glsl/glcpp/pp.c b/mesalib/src/glsl/glcpp/pp.c
index 789f7f941..7e1b6c689 100644
--- a/mesalib/src/glsl/glcpp/pp.c
+++ b/mesalib/src/glsl/glcpp/pp.c
@@ -97,8 +97,10 @@ remove_line_continuations(glcpp_parser_t *ctx, const char *shader)
{
ralloc_strncat(&clean, shader,
newline - shader + 1);
- while (collapsed_newlines--)
+ while (collapsed_newlines) {
ralloc_strcat(&clean, "\n");
+ collapsed_newlines--;
+ }
shader = newline + 1;
search_start = shader;
}
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index f52ed9b0a..6e92c2651 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -79,7 +79,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
ast_case_label_list *case_label_list;
ast_case_statement *case_statement;
ast_case_statement_list *case_statement_list;
- ast_uniform_block *uniform_block;
+ ast_interface_block *interface_block;
struct {
ast_node *cond;
@@ -115,7 +115,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
%token STRUCT VOID_TOK WHILE
%token <identifier> IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER
%type <identifier> any_identifier
-%type <uniform_block> instance_name_opt
+%type <interface_block> instance_name_opt
%token <real> FLOATCONSTANT
%token <n> INTCONSTANT UINTCONSTANT BOOLCONSTANT
%token <identifier> FIELD_SELECTION
@@ -164,7 +164,8 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
%type <type_qualifier> interpolation_qualifier
%type <type_qualifier> layout_qualifier
%type <type_qualifier> layout_qualifier_id_list layout_qualifier_id
-%type <type_qualifier> uniform_block_layout_qualifier
+%type <type_qualifier> interface_block_layout_qualifier
+%type <type_qualifier> interface_qualifier
%type <type_specifier> type_specifier
%type <type_specifier> type_specifier_no_prec
%type <type_specifier> type_specifier_nonarray
@@ -223,8 +224,8 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
%type <node> declaration
%type <node> declaration_statement
%type <node> jump_statement
-%type <node> uniform_block
-%type <uniform_block> basic_uniform_block
+%type <node> interface_block
+%type <interface_block> basic_interface_block
%type <struct_specifier> struct_specifier
%type <declarator_list> struct_declaration_list
%type <declarator_list> struct_declaration
@@ -784,7 +785,7 @@ declaration:
$3->is_precision_statement = true;
$$ = $3;
}
- | uniform_block
+ | interface_block
{
$$ = $1;
}
@@ -1140,7 +1141,7 @@ layout_qualifier_id:
}
}
- /* See also uniform_block_layout_qualifier. */
+ /* See also interface_block_layout_qualifier. */
if (!$$.flags.i && state->ARB_uniform_buffer_object_enable) {
if (strcmp($1, "std140") == 0) {
$$.flags.q.std140 = 1;
@@ -1211,15 +1212,15 @@ layout_qualifier_id:
"identifier `%s' used\n", $1);
}
}
- | uniform_block_layout_qualifier
+ | interface_block_layout_qualifier
{
$$ = $1;
/* Layout qualifiers for ARB_uniform_buffer_object. */
- if (!state->ARB_uniform_buffer_object_enable) {
+ if ($$.flags.q.uniform && !state->ARB_uniform_buffer_object_enable) {
_mesa_glsl_error(& @1, state,
"#version 140 / GL_ARB_uniform_buffer_object "
"layout qualifier `%s' is used\n", $1);
- } else if (state->ARB_uniform_buffer_object_warn) {
+ } else if ($$.flags.q.uniform && state->ARB_uniform_buffer_object_warn) {
_mesa_glsl_warning(& @1, state,
"#version 140 / GL_ARB_uniform_buffer_object "
"layout qualifier `%s' is used\n", $1);
@@ -1232,7 +1233,7 @@ layout_qualifier_id:
* most qualifiers. See the any_identifier path of
* layout_qualifier_id for the others.
*/
-uniform_block_layout_qualifier:
+interface_block_layout_qualifier:
ROW_MAJOR
{
memset(& $$, 0, sizeof($$));
@@ -1893,14 +1894,14 @@ function_definition:
;
/* layout_qualifieropt is packed into this rule */
-uniform_block:
- basic_uniform_block
+interface_block:
+ basic_interface_block
{
$$ = $1;
}
- | layout_qualifier basic_uniform_block
+ | layout_qualifier basic_interface_block
{
- ast_uniform_block *block = $2;
+ ast_interface_block *block = $2;
if (!block->layout.merge_qualifier(& @1, state, $1)) {
YYERROR;
}
@@ -1908,55 +1909,137 @@ uniform_block:
}
;
-basic_uniform_block:
- UNIFORM NEW_IDENTIFIER '{' member_list '}' instance_name_opt ';'
+basic_interface_block:
+ interface_qualifier NEW_IDENTIFIER '{' member_list '}' instance_name_opt ';'
{
- ast_uniform_block *const block = $6;
+ ast_interface_block *const block = $6;
block->block_name = $2;
block->declarations.push_degenerate_list_at_head(& $4->link);
- if (!state->ARB_uniform_buffer_object_enable) {
+ if ($1.flags.q.uniform) {
+ if (!state->ARB_uniform_buffer_object_enable) {
+ _mesa_glsl_error(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "required for defining uniform blocks\n");
+ } else if (state->ARB_uniform_buffer_object_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "#version 140 / GL_ARB_uniform_buffer_object "
+ "required for defining uniform blocks\n");
+ }
+ } else {
+ if (state->es_shader || state->language_version < 150) {
+ _mesa_glsl_error(& @1, state,
+ "#version 150 required for using "
+ "interface blocks.\n");
+ }
+ }
+
+ /* From the GLSL 1.50.11 spec, section 4.3.7 ("Interface Blocks"):
+ * "It is illegal to have an input block in a vertex shader
+ * or an output block in a fragment shader"
+ */
+ if ((state->target == vertex_shader) && $1.flags.q.in) {
_mesa_glsl_error(& @1, state,
- "#version 140 / GL_ARB_uniform_buffer_object "
- "required for defining uniform blocks\n");
- } else if (state->ARB_uniform_buffer_object_warn) {
- _mesa_glsl_warning(& @1, state,
- "#version 140 / GL_ARB_uniform_buffer_object "
- "required for defining uniform blocks\n");
+ "`in' interface block is not allowed for "
+ "a vertex shader\n");
+ } else if ((state->target == fragment_shader) && $1.flags.q.out) {
+ _mesa_glsl_error(& @1, state,
+ "`out' interface block is not allowed for "
+ "a fragment shader\n");
}
/* Since block arrays require names, and both features are added in
* the same language versions, we don't have to explicitly
* version-check both things.
*/
- if (block->instance_name != NULL
- && !(state->language_version == 300 && state->es_shader)) {
- _mesa_glsl_error(& @1, state,
- "#version 300 es required for using uniform "
- "blocks with an instance name\n");
+ if (block->instance_name != NULL) {
+ state->check_version(150, 300, & @1, "interface blocks with "
+ "an instance name are not allowed");
+ }
+
+ unsigned interface_type_mask;
+ struct ast_type_qualifier temp_type_qualifier;
+
+ /* Get a bitmask containing only the in/out/uniform flags, allowing us
+ * to ignore other irrelevant flags like interpolation qualifiers.
+ */
+ temp_type_qualifier.flags.i = 0;
+ temp_type_qualifier.flags.q.uniform = true;
+ temp_type_qualifier.flags.q.in = true;
+ temp_type_qualifier.flags.q.out = true;
+ interface_type_mask = temp_type_qualifier.flags.i;
+
+ /* Get the block's interface qualifier. The interface_qualifier
+ * production rule guarantees that only one bit will be set (and
+ * it will be in/out/uniform).
+ */
+ unsigned block_interface_qualifier = $1.flags.i;
+
+ block->layout.flags.i |= block_interface_qualifier;
+
+ foreach_list_typed (ast_declarator_list, member, link, &block->declarations) {
+ ast_type_qualifier& qualifier = member->type->qualifier;
+ if ((qualifier.flags.i & interface_type_mask) == 0) {
+ /* GLSLangSpec.1.50.11, 4.3.7 (Interface Blocks):
+ * "If no optional qualifier is used in a member declaration, the
+ * qualifier of the variable is just in, out, or uniform as declared
+ * by interface-qualifier."
+ */
+ qualifier.flags.i |= block_interface_qualifier;
+ } else if ((qualifier.flags.i & interface_type_mask) !=
+ block_interface_qualifier) {
+ /* GLSLangSpec.1.50.11, 4.3.7 (Interface Blocks):
+ * "If optional qualifiers are used, they can include interpolation
+ * and storage qualifiers and they must declare an input, output,
+ * or uniform variable consistent with the interface qualifier of
+ * the block."
+ */
+ _mesa_glsl_error(& @1, state,
+ "uniform/in/out qualifier on "
+ "interface block member does not match "
+ "the interface block\n");
+ }
}
$$ = block;
}
;
+interface_qualifier:
+ IN_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.in = 1;
+ }
+ | OUT_TOK
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.out = 1;
+ }
+ | UNIFORM
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.uniform = 1;
+ }
+ ;
+
instance_name_opt:
/* empty */
{
- $$ = new(state) ast_uniform_block(*state->default_uniform_qualifier,
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
NULL,
NULL);
}
| NEW_IDENTIFIER
{
- $$ = new(state) ast_uniform_block(*state->default_uniform_qualifier,
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
$1,
NULL);
}
| NEW_IDENTIFIER '[' constant_expression ']'
{
- $$ = new(state) ast_uniform_block(*state->default_uniform_qualifier,
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
$1,
$3);
}
@@ -1965,7 +2048,7 @@ instance_name_opt:
_mesa_glsl_error(& @1, state,
"instance block arrays must be explicitly sized\n");
- $$ = new(state) ast_uniform_block(*state->default_uniform_qualifier,
+ $$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
$1,
NULL);
}
@@ -1984,41 +2067,28 @@ member_list:
}
;
-/* Specifying "uniform" inside of a uniform block is redundant. */
-uniformopt:
- /* nothing */
- | UNIFORM
- ;
-
member_declaration:
- layout_qualifier uniformopt type_specifier struct_declarator_list ';'
+ fully_specified_type struct_declarator_list ';'
{
void *ctx = state;
- ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
+ ast_fully_specified_type *type = $1;
type->set_location(yylloc);
- type->qualifier = $1;
- type->qualifier.flags.q.uniform = true;
- type->specifier = $3;
- $$ = new(ctx) ast_declarator_list(type);
- $$->set_location(yylloc);
- $$->ubo_qualifiers_valid = true;
-
- $$->declarations.push_degenerate_list_at_head(& $4->link);
- }
- | uniformopt type_specifier struct_declarator_list ';'
- {
- void *ctx = state;
- ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
- type->set_location(yylloc);
+ if (type->qualifier.flags.q.attribute) {
+ _mesa_glsl_error(& @1, state,
+ "keyword 'attribute' cannot be used with "
+ "interface block member\n");
+ } else if (type->qualifier.flags.q.varying) {
+ _mesa_glsl_error(& @1, state,
+ "keyword 'varying' cannot be used with "
+ "interface block member\n");
+ }
- type->qualifier.flags.q.uniform = true;
- type->specifier = $2;
$$ = new(ctx) ast_declarator_list(type);
$$->set_location(yylloc);
$$->ubo_qualifiers_valid = true;
- $$->declarations.push_degenerate_list_at_head(& $3->link);
+ $$->declarations.push_degenerate_list_at_head(& $2->link);
}
;
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index 099229410..c0dd71370 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -93,9 +93,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs;
this->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents;
this->Const.MaxVaryingFloats = ctx->Const.MaxVarying * 4;
- this->Const.MaxVertexTextureImageUnits = ctx->Const.MaxVertexTextureImageUnits;
+ this->Const.MaxVertexTextureImageUnits = ctx->Const.VertexProgram.MaxTextureImageUnits;
this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
- this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
+ this->Const.MaxTextureImageUnits = ctx->Const.FragmentProgram.MaxTextureImageUnits;
this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
this->Const.MinProgramTexelOffset = ctx->Const.MinProgramTexelOffset;
this->Const.MaxProgramTexelOffset = ctx->Const.MaxProgramTexelOffset;
@@ -468,6 +468,8 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(ARB_shading_language_packing, true, false, true, true, false, ARB_shading_language_packing),
EXT(ARB_texture_multisample, true, false, true, true, false, ARB_texture_multisample),
EXT(ARB_texture_query_lod, false, false, true, true, false, ARB_texture_query_lod),
+ EXT(ARB_gpu_shader5, true, true, true, true, false, ARB_gpu_shader5),
+ EXT(AMD_vertex_shader_layer, true, false, false, true, false, AMD_vertex_shader_layer),
};
#undef EXT
@@ -1202,11 +1204,13 @@ ast_struct_specifier::ast_struct_specifier(const char *identifier,
* \param max_unroll_iterations Maximum number of loop iterations to be
* unrolled. Setting to 0 disables loop
* unrolling.
+ * \param options The driver's preferred shader options.
*/
bool
do_common_optimization(exec_list *ir, bool linked,
bool uniform_locations_assigned,
- unsigned max_unroll_iterations)
+ unsigned max_unroll_iterations,
+ const struct gl_shader_compiler_options *options)
{
GLboolean progress = GL_FALSE;
@@ -1221,6 +1225,10 @@ do_common_optimization(exec_list *ir, bool linked,
progress = opt_flatten_nested_if_blocks(ir) || progress;
progress = do_copy_propagation(ir) || progress;
progress = do_copy_propagation_elements(ir) || progress;
+
+ if (options->PreferDP4 && !linked)
+ progress = opt_flip_matrices(ir) || progress;
+
if (linked)
progress = do_dead_code(ir, uniform_locations_assigned) || progress;
else
@@ -1236,6 +1244,7 @@ do_common_optimization(exec_list *ir, bool linked,
progress = do_algebraic(ir) || progress;
progress = do_lower_jumps(ir) || progress;
progress = do_vec_index_to_swizzle(ir) || progress;
+ progress = lower_vector_insert(ir, false) || progress;
progress = do_swizzle_swizzle(ir) || progress;
progress = do_noop_swizzle(ir) || progress;
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 37a47cf9a..89c1a565e 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -288,6 +288,10 @@ struct _mesa_glsl_parse_state {
bool ARB_texture_multisample_warn;
bool ARB_texture_query_lod_enable;
bool ARB_texture_query_lod_warn;
+ bool ARB_gpu_shader5_enable;
+ bool ARB_gpu_shader5_warn;
+ bool AMD_vertex_shader_layer_enable;
+ bool AMD_vertex_shader_layer_warn;
/*@}*/
/** Extensions supported by the OpenGL implementation. */
diff --git a/mesalib/src/glsl/glsl_symbol_table.cpp b/mesalib/src/glsl/glsl_symbol_table.cpp
index d303430bb..dcc3a1e02 100644
--- a/mesalib/src/glsl/glsl_symbol_table.cpp
+++ b/mesalib/src/glsl/glsl_symbol_table.cpp
@@ -45,13 +45,67 @@ public:
ralloc_free(entry);
}
- symbol_table_entry(ir_variable *v) : v(v), f(0), t(0) {}
- symbol_table_entry(ir_function *f) : v(0), f(f), t(0) {}
- symbol_table_entry(const glsl_type *t) : v(0), f(0), t(t) {}
+ bool add_interface(const glsl_type *i, enum ir_variable_mode mode)
+ {
+ const glsl_type **dest;
+
+ switch (mode) {
+ case ir_var_uniform:
+ dest = &ibu;
+ break;
+ case ir_var_shader_in:
+ dest = &ibi;
+ break;
+ case ir_var_shader_out:
+ dest = &ibo;
+ break;
+ default:
+ assert(!"Unsupported interface variable mode!");
+ return false;
+ }
+
+ if (*dest != NULL) {
+ return false;
+ } else {
+ *dest = i;
+ return true;
+ }
+ }
+
+ const glsl_type *get_interface(enum ir_variable_mode mode)
+ {
+ switch (mode) {
+ case ir_var_uniform:
+ return ibu;
+ case ir_var_shader_in:
+ return ibi;
+ case ir_var_shader_out:
+ return ibo;
+ default:
+ assert(!"Unsupported interface variable mode!");
+ return NULL;
+ }
+ }
+
+ symbol_table_entry(ir_variable *v) :
+ v(v), f(0), t(0), ibu(0), ibi(0), ibo(0) {}
+ symbol_table_entry(ir_function *f) :
+ v(0), f(f), t(0), ibu(0), ibi(0), ibo(0) {}
+ symbol_table_entry(const glsl_type *t) :
+ v(0), f(0), t(t), ibu(0), ibi(0), ibo(0) {}
+ symbol_table_entry(const glsl_type *t, enum ir_variable_mode mode) :
+ v(0), f(0), t(0), ibu(0), ibi(0), ibo(0)
+ {
+ assert(t->is_interface());
+ add_interface(t, mode);
+ }
ir_variable *v;
ir_function *f;
const glsl_type *t;
+ const glsl_type *ibu;
+ const glsl_type *ibi;
+ const glsl_type *ibo;
};
glsl_symbol_table::glsl_symbol_table()
@@ -122,6 +176,23 @@ bool glsl_symbol_table::add_type(const char *name, const glsl_type *t)
return _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
}
+bool glsl_symbol_table::add_interface(const char *name, const glsl_type *i,
+ enum ir_variable_mode mode)
+{
+ assert(i->is_interface());
+ symbol_table_entry *entry = get_entry(name);
+ if (entry == NULL) {
+ symbol_table_entry *entry =
+ new(mem_ctx) symbol_table_entry(i, mode);
+ bool add_interface_symbol_result =
+ _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
+ assert(add_interface_symbol_result);
+ return add_interface_symbol_result;
+ } else {
+ return entry->add_interface(i, mode);
+ }
+}
+
bool glsl_symbol_table::add_function(ir_function *f)
{
if (this->separate_function_namespace && name_declared_this_scope(f->name)) {
@@ -156,6 +227,13 @@ const glsl_type *glsl_symbol_table::get_type(const char *name)
return entry != NULL ? entry->t : NULL;
}
+const glsl_type *glsl_symbol_table::get_interface(const char *name,
+ enum ir_variable_mode mode)
+{
+ symbol_table_entry *entry = get_entry(name);
+ return entry != NULL ? entry->get_interface(mode) : NULL;
+}
+
ir_function *glsl_symbol_table::get_function(const char *name)
{
symbol_table_entry *entry = get_entry(name);
diff --git a/mesalib/src/glsl/glsl_symbol_table.h b/mesalib/src/glsl/glsl_symbol_table.h
index 55baebf10..98084c990 100644
--- a/mesalib/src/glsl/glsl_symbol_table.h
+++ b/mesalib/src/glsl/glsl_symbol_table.h
@@ -104,6 +104,8 @@ public:
bool add_variable(ir_variable *v);
bool add_type(const char *name, const glsl_type *t);
bool add_function(ir_function *f);
+ bool add_interface(const char *name, const glsl_type *i,
+ enum ir_variable_mode mode);
/*@}*/
/**
@@ -118,6 +120,8 @@ public:
ir_variable *get_variable(const char *name);
const glsl_type *get_type(const char *name);
ir_function *get_function(const char *name);
+ const glsl_type *get_interface(const char *name,
+ enum ir_variable_mode mode);
/*@}*/
private:
diff --git a/mesalib/src/glsl/glsl_types.cpp b/mesalib/src/glsl/glsl_types.cpp
index 419761a7d..df9c5d36f 100644
--- a/mesalib/src/glsl/glsl_types.cpp
+++ b/mesalib/src/glsl/glsl_types.cpp
@@ -57,6 +57,7 @@ glsl_type::glsl_type(GLenum gl_type,
length(0)
{
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
/* Neither dimension is zero or both dimensions are zero.
*/
@@ -75,6 +76,7 @@ glsl_type::glsl_type(GLenum gl_type,
length(0)
{
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
memset(& fields, 0, sizeof(fields));
}
@@ -91,6 +93,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
unsigned int i;
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
this->fields.structure = ralloc_array(this->mem_ctx,
glsl_struct_field, length);
@@ -114,6 +117,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
unsigned int i;
init_ralloc_type_ctx();
+ assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
this->fields.structure = ralloc_array(this->mem_ctx,
glsl_struct_field, length);
diff --git a/mesalib/src/glsl/glsl_types.h b/mesalib/src/glsl/glsl_types.h
index 2f3b19f51..31e3dd253 100644
--- a/mesalib/src/glsl/glsl_types.h
+++ b/mesalib/src/glsl/glsl_types.h
@@ -132,8 +132,7 @@ struct glsl_type {
/**
* Name of the data type
*
- * This may be \c NULL for anonymous structures, for arrays, or for
- * function types.
+ * Will never be \c NULL.
*/
const char *name;
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index 05b77da2c..dad58deeb 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -399,6 +399,10 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
this->type = op0->type;
break;
+ case ir_binop_vector_extract:
+ this->type = op0->type->get_scalar_type();
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = glsl_type::float_type;
@@ -419,7 +423,7 @@ ir_expression::get_num_operands(ir_expression_operation op)
if (op <= ir_last_triop)
return 3;
- if (op == ir_quadop_vector)
+ if (op <= ir_last_quadop)
return 4;
assert(false);
@@ -477,6 +481,10 @@ static const char *const operator_strs[] = {
"unpackHalf2x16",
"unpackHalf2x16_split_x",
"unpackHalf2x16_split_y",
+ "bitfield_reverse",
+ "bit_count",
+ "find_msb",
+ "find_lsb",
"noise",
"+",
"-",
@@ -504,8 +512,14 @@ static const char *const operator_strs[] = {
"max",
"pow",
"packHalf2x16_split",
+ "bfm",
"ubo_load",
+ "vector_extract",
"lrp",
+ "bfi",
+ "bitfield_extract",
+ "vector_insert",
+ "bitfield_insert",
"vector",
};
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index 0c3e39979..6d4150136 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -131,6 +131,7 @@ public:
virtual class ir_swizzle * as_swizzle() { return NULL; }
virtual class ir_constant * as_constant() { return NULL; }
virtual class ir_discard * as_discard() { return NULL; }
+ virtual class ir_jump * as_jump() { return NULL; }
/*@}*/
protected:
@@ -273,7 +274,8 @@ enum ir_variable_mode {
ir_var_function_inout,
ir_var_const_in, /**< "in" param that must be a constant expression */
ir_var_system_value, /**< Ex: front-face, instance-id, etc. */
- ir_var_temporary /**< Temporary variable generated during compilation. */
+ ir_var_temporary, /**< Temporary variable generated during compilation. */
+ ir_var_mode_count /**< Number of variable modes */
};
/**
@@ -1031,6 +1033,16 @@ enum ir_expression_operation {
ir_unop_unpack_half_2x16_split_y,
/*@}*/
+ /**
+ * \name Bit operations, part of ARB_gpu_shader5.
+ */
+ /*@{*/
+ ir_unop_bitfield_reverse,
+ ir_unop_bit_count,
+ ir_unop_find_msb,
+ ir_unop_find_lsb,
+ /*@}*/
+
ir_unop_noise,
/**
@@ -1107,6 +1119,15 @@ enum ir_expression_operation {
/*@}*/
/**
+ * \name First half of a lowered bitfieldInsert() operation.
+ *
+ * \see lower_instructions::bitfield_insert_to_bfm_bfi
+ */
+ /*@{*/
+ ir_binop_bfm,
+ /*@}*/
+
+ /**
* Load a value the size of a given GLSL type from a uniform block.
*
* operand0 is the ir_constant uniform block index in the linked shader.
@@ -1115,20 +1136,55 @@ enum ir_expression_operation {
ir_binop_ubo_load,
/**
+ * Extract a scalar from a vector
+ *
+ * operand0 is the vector
+ * operand1 is the index of the field to read from operand0
+ */
+ ir_binop_vector_extract,
+
+ /**
* A sentinel marking the last of the binary operations.
*/
- ir_last_binop = ir_binop_ubo_load,
+ ir_last_binop = ir_binop_vector_extract,
ir_triop_lrp,
/**
+ * \name Second half of a lowered bitfieldInsert() operation.
+ *
+ * \see lower_instructions::bitfield_insert_to_bfm_bfi
+ */
+ /*@{*/
+ ir_triop_bfi,
+ /*@}*/
+
+ ir_triop_bitfield_extract,
+
+ /**
+ * Generate a value with one field of a vector changed
+ *
+ * operand0 is the vector
+ * operand1 is the value to write into the vector result
+ * operand2 is the index in operand0 to be modified
+ */
+ ir_triop_vector_insert,
+
+ /**
* A sentinel marking the last of the ternary operations.
*/
- ir_last_triop = ir_triop_lrp,
+ ir_last_triop = ir_triop_vector_insert,
+
+ ir_quadop_bitfield_insert,
ir_quadop_vector,
/**
+ * A sentinel marking the last of the ternary operations.
+ */
+ ir_last_quadop = ir_quadop_vector,
+
+ /**
* A sentinel marking the last of all operations.
*/
ir_last_opcode = ir_quadop_vector
@@ -1297,6 +1353,12 @@ protected:
{
ir_type = ir_type_unset;
}
+
+public:
+ virtual ir_jump *as_jump()
+ {
+ return this;
+ }
};
class ir_return : public ir_jump {
diff --git a/mesalib/src/glsl/ir_basic_block.cpp b/mesalib/src/glsl/ir_basic_block.cpp
index 86e0cf795..2cbc682d4 100644
--- a/mesalib/src/glsl/ir_basic_block.cpp
+++ b/mesalib/src/glsl/ir_basic_block.cpp
@@ -77,7 +77,7 @@ void call_for_basic_blocks(exec_list *instructions,
callback(leader, ir, data);
leader = NULL;
call_for_basic_blocks(&ir_loop->body_instructions, callback, data);
- } else if (ir->as_return() || ir->as_call()) {
+ } else if (ir->as_jump() || ir->as_call()) {
callback(leader, ir, data);
leader = NULL;
} else if ((ir_function = ir->as_function())) {
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index c09e56a3d..0a725b45b 100644
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -391,9 +391,17 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
}
if (op[1] != NULL)
- assert(op[0]->type->base_type == op[1]->type->base_type ||
- this->operation == ir_binop_lshift ||
- this->operation == ir_binop_rshift);
+ switch (this->operation) {
+ case ir_binop_lshift:
+ case ir_binop_rshift:
+ case ir_binop_vector_extract:
+ case ir_triop_bitfield_extract:
+ break;
+
+ default:
+ assert(op[0]->type->base_type == op[1]->type->base_type);
+ break;
+ }
bool op0_scalar = op[0]->type->is_scalar();
bool op1_scalar = op[1] != NULL && op[1]->type->is_scalar();
@@ -1230,6 +1238,29 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
}
break;
+ case ir_binop_vector_extract: {
+ const int c = CLAMP(op[1]->value.i[0], 0,
+ (int) op[0]->type->vector_elements - 1);
+
+ switch (op[0]->type->base_type) {
+ case GLSL_TYPE_UINT:
+ data.u[0] = op[0]->value.u[c];
+ break;
+ case GLSL_TYPE_INT:
+ data.i[0] = op[0]->value.i[c];
+ break;
+ case GLSL_TYPE_FLOAT:
+ data.f[0] = op[0]->value.f[c];
+ break;
+ case GLSL_TYPE_BOOL:
+ data.b[0] = op[0]->value.b[c];
+ break;
+ default:
+ assert(0);
+ }
+ break;
+ }
+
case ir_binop_bit_xor:
for (unsigned c = 0, c0 = 0, c1 = 0;
c < components;
@@ -1248,6 +1279,102 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
}
break;
+ case ir_unop_bitfield_reverse:
+ /* http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious */
+ for (unsigned c = 0; c < components; c++) {
+ unsigned int v = op[0]->value.u[c]; // input bits to be reversed
+ unsigned int r = v; // r will be reversed bits of v; first get LSB of v
+ int s = sizeof(v) * CHAR_BIT - 1; // extra shift needed at end
+
+ for (v >>= 1; v; v >>= 1) {
+ r <<= 1;
+ r |= v & 1;
+ s--;
+ }
+ r <<= s; // shift when v's highest bits are zero
+
+ data.u[c] = r;
+ }
+ break;
+
+ case ir_unop_bit_count:
+ for (unsigned c = 0; c < components; c++) {
+ unsigned count = 0;
+ unsigned v = op[0]->value.u[c];
+
+ for (; v; count++) {
+ v &= v - 1;
+ }
+ data.u[c] = count;
+ }
+ break;
+
+ case ir_unop_find_msb:
+ for (unsigned c = 0; c < components; c++) {
+ int v = op[0]->value.i[c];
+
+ if (v == 0 || (op[0]->type->base_type == GLSL_TYPE_INT && v == -1))
+ data.i[c] = -1;
+ else {
+ int count = 0;
+ int top_bit = op[0]->type->base_type == GLSL_TYPE_UINT
+ ? 0 : v & (1 << 31);
+
+ while (((v & (1 << 31)) == top_bit) && count != 32) {
+ count++;
+ v <<= 1;
+ }
+
+ data.i[c] = 31 - count;
+ }
+ }
+ break;
+
+ case ir_unop_find_lsb:
+ for (unsigned c = 0; c < components; c++) {
+ if (op[0]->value.i[c] == 0)
+ data.i[c] = -1;
+ else {
+ unsigned pos = 0;
+ unsigned v = op[0]->value.u[c];
+
+ for (; !(v & 1); v >>= 1) {
+ pos++;
+ }
+ data.u[c] = pos;
+ }
+ }
+ break;
+
+ case ir_triop_bitfield_extract: {
+ int offset = op[1]->value.i[0];
+ int bits = op[2]->value.i[0];
+
+ for (unsigned c = 0; c < components; c++) {
+ if (bits == 0)
+ data.u[c] = 0;
+ else if (offset < 0 || bits < 0)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else if (offset + bits > 32)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else {
+ if (op[0]->type->base_type == GLSL_TYPE_INT) {
+ /* int so that the right shift will sign-extend. */
+ int value = op[0]->value.i[c];
+ value <<= 32 - bits - offset;
+ value >>= 32 - bits;
+ data.i[c] = value;
+ } else {
+ unsigned value = op[0]->value.u[c];
+ value <<= 32 - bits - offset;
+ value >>= 32 - bits;
+ data.u[c] = value;
+ }
+ }
+ }
+ break;
+ }
+
case ir_triop_lrp: {
assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
assert(op[1]->type->base_type == GLSL_TYPE_FLOAT);
@@ -1261,6 +1388,58 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
break;
}
+ case ir_triop_vector_insert: {
+ const unsigned idx = op[2]->value.u[0];
+
+ memcpy(&data, &op[0]->value, sizeof(data));
+
+ switch (this->type->base_type) {
+ case GLSL_TYPE_INT:
+ data.i[idx] = op[1]->value.i[0];
+ break;
+ case GLSL_TYPE_UINT:
+ data.u[idx] = op[1]->value.u[0];
+ break;
+ case GLSL_TYPE_FLOAT:
+ data.f[idx] = op[1]->value.f[0];
+ break;
+ case GLSL_TYPE_BOOL:
+ data.b[idx] = op[1]->value.b[0];
+ break;
+ default:
+ assert(!"Should not get here.");
+ break;
+ }
+ break;
+ }
+
+ case ir_quadop_bitfield_insert: {
+ int offset = op[2]->value.i[0];
+ int bits = op[3]->value.i[0];
+
+ for (unsigned c = 0; c < components; c++) {
+ if (bits == 0)
+ data.u[c] = op[0]->value.u[c];
+ else if (offset < 0 || bits < 0)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else if (offset + bits > 32)
+ data.u[c] = 0; /* Undefined, per spec. */
+ else {
+ unsigned insert_mask = ((1 << bits) - 1) << offset;
+
+ unsigned insert = op[1]->value.u[c];
+ insert <<= offset;
+ insert &= insert_mask;
+
+ unsigned base = op[0]->value.u[c];
+ base &= ~insert_mask;
+
+ data.u[c] = base | insert;
+ }
+ }
+ break;
+ }
+
case ir_quadop_vector:
for (unsigned c = 0; c < this->type->vector_elements; c++) {
switch (this->type->base_type) {
diff --git a/mesalib/src/glsl/ir_optimization.h b/mesalib/src/glsl/ir_optimization.h
index a8885d722..d38d5e303 100644
--- a/mesalib/src/glsl/ir_optimization.h
+++ b/mesalib/src/glsl/ir_optimization.h
@@ -37,6 +37,7 @@
#define MOD_TO_FRACT 0x20
#define INT_DIV_TO_MUL_RCP 0x40
#define LRP_TO_ARITH 0x80
+#define BITFIELD_INSERT_TO_BFM_BFI 0x100
/**
* \see class lower_packing_builtins_visitor
@@ -65,7 +66,8 @@ enum lower_packing_builtins_op {
bool do_common_optimization(exec_list *ir, bool linked,
bool uniform_locations_assigned,
- unsigned max_unroll_iterations);
+ unsigned max_unroll_iterations,
+ const struct gl_shader_compiler_options *options);
bool do_algebraic(exec_list *instructions);
bool do_constant_folding(exec_list *instructions);
@@ -78,6 +80,7 @@ bool do_dead_code(exec_list *instructions, bool uniform_locations_assigned);
bool do_dead_code_local(exec_list *instructions);
bool do_dead_code_unlinked(exec_list *instructions);
bool do_dead_functions(exec_list *instructions);
+bool opt_flip_matrices(exec_list *instructions);
bool do_function_inlining(exec_list *instructions);
bool do_lower_jumps(exec_list *instructions, bool pull_out_jumps = true, bool lower_sub_return = true, bool lower_main_return = false, bool lower_continue = false, bool lower_break = false);
bool do_lower_texture_projection(exec_list *instructions);
@@ -106,6 +109,8 @@ void lower_ubo_reference(struct gl_shader *shader, exec_list *instructions);
void lower_packed_varyings(void *mem_ctx, unsigned location_base,
unsigned locations_used, ir_variable_mode mode,
gl_shader *shader);
+bool lower_vector_insert(exec_list *instructions, bool lower_nonconstant_index);
+void lower_named_interface_blocks(void *mem_ctx, gl_shader *shader);
bool optimize_redundant_jumps(exec_list *instructions);
bool optimize_split_arrays(exec_list *instructions, bool linked);
diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp
index 597d2813f..f01019c98 100644
--- a/mesalib/src/glsl/ir_print_visitor.cpp
+++ b/mesalib/src/glsl/ir_print_visitor.cpp
@@ -24,6 +24,7 @@
#include "ir_print_visitor.h"
#include "glsl_types.h"
#include "glsl_parser_extras.h"
+#include "main/macros.h"
#include "program/hash_table.h"
static void print_type(const glsl_type *t);
@@ -149,7 +150,9 @@ void ir_print_visitor::visit(ir_variable *ir)
const char *const mode[] = { "", "uniform ", "shader_in ", "shader_out ",
"in ", "out ", "inout ",
"const_in ", "sys ", "temporary " };
- const char *const interp[] = { "", "flat", "noperspective" };
+ STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count);
+ const char *const interp[] = { "", "smooth", "flat", "noperspective" };
+ STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_QUALIFIER_COUNT);
printf("(%s%s%s%s) ",
cent, inv, mode[ir->mode], interp[ir->interpolation]);
diff --git a/mesalib/src/glsl/ir_reader.cpp b/mesalib/src/glsl/ir_reader.cpp
index 16fdc41b4..b3667124f 100644
--- a/mesalib/src/glsl/ir_reader.cpp
+++ b/mesalib/src/glsl/ir_reader.cpp
@@ -676,16 +676,18 @@ ir_reader::read_expression(s_expression *expr)
{
s_expression *s_type;
s_symbol *s_op;
- s_expression *s_arg[3];
+ s_expression *s_arg[4] = {NULL};
s_pattern pat[] = { "expression", s_type, s_op, s_arg[0] };
if (!PARTIAL_MATCH(expr, pat)) {
ir_read_error(expr, "expected (expression <type> <operator> "
- "<operand> [<operand>])");
+ "<operand> [<operand>] [<operand>] [<operand>])");
return NULL;
}
s_arg[1] = (s_expression *) s_arg[0]->next; // may be tail sentinel
s_arg[2] = (s_expression *) s_arg[1]->next; // may be tail sentinel or NULL
+ if (s_arg[2])
+ s_arg[3] = (s_expression *) s_arg[2]->next; // may be tail sentinel or NULL
const glsl_type *type = read_type(s_type);
if (type == NULL)
@@ -709,7 +711,7 @@ ir_reader::read_expression(s_expression *expr)
return NULL;
}
- ir_rvalue *arg[3] = {NULL, NULL, NULL};
+ ir_rvalue *arg[4] = {NULL};
for (int i = 0; i < num_operands; i++) {
arg[i] = read_rvalue(s_arg[i]);
if (arg[i] == NULL) {
@@ -718,7 +720,7 @@ ir_reader::read_expression(s_expression *expr)
}
}
- return new(mem_ctx) ir_expression(op, type, arg[0], arg[1], arg[2]);
+ return new(mem_ctx) ir_expression(op, type, arg[0], arg[1], arg[2], arg[3]);
}
ir_swizzle *
diff --git a/mesalib/src/glsl/ir_uniform.h b/mesalib/src/glsl/ir_uniform.h
index 30e6f260d..8198c4819 100644
--- a/mesalib/src/glsl/ir_uniform.h
+++ b/mesalib/src/glsl/ir_uniform.h
@@ -99,15 +99,24 @@ struct gl_uniform_storage {
*/
bool initialized;
- /**
- * Base sampler index
- *
- * If \c ::base_type is \c GLSL_TYPE_SAMPLER, this represents the index of
- * this sampler. If \c ::array_elements is not zero, the array will use
- * sampler indexes \c ::sampler through \c ::sampler + \c ::array_elements
- * - 1, inclusive.
- */
- uint8_t sampler;
+ struct {
+ /**
+ * Base sampler index
+ *
+ * If \c ::base_type is \c GLSL_TYPE_SAMPLER, this represents the index
+ * of this sampler. If \c ::array_elements is not zero, the array will
+ * use sampler indices \c ::sampler through \c ::sampler +
+ * \c ::array_elements - 1, inclusive.
+ *
+ * Note that the index may be different in each shader stage.
+ */
+ uint8_t index;
+
+ /**
+ * Whether this sampler is used in this shader stage.
+ */
+ bool active;
+ } sampler[MESA_SHADER_TYPES];
/**
* Storage used by the driver for the uniform
diff --git a/mesalib/src/glsl/ir_validate.cpp b/mesalib/src/glsl/ir_validate.cpp
index 699c192cd..ce96f6855 100644
--- a/mesalib/src/glsl/ir_validate.cpp
+++ b/mesalib/src/glsl/ir_validate.cpp
@@ -69,6 +69,8 @@ public:
virtual ir_visitor_status visit_leave(ir_expression *ir);
virtual ir_visitor_status visit_leave(ir_swizzle *ir);
+ virtual ir_visitor_status visit_enter(class ir_dereference_array *);
+
virtual ir_visitor_status visit_enter(ir_assignment *ir);
virtual ir_visitor_status visit_enter(ir_call *ir);
@@ -102,6 +104,33 @@ ir_validate::visit(ir_dereference_variable *ir)
}
ir_visitor_status
+ir_validate::visit_enter(class ir_dereference_array *ir)
+{
+ if (!ir->array->type->is_array() && !ir->array->type->is_matrix()) {
+ printf("ir_dereference_array @ %p does not specify an array or a "
+ "matrix\n",
+ (void *) ir);
+ ir->print();
+ printf("\n");
+ abort();
+ }
+
+ if (!ir->array_index->type->is_scalar()) {
+ printf("ir_dereference_array @ %p does not have scalar index: %s\n",
+ (void *) ir, ir->array_index->type->name);
+ abort();
+ }
+
+ if (!ir->array_index->type->is_integer()) {
+ printf("ir_dereference_array @ %p does not have integer index: %s\n",
+ (void *) ir, ir->array_index->type->name);
+ abort();
+ }
+
+ return visit_continue;
+}
+
+ir_visitor_status
ir_validate::visit_enter(ir_if *ir)
{
if (ir->condition->type != glsl_type::bool_type) {
@@ -361,6 +390,19 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->operands[0]->type == glsl_type::uint_type);
break;
+ case ir_unop_bitfield_reverse:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->type->is_integer());
+ break;
+
+ case ir_unop_bit_count:
+ case ir_unop_find_msb:
+ case ir_unop_find_lsb:
+ assert(ir->operands[0]->type->vector_elements == ir->type->vector_elements);
+ assert(ir->operands[0]->type->is_integer());
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+
case ir_unop_noise:
/* XXX what can we assert here? */
break;
@@ -461,6 +503,12 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->operands[1]->type == glsl_type::float_type);
break;
+ case ir_binop_bfm:
+ assert(ir->type->is_integer());
+ assert(ir->operands[0]->type->is_integer());
+ assert(ir->operands[1]->type->is_integer());
+ break;
+
case ir_binop_ubo_load:
assert(ir->operands[0]->as_constant());
assert(ir->operands[0]->type == glsl_type::uint_type);
@@ -468,12 +516,46 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->operands[1]->type == glsl_type::uint_type);
break;
+ case ir_binop_vector_extract:
+ assert(ir->operands[0]->type->is_vector());
+ assert(ir->operands[1]->type->is_scalar()
+ && ir->operands[1]->type->is_integer());
+ break;
+
case ir_triop_lrp:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
assert(ir->operands[0]->type == ir->operands[1]->type);
assert(ir->operands[2]->type == ir->operands[0]->type || ir->operands[2]->type == glsl_type::float_type);
break;
+ case ir_triop_bfi:
+ assert(ir->operands[0]->type->is_integer());
+ assert(ir->operands[1]->type == ir->operands[2]->type);
+ assert(ir->operands[1]->type == ir->type);
+ break;
+
+ case ir_triop_bitfield_extract:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[1]->type == glsl_type::int_type);
+ assert(ir->operands[2]->type == glsl_type::int_type);
+ break;
+
+ case ir_triop_vector_insert:
+ assert(ir->operands[0]->type->is_vector());
+ assert(ir->operands[1]->type->is_scalar());
+ assert(ir->operands[0]->type->base_type == ir->operands[1]->type->base_type);
+ assert(ir->operands[2]->type->is_scalar()
+ && ir->operands[2]->type->is_integer());
+ assert(ir->type == ir->operands[0]->type);
+ break;
+
+ case ir_quadop_bitfield_insert:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[1]->type == ir->type);
+ assert(ir->operands[2]->type == glsl_type::int_type);
+ assert(ir->operands[3]->type == glsl_type::int_type);
+ break;
+
case ir_quadop_vector:
/* The vector operator collects some number of scalars and generates a
* vector from them.
diff --git a/mesalib/src/glsl/link_interface_blocks.cpp b/mesalib/src/glsl/link_interface_blocks.cpp
new file mode 100644
index 000000000..b91860d03
--- /dev/null
+++ b/mesalib/src/glsl/link_interface_blocks.cpp
@@ -0,0 +1,110 @@
+/*
+ * Copyright © 2013 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 link_interface_blocks.cpp
+ * Linker support for GLSL's interface blocks.
+ */
+
+#include "ir.h"
+#include "glsl_symbol_table.h"
+#include "linker.h"
+#include "main/macros.h"
+
+bool
+validate_intrastage_interface_blocks(const gl_shader **shader_list,
+ unsigned num_shaders)
+{
+ glsl_symbol_table interfaces;
+
+ for (unsigned int i = 0; i < num_shaders; i++) {
+ if (shader_list[i] == NULL)
+ continue;
+
+ foreach_list(node, shader_list[i]->ir) {
+ ir_variable *var = ((ir_instruction *) node)->as_variable();
+ if (!var)
+ continue;
+
+ const glsl_type *iface_type = var->interface_type;
+
+ if (iface_type == NULL)
+ continue;
+
+ const glsl_type *old_iface_type =
+ interfaces.get_interface(iface_type->name,
+ (enum ir_variable_mode) var->mode);
+
+ if (old_iface_type == NULL) {
+ /* This is the first time we've seen the interface, so save
+ * it into our symbol table.
+ */
+ interfaces.add_interface(iface_type->name, iface_type,
+ (enum ir_variable_mode) var->mode);
+ } else if (old_iface_type != iface_type) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+bool
+validate_interstage_interface_blocks(const gl_shader *producer,
+ const gl_shader *consumer)
+{
+ glsl_symbol_table interfaces;
+
+ /* Add non-output interfaces from the consumer to the symbol table. */
+ foreach_list(node, consumer->ir) {
+ ir_variable *var = ((ir_instruction *) node)->as_variable();
+ if (!var || !var->interface_type || var->mode == ir_var_shader_out)
+ continue;
+
+ interfaces.add_interface(var->interface_type->name,
+ var->interface_type,
+ (enum ir_variable_mode) var->mode);
+ }
+
+ /* Verify that the producer's interfaces match. */
+ foreach_list(node, producer->ir) {
+ ir_variable *var = ((ir_instruction *) node)->as_variable();
+ if (!var || !var->interface_type || var->mode == ir_var_shader_in)
+ continue;
+
+ enum ir_variable_mode consumer_mode =
+ var->mode == ir_var_uniform ? ir_var_uniform : ir_var_shader_in;
+ const glsl_type *expected_type =
+ interfaces.get_interface(var->interface_type->name, consumer_mode);
+
+ /* The consumer doesn't use this output block. Ignore it. */
+ if (expected_type == NULL)
+ continue;
+
+ if (var->interface_type != expected_type)
+ return false;
+ }
+
+ return true;
+}
diff --git a/mesalib/src/glsl/link_uniform_initializers.cpp b/mesalib/src/glsl/link_uniform_initializers.cpp
index 836a360fa..54d9bf1f5 100644
--- a/mesalib/src/glsl/link_uniform_initializers.cpp
+++ b/mesalib/src/glsl/link_uniform_initializers.cpp
@@ -138,8 +138,16 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
}
if (base_type == GLSL_TYPE_SAMPLER) {
- for (unsigned int i = 0; i < storage->array_elements; i++) {
- prog->SamplerUnits[storage->sampler + i] = storage->storage[i].i;
+ for (int sh = 0; sh < MESA_SHADER_TYPES; sh++) {
+ gl_shader *shader = prog->_LinkedShaders[sh];
+
+ if (shader && storage->sampler[sh].active) {
+ for (unsigned i = 0; i < storage->array_elements; i++) {
+ unsigned index = storage->sampler[sh].index + i;
+
+ shader->SamplerUnits[index] = storage->storage[i].i;
+ }
+ }
}
}
} else {
@@ -148,8 +156,17 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
val->type->base_type,
val->type->components());
- if (storage->type->is_sampler())
- prog->SamplerUnits[storage->sampler] = storage->storage[0].i;
+ if (storage->type->is_sampler()) {
+ for (int sh = 0; sh < MESA_SHADER_TYPES; sh++) {
+ gl_shader *shader = prog->_LinkedShaders[sh];
+
+ if (shader && storage->sampler[sh].active) {
+ unsigned index = storage->sampler[sh].index;
+
+ shader->SamplerUnits[index] = storage->storage[0].i;
+ }
+ }
+ }
}
storage->initialized = true;
diff --git a/mesalib/src/glsl/link_uniforms.cpp b/mesalib/src/glsl/link_uniforms.cpp
index efbb60c3a..65c06903a 100644
--- a/mesalib/src/glsl/link_uniforms.cpp
+++ b/mesalib/src/glsl/link_uniforms.cpp
@@ -263,15 +263,19 @@ public:
parcel_out_uniform_storage(struct string_to_uint_map *map,
struct gl_uniform_storage *uniforms,
union gl_constant_value *values)
- : map(map), uniforms(uniforms), next_sampler(0), values(values)
+ : map(map), uniforms(uniforms), values(values)
{
- memset(this->targets, 0, sizeof(this->targets));
}
- void start_shader()
+ void start_shader(gl_shader_type shader_type)
{
+ assert(shader_type < MESA_SHADER_TYPES);
+ this->shader_type = shader_type;
+
this->shader_samplers_used = 0;
this->shader_shadow_samplers = 0;
+ this->next_sampler = 0;
+ memset(this->targets, 0, sizeof(this->targets));
}
void set_and_process(struct gl_shader_program *prog,
@@ -335,8 +339,37 @@ public:
int ubo_block_index;
int ubo_byte_offset;
bool ubo_row_major;
+ gl_shader_type shader_type;
private:
+ void handle_samplers(const glsl_type *base_type,
+ struct gl_uniform_storage *uniform)
+ {
+ if (base_type->is_sampler()) {
+ uniform->sampler[shader_type].index = this->next_sampler;
+ uniform->sampler[shader_type].active = true;
+
+ /* Increment the sampler by 1 for non-arrays and by the number of
+ * array elements for arrays.
+ */
+ this->next_sampler +=
+ MAX2(1, uniform->array_elements);
+
+ const gl_texture_index target = base_type->sampler_index();
+ const unsigned shadow = base_type->sampler_shadow;
+ for (unsigned i = uniform->sampler[shader_type].index;
+ i < MIN2(this->next_sampler, MAX_SAMPLERS);
+ i++) {
+ this->targets[i] = target;
+ this->shader_samplers_used |= 1U << i;
+ this->shader_shadow_samplers |= shadow << i;
+ }
+ } else {
+ uniform->sampler[shader_type].index = ~0;
+ uniform->sampler[shader_type].active = false;
+ }
+ }
+
virtual void visit_field(const glsl_type *type, const char *name,
bool row_major)
{
@@ -354,31 +387,6 @@ private:
if (!found)
return;
- /* If there is already storage associated with this uniform, it means
- * that it was set while processing an earlier shader stage. For
- * example, we may be processing the uniform in the fragment shader, but
- * the uniform was already processed in the vertex shader.
- */
- if (this->uniforms[id].storage != NULL) {
- /* If the uniform already has storage set from another shader stage,
- * mark the samplers used for this shader stage.
- */
- if (type->contains_sampler()) {
- const unsigned count = MAX2(1, this->uniforms[id].array_elements);
- const unsigned shadow = (type->is_array())
- ? type->fields.array->sampler_shadow : type->sampler_shadow;
-
- for (unsigned i = 0; i < count; i++) {
- const unsigned s = this->uniforms[id].sampler + i;
-
- this->shader_samplers_used |= 1U << s;
- this->shader_shadow_samplers |= shadow << s;
- }
- }
-
- return;
- }
-
const glsl_type *base_type;
if (type->is_array()) {
this->uniforms[id].array_elements = type->length;
@@ -388,26 +396,16 @@ private:
base_type = type;
}
- if (base_type->is_sampler()) {
- this->uniforms[id].sampler = this->next_sampler;
+ /* This assigns sampler uniforms to sampler units. */
+ handle_samplers(base_type, &this->uniforms[id]);
- /* Increment the sampler by 1 for non-arrays and by the number of
- * array elements for arrays.
- */
- this->next_sampler += MAX2(1, this->uniforms[id].array_elements);
-
- const gl_texture_index target = base_type->sampler_index();
- const unsigned shadow = base_type->sampler_shadow;
- for (unsigned i = this->uniforms[id].sampler
- ; i < MIN2(this->next_sampler, MAX_SAMPLERS)
- ; i++) {
- this->targets[i] = target;
- this->shader_samplers_used |= 1U << i;
- this->shader_shadow_samplers |= shadow << i;
- }
-
- } else {
- this->uniforms[id].sampler = ~0;
+ /* If there is already storage associated with this uniform, it means
+ * that it was set while processing an earlier shader stage. For
+ * example, we may be processing the uniform in the fragment shader, but
+ * the uniform was already processed in the vertex shader.
+ */
+ if (this->uniforms[id].storage != NULL) {
+ return;
}
this->uniforms[id].name = ralloc_strdup(this->uniforms, name);
@@ -633,17 +631,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
prog->UniformHash = new string_to_uint_map;
}
- /* Uniforms that lack an initializer in the shader code have an initial
- * value of zero. This includes sampler uniforms.
- *
- * Page 24 (page 30 of the PDF) of the GLSL 1.20 spec says:
- *
- * "The link time initial value is either the value of the variable's
- * initializer, if present, or 0 if no initializer is present. Sampler
- * types cannot have initializers."
- */
- memset(prog->SamplerUnits, 0, sizeof(prog->SamplerUnits));
-
/* First pass: Count the uniform resources used by the user-defined
* uniforms. While this happens, each active uniform will have an index
* assigned to it.
@@ -656,6 +643,18 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
if (prog->_LinkedShaders[i] == NULL)
continue;
+ /* Uniforms that lack an initializer in the shader code have an initial
+ * value of zero. This includes sampler uniforms.
+ *
+ * Page 24 (page 30 of the PDF) of the GLSL 1.20 spec says:
+ *
+ * "The link time initial value is either the value of the variable's
+ * initializer, if present, or 0 if no initializer is present. Sampler
+ * types cannot have initializers."
+ */
+ memset(prog->_LinkedShaders[i]->SamplerUnits, 0,
+ sizeof(prog->_LinkedShaders[i]->SamplerUnits));
+
link_update_uniform_buffer_variables(prog->_LinkedShaders[i]);
/* Reset various per-shader target counts.
@@ -706,9 +705,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
if (prog->_LinkedShaders[i] == NULL)
continue;
- /* Reset various per-shader target counts.
- */
- parcel.start_shader();
+ parcel.start_shader((gl_shader_type)i);
foreach_list(node, prog->_LinkedShaders[i]->ir) {
ir_variable *const var = ((ir_instruction *) node)->as_variable();
@@ -726,10 +723,11 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
prog->_LinkedShaders[i]->active_samplers = parcel.shader_samplers_used;
prog->_LinkedShaders[i]->shadow_samplers = parcel.shader_shadow_samplers;
- }
- assert(sizeof(prog->SamplerTargets) == sizeof(parcel.targets));
- memcpy(prog->SamplerTargets, parcel.targets, sizeof(prog->SamplerTargets));
+ STATIC_ASSERT(sizeof(prog->_LinkedShaders[i]->SamplerTargets) == sizeof(parcel.targets));
+ memcpy(prog->_LinkedShaders[i]->SamplerTargets, parcel.targets,
+ sizeof(prog->_LinkedShaders[i]->SamplerTargets));
+ }
#ifndef NDEBUG
for (unsigned i = 0; i < num_user_uniforms; i++) {
diff --git a/mesalib/src/glsl/link_varyings.cpp b/mesalib/src/glsl/link_varyings.cpp
index 04c9fdd7c..34e3440d6 100644
--- a/mesalib/src/glsl/link_varyings.cpp
+++ b/mesalib/src/glsl/link_varyings.cpp
@@ -541,7 +541,7 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
class varying_matches
{
public:
- varying_matches(bool disable_varying_packing);
+ varying_matches(bool disable_varying_packing, bool consumer_is_fs);
~varying_matches();
void record(ir_variable *producer_var, ir_variable *consumer_var);
unsigned assign_locations();
@@ -621,11 +621,15 @@ private:
* it was allocated.
*/
unsigned matches_capacity;
+
+ const bool consumer_is_fs;
};
-varying_matches::varying_matches(bool disable_varying_packing)
- : disable_varying_packing(disable_varying_packing)
+varying_matches::varying_matches(bool disable_varying_packing,
+ bool consumer_is_fs)
+ : disable_varying_packing(disable_varying_packing),
+ consumer_is_fs(consumer_is_fs)
{
/* Note: this initial capacity is rather arbitrarily chosen to be large
* enough for many cases without wasting an unreasonable amount of space.
@@ -656,6 +660,10 @@ varying_matches::~varying_matches()
* If \c producer_var has already been paired up with a consumer_var, or
* producer_var is part of fixed pipeline functionality (and hence already has
* a location assigned), this function has no effect.
+ *
+ * Note: as a side effect this function may change the interpolation type of
+ * \c producer_var, but only when the change couldn't possibly affect
+ * rendering.
*/
void
varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
@@ -668,6 +676,25 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
return;
}
+ if ((consumer_var == NULL && producer_var->type->contains_integer()) ||
+ !consumer_is_fs) {
+ /* Since this varying is not being consumed by the fragment shader, its
+ * interpolation type varying cannot possibly affect rendering. Also,
+ * this variable is non-flat and is (or contains) an integer.
+ *
+ * lower_packed_varyings requires all integer varyings to flat,
+ * regardless of where they appear. We can trivially satisfy that
+ * requirement by changing the interpolation type to flat here.
+ */
+ producer_var->centroid = false;
+ producer_var->interpolation = INTERP_QUALIFIER_FLAT;
+
+ if (consumer_var) {
+ consumer_var->centroid = false;
+ consumer_var->interpolation = INTERP_QUALIFIER_FLAT;
+ }
+ }
+
if (this->num_matches == this->matches_capacity) {
this->matches_capacity *= 2;
this->matches = (match *)
@@ -960,11 +987,14 @@ assign_varying_locations(struct gl_context *ctx,
{
const unsigned producer_base = VARYING_SLOT_VAR0;
const unsigned consumer_base = VARYING_SLOT_VAR0;
- varying_matches matches(ctx->Const.DisableVaryingPacking);
+ varying_matches matches(ctx->Const.DisableVaryingPacking,
+ consumer && consumer->Type == GL_FRAGMENT_SHADER);
hash_table *tfeedback_candidates
= hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
hash_table *consumer_inputs
= hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
+ hash_table *consumer_interface_inputs
+ = hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
/* Operate in a total of three passes.
*
@@ -983,8 +1013,17 @@ assign_varying_locations(struct gl_context *ctx,
((ir_instruction *) node)->as_variable();
if ((input_var != NULL) && (input_var->mode == ir_var_shader_in)) {
- hash_table_insert(consumer_inputs, input_var,
- ralloc_strdup(mem_ctx, input_var->name));
+ if (input_var->interface_type != NULL) {
+ char *const iface_field_name =
+ ralloc_asprintf(mem_ctx, "%s.%s",
+ input_var->interface_type->name,
+ input_var->name);
+ hash_table_insert(consumer_interface_inputs, input_var,
+ iface_field_name);
+ } else {
+ hash_table_insert(consumer_inputs, input_var,
+ ralloc_strdup(mem_ctx, input_var->name));
+ }
}
}
}
@@ -998,8 +1037,19 @@ assign_varying_locations(struct gl_context *ctx,
tfeedback_candidate_generator g(mem_ctx, tfeedback_candidates);
g.process(output_var);
- ir_variable *input_var =
- (ir_variable *) hash_table_find(consumer_inputs, output_var->name);
+ ir_variable *input_var;
+ if (output_var->interface_type != NULL) {
+ char *const iface_field_name =
+ ralloc_asprintf(mem_ctx, "%s.%s",
+ output_var->interface_type->name,
+ output_var->name);
+ input_var =
+ (ir_variable *) hash_table_find(consumer_interface_inputs,
+ iface_field_name);
+ } else {
+ input_var =
+ (ir_variable *) hash_table_find(consumer_inputs, output_var->name);
+ }
if (input_var && input_var->mode != ir_var_shader_in)
input_var = NULL;
@@ -1019,6 +1069,7 @@ assign_varying_locations(struct gl_context *ctx,
if (matched_candidate == NULL) {
hash_table_dtor(tfeedback_candidates);
hash_table_dtor(consumer_inputs);
+ hash_table_dtor(consumer_interface_inputs);
return false;
}
@@ -1036,12 +1087,14 @@ assign_varying_locations(struct gl_context *ctx,
if (!tfeedback_decls[i].assign_location(ctx, prog)) {
hash_table_dtor(tfeedback_candidates);
hash_table_dtor(consumer_inputs);
+ hash_table_dtor(consumer_interface_inputs);
return false;
}
}
hash_table_dtor(tfeedback_candidates);
hash_table_dtor(consumer_inputs);
+ hash_table_dtor(consumer_interface_inputs);
if (ctx->Const.DisableVaryingPacking) {
/* Transform feedback code assumes varyings are packed, so if the driver
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index 2b30d2b65..982fe46bd 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -938,6 +938,12 @@ link_intrastage_shaders(void *mem_ctx,
if (!cross_validate_globals(prog, shader_list, num_shaders, false))
return NULL;
+ /* Check that interface blocks defined in multiple shaders are consistent.
+ */
+ if (!validate_intrastage_interface_blocks((const gl_shader **)shader_list,
+ num_shaders))
+ return NULL;
+
/* Check that uniform blocks between shaders for a stage agree. */
const int num_uniform_blocks =
link_uniform_blocks(mem_ctx, prog, shader_list, num_shaders,
@@ -1512,15 +1518,15 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
};
const unsigned max_samplers[MESA_SHADER_TYPES] = {
- ctx->Const.MaxVertexTextureImageUnits,
- ctx->Const.MaxTextureImageUnits,
- ctx->Const.MaxGeometryTextureImageUnits
+ ctx->Const.VertexProgram.MaxTextureImageUnits,
+ ctx->Const.FragmentProgram.MaxTextureImageUnits,
+ ctx->Const.GeometryProgram.MaxTextureImageUnits
};
const unsigned max_uniform_components[MESA_SHADER_TYPES] = {
ctx->Const.VertexProgram.MaxUniformComponents,
ctx->Const.FragmentProgram.MaxUniformComponents,
- 0 /* FINISHME: Geometry shaders. */
+ ctx->Const.GeometryProgram.MaxUniformComponents
};
const unsigned max_uniform_blocks[MESA_SHADER_TYPES] = {
@@ -1722,6 +1728,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
if (prog->_LinkedShaders[i] == NULL)
continue;
+ if (!validate_interstage_interface_blocks(prog->_LinkedShaders[prev],
+ prog->_LinkedShaders[i])) {
+ linker_error(prog, "interface block mismatch between shader stages\n");
+ goto done;
+ }
+
if (!cross_validate_outputs_to_inputs(prog,
prog->_LinkedShaders[prev],
prog->_LinkedShaders[i]))
@@ -1733,6 +1745,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
prog->LinkStatus = true;
}
+
+ for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (prog->_LinkedShaders[i] != NULL)
+ lower_named_interface_blocks(mem_ctx, prog->_LinkedShaders[i]);
+ }
+
/* Implement the GLSL 1.30+ rule for discard vs infinite loops Do
* it before optimization because we want most of the checks to get
* dropped thanks to constant propagation.
@@ -1767,7 +1785,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
unsigned max_unroll = ctx->ShaderCompilerOptions[i].MaxUnrollIterations;
- while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, max_unroll))
+ while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, max_unroll, &ctx->ShaderCompilerOptions[i]))
;
}
diff --git a/mesalib/src/glsl/linker.h b/mesalib/src/glsl/linker.h
index f1ce50ace..2fe2410c2 100644
--- a/mesalib/src/glsl/linker.h
+++ b/mesalib/src/glsl/linker.h
@@ -60,6 +60,14 @@ link_uniform_blocks(void *mem_ctx,
unsigned num_shaders,
struct gl_uniform_block **blocks_ret);
+bool
+validate_intrastage_interface_blocks(const gl_shader **shader_list,
+ unsigned num_shaders);
+
+bool
+validate_interstage_interface_blocks(const gl_shader *producer,
+ const gl_shader *consumer);
+
/**
* Class for processing all of the leaf fields of a variable that corresponds
* to a program resource.
diff --git a/mesalib/src/glsl/lower_clip_distance.cpp b/mesalib/src/glsl/lower_clip_distance.cpp
index 643807de8..d6cf94438 100644
--- a/mesalib/src/glsl/lower_clip_distance.cpp
+++ b/mesalib/src/glsl/lower_clip_distance.cpp
@@ -46,10 +46,11 @@
*/
#include "glsl_symbol_table.h"
-#include "ir_hierarchical_visitor.h"
+#include "ir_rvalue_visitor.h"
#include "ir.h"
+#include "program/prog_instruction.h" /* For WRITEMASK_* */
-class lower_clip_distance_visitor : public ir_hierarchical_visitor {
+class lower_clip_distance_visitor : public ir_rvalue_visitor {
public:
lower_clip_distance_visitor()
: progress(false), old_clip_distance_var(NULL),
@@ -59,11 +60,14 @@ public:
virtual ir_visitor_status visit(ir_variable *);
void create_indices(ir_rvalue*, ir_rvalue *&, ir_rvalue *&);
- virtual ir_visitor_status visit_leave(ir_dereference_array *);
virtual ir_visitor_status visit_leave(ir_assignment *);
void visit_new_assignment(ir_assignment *ir);
virtual ir_visitor_status visit_leave(ir_call *);
+ virtual void handle_rvalue(ir_rvalue **rvalue);
+
+ void fix_lhs(ir_assignment *);
+
bool progress;
/**
@@ -173,35 +177,70 @@ lower_clip_distance_visitor::create_indices(ir_rvalue *old_index,
}
-/**
- * Replace any expression that indexes into the gl_ClipDistance array with an
- * expression that indexes into one of the vec4's in gl_ClipDistanceMESA and
- * accesses the appropriate component.
- */
-ir_visitor_status
-lower_clip_distance_visitor::visit_leave(ir_dereference_array *ir)
+void
+lower_clip_distance_visitor::handle_rvalue(ir_rvalue **rv)
{
/* If the gl_ClipDistance var hasn't been declared yet, then
* there's no way this deref can refer to it.
*/
- if (!this->old_clip_distance_var)
- return visit_continue;
+ if (!this->old_clip_distance_var || *rv == NULL)
+ return;
+
+ ir_dereference_array *const array_deref = (*rv)->as_dereference_array();
+ if (array_deref == NULL)
+ return;
- ir_dereference_variable *old_var_ref = ir->array->as_dereference_variable();
+ /* Replace any expression that indexes into the gl_ClipDistance array
+ * with an expression that indexes into one of the vec4's in
+ * gl_ClipDistanceMESA and accesses the appropriate component.
+ */
+ ir_dereference_variable *old_var_ref =
+ array_deref->array->as_dereference_variable();
if (old_var_ref && old_var_ref->var == this->old_clip_distance_var) {
this->progress = true;
ir_rvalue *array_index;
ir_rvalue *swizzle_index;
- this->create_indices(ir->array_index, array_index, swizzle_index);
- void *mem_ctx = ralloc_parent(ir);
- ir->array = new(mem_ctx) ir_dereference_array(
- this->new_clip_distance_var, array_index);
- ir->array_index = swizzle_index;
- }
+ this->create_indices(array_deref->array_index, array_index, swizzle_index);
+ void *mem_ctx = ralloc_parent(array_deref);
- return visit_continue;
+ ir_dereference_array *const ClipDistanceMESA_deref =
+ new(mem_ctx) ir_dereference_array(this->new_clip_distance_var,
+ array_index);
+
+ ir_expression *const expr =
+ new(mem_ctx) ir_expression(ir_binop_vector_extract,
+ ClipDistanceMESA_deref,
+ swizzle_index);
+
+ *rv = expr;
+ }
}
+void
+lower_clip_distance_visitor::fix_lhs(ir_assignment *ir)
+{
+ if (ir->lhs->ir_type == ir_type_expression) {
+ void *mem_ctx = ralloc_parent(ir);
+ ir_expression *const expr = (ir_expression *) ir->lhs;
+
+ /* The expression must be of the form:
+ *
+ * (vector_extract gl_ClipDistanceMESA[i], j).
+ */
+ assert(expr->operation == ir_binop_vector_extract);
+ assert(expr->operands[0]->ir_type == ir_type_dereference_array);
+ assert(expr->operands[0]->type == glsl_type::vec4_type);
+
+ ir_dereference *const new_lhs = (ir_dereference *) expr->operands[0];
+ ir->rhs = new(mem_ctx) ir_expression(ir_triop_vector_insert,
+ glsl_type::vec4_type,
+ new_lhs->clone(mem_ctx, NULL),
+ ir->rhs,
+ expr->operands[1]);
+ ir->set_lhs(new_lhs);
+ ir->write_mask = WRITEMASK_XYZW;
+ }
+}
/**
* Replace any assignment having gl_ClipDistance (undereferenced) as its LHS
@@ -223,29 +262,50 @@ lower_clip_distance_visitor::visit_leave(ir_assignment *ir)
* each of them.
*
* Note: to unroll into element-by-element assignments, we need to make
- * clones of the LHS and RHS. This is only safe if the LHS and RHS are
- * side-effect free. Fortunately, we know that they are, because the
- * only kind of rvalue that can have side effects is an ir_call, and
- * ir_calls only appear (a) as a statement on their own, or (b) as the
- * RHS of an assignment that stores the result of the call in a
- * temporary variable.
+ * clones of the LHS and RHS. This is safe because expressions and
+ * l-values are side-effect free.
*/
void *ctx = ralloc_parent(ir);
int array_size = this->old_clip_distance_var->type->array_size();
for (int i = 0; i < array_size; ++i) {
ir_dereference_array *new_lhs = new(ctx) ir_dereference_array(
ir->lhs->clone(ctx, NULL), new(ctx) ir_constant(i));
- new_lhs->accept(this);
ir_dereference_array *new_rhs = new(ctx) ir_dereference_array(
ir->rhs->clone(ctx, NULL), new(ctx) ir_constant(i));
- new_rhs->accept(this);
- this->base_ir->insert_before(
- new(ctx) ir_assignment(new_lhs, new_rhs));
+ this->handle_rvalue((ir_rvalue **) &new_rhs);
+
+ /* Handle the LHS after creating the new assignment. This must
+ * happen in this order because handle_rvalue may replace the old LHS
+ * with an ir_expression of ir_binop_vector_extract. Since this is
+ * not a valide l-value, this will cause an assertion in the
+ * ir_assignment constructor to fail.
+ *
+ * If this occurs, replace the mangled LHS with a dereference of the
+ * vector, and replace the RHS with an ir_triop_vector_insert.
+ */
+ ir_assignment *const assign = new(ctx) ir_assignment(new_lhs, new_rhs);
+ this->handle_rvalue((ir_rvalue **) &assign->lhs);
+ this->fix_lhs(assign);
+
+ this->base_ir->insert_before(assign);
}
ir->remove();
+
+ return visit_continue;
}
- return visit_continue;
+ /* Handle the LHS as if it were an r-value. Normally
+ * rvalue_visit(ir_assignment *) only visits the RHS, but we need to lower
+ * expressions in the LHS as well.
+ *
+ * This may cause the LHS to get replaced with an ir_expression of
+ * ir_binop_vector_extract. If this occurs, replace it with a dereference
+ * of the vector, and replace the RHS with an ir_triop_vector_insert.
+ */
+ handle_rvalue((ir_rvalue **)&ir->lhs);
+ this->fix_lhs(ir);
+
+ return rvalue_visit(ir);
}
@@ -330,7 +390,7 @@ lower_clip_distance_visitor::visit_leave(ir_call *ir)
}
}
- return visit_continue;
+ return rvalue_visit(ir);
}
diff --git a/mesalib/src/glsl/lower_instructions.cpp b/mesalib/src/glsl/lower_instructions.cpp
index 1ce7b7c9d..d32ec80d6 100644
--- a/mesalib/src/glsl/lower_instructions.cpp
+++ b/mesalib/src/glsl/lower_instructions.cpp
@@ -38,6 +38,7 @@
* - LOG_TO_LOG2
* - MOD_TO_FRACT
* - LRP_TO_ARITH
+ * - BITFIELD_INSERT_TO_BFM_BFI
*
* SUB_TO_ADD_NEG:
* ---------------
@@ -84,6 +85,15 @@
* LRP_TO_ARITH:
* -------------
* Converts ir_triop_lrp to (op0 * (1.0f - op2)) + (op1 * op2).
+ *
+ * BITFIELD_INSERT_TO_BFM_BFI:
+ * ---------------------------
+ * Breaks ir_quadop_bitfield_insert into ir_binop_bfm (bitfield mask) and
+ * ir_triop_bfi (bitfield insert).
+ *
+ * Many GPUs implement the bitfieldInsert() built-in from ARB_gpu_shader_5
+ * with a pair of instructions.
+ *
*/
#include "main/core.h" /* for M_LOG2E */
@@ -114,6 +124,7 @@ private:
void pow_to_exp2(ir_expression *);
void log_to_log2(ir_expression *);
void lrp_to_arith(ir_expression *);
+ void bitfield_insert_to_bfm_bfi(ir_expression *);
};
/**
@@ -298,6 +309,29 @@ lower_instructions_visitor::lrp_to_arith(ir_expression *ir)
this->progress = true;
}
+void
+lower_instructions_visitor::bitfield_insert_to_bfm_bfi(ir_expression *ir)
+{
+ /* Translates
+ * ir_quadop_bitfield_insert base insert offset bits
+ * into
+ * ir_triop_bfi (ir_binop_bfm bits offset) insert base
+ */
+
+ ir_rvalue *base_expr = ir->operands[0];
+
+ ir->operation = ir_triop_bfi;
+ ir->operands[0] = new(ir) ir_expression(ir_binop_bfm,
+ ir->type->get_base_type(),
+ ir->operands[3],
+ ir->operands[2]);
+ /* ir->operands[1] is still the value to insert. */
+ ir->operands[2] = base_expr;
+ ir->operands[3] = NULL;
+
+ this->progress = true;
+}
+
ir_visitor_status
lower_instructions_visitor::visit_leave(ir_expression *ir)
{
@@ -339,6 +373,11 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
lrp_to_arith(ir);
break;
+ case ir_quadop_bitfield_insert:
+ if (lowering(BITFIELD_INSERT_TO_BFM_BFI))
+ bitfield_insert_to_bfm_bfi(ir);
+ break;
+
default:
return visit_continue;
}
diff --git a/mesalib/src/glsl/lower_named_interface_blocks.cpp b/mesalib/src/glsl/lower_named_interface_blocks.cpp
new file mode 100644
index 000000000..eba667a8b
--- /dev/null
+++ b/mesalib/src/glsl/lower_named_interface_blocks.cpp
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2013 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 lower_named_interface_blocks.cpp
+ *
+ * This lowering pass converts all interface blocks with instance names
+ * into interface blocks without an instance name.
+ *
+ * For example, the following shader:
+ *
+ * out block {
+ * float block_var;
+ * } inst_name;
+ *
+ * main()
+ * {
+ * inst_name.block_var = 0.0;
+ * }
+ *
+ * Is rewritten to:
+ *
+ * out block {
+ * float block_var;
+ * };
+ *
+ * main()
+ * {
+ * block_var = 0.0;
+ * }
+ *
+ * This takes place after the shader code has already been verified with
+ * the interface name in place.
+ *
+ * The linking phase will use the interface block name rather than the
+ * interface's instance name when linking interfaces.
+ *
+ * This modification to the ir allows our currently existing dead code
+ * elimination to work with interface blocks without changes.
+ */
+
+#include "glsl_symbol_table.h"
+#include "ir.h"
+#include "ir_optimization.h"
+#include "ir_rvalue_visitor.h"
+#include "program/hash_table.h"
+
+class flatten_named_interface_blocks_declarations : public ir_rvalue_visitor
+{
+public:
+ void * const mem_ctx;
+ hash_table *interface_namespace;
+
+ flatten_named_interface_blocks_declarations(void *mem_ctx)
+ : mem_ctx(mem_ctx)
+ {
+ }
+
+ void run(exec_list *instructions);
+
+ virtual ir_visitor_status visit_leave(ir_assignment *);
+ virtual void handle_rvalue(ir_rvalue **rvalue);
+};
+
+void
+flatten_named_interface_blocks_declarations::run(exec_list *instructions)
+{
+ interface_namespace = hash_table_ctor(0, hash_table_string_hash,
+ hash_table_string_compare);
+
+ /* First pass: adjust instance block variables with an instance name
+ * to not have an instance name.
+ *
+ * The interface block variables are stored in the interface_namespace
+ * hash table so they can be used in the second pass.
+ */
+ foreach_list_safe(node, instructions) {
+ ir_variable *var = ((ir_instruction *) node)->as_variable();
+ if (!var || !var->is_interface_instance())
+ continue;
+
+ /* It should be possible to handle uniforms during this pass,
+ * but, this will require changes to the other uniform block
+ * support code.
+ */
+ if (var->mode == ir_var_uniform)
+ continue;
+
+ const glsl_type * iface_t = var->type;
+ const glsl_type * array_t = NULL;
+ exec_node *insert_pos = var;
+
+ if (iface_t->is_array()) {
+ array_t = iface_t;
+ iface_t = array_t->fields.array;
+ }
+
+ assert (iface_t->is_interface());
+
+ for (unsigned i = 0; i < iface_t->length; i++) {
+ const char * field_name = iface_t->fields.structure[i].name;
+ char *iface_field_name =
+ ralloc_asprintf(mem_ctx, "%s.%s",
+ iface_t->name, field_name);
+
+ ir_variable *found_var =
+ (ir_variable *) hash_table_find(interface_namespace,
+ iface_field_name);
+ if (!found_var) {
+ ir_variable *new_var;
+ if (array_t == NULL) {
+ char *var_name =
+ ralloc_strdup(mem_ctx, iface_t->fields.structure[i].name);
+ new_var =
+ new(mem_ctx) ir_variable(iface_t->fields.structure[i].type,
+ var_name,
+ (ir_variable_mode) var->mode);
+ } else {
+ const glsl_type *new_array_type =
+ glsl_type::get_array_instance(
+ iface_t->fields.structure[i].type,
+ array_t->length);
+ char *var_name =
+ ralloc_asprintf(mem_ctx, "%s[%d]",
+ iface_t->fields.structure[i].name,
+ array_t->length);
+ new_var =
+ new(mem_ctx) ir_variable(new_array_type,
+ var_name,
+ (ir_variable_mode) var->mode);
+ }
+
+ new_var->interface_type = iface_t;
+ hash_table_insert(interface_namespace, new_var,
+ iface_field_name);
+ insert_pos->insert_after(new_var);
+ insert_pos = new_var;
+ }
+ }
+ var->remove();
+ }
+
+ /* Second pass: visit all ir_dereference_record instances, and if they
+ * reference an interface block, then flatten the refererence out.
+ */
+ visit_list_elements(this, instructions);
+ hash_table_dtor(interface_namespace);
+ interface_namespace = NULL;
+}
+
+ir_visitor_status
+flatten_named_interface_blocks_declarations::visit_leave(ir_assignment *ir)
+{
+ ir_dereference_record *lhs_rec = ir->lhs->as_dereference_record();
+ if (lhs_rec) {
+ ir_rvalue *lhs_rec_tmp = lhs_rec;
+ handle_rvalue(&lhs_rec_tmp);
+ if (lhs_rec_tmp != lhs_rec) {
+ ir->set_lhs(lhs_rec_tmp);
+ }
+ }
+ return rvalue_visit(ir);
+}
+
+void
+flatten_named_interface_blocks_declarations::handle_rvalue(ir_rvalue **rvalue)
+{
+ if (*rvalue == NULL)
+ return;
+
+ ir_dereference_record *ir = (*rvalue)->as_dereference_record();
+ if (ir == NULL)
+ return;
+
+ ir_variable *var = ir->variable_referenced();
+
+ if (!var->is_interface_instance())
+ return;
+
+ /* It should be possible to handle uniforms during this pass,
+ * but, this will require changes to the other uniform block
+ * support code.
+ */
+ if (var->mode == ir_var_uniform)
+ return;
+
+ if (var->interface_type != NULL) {
+ char *iface_field_name =
+ ralloc_asprintf(mem_ctx, "%s.%s", var->interface_type->name,
+ ir->field);
+ /* Find the variable in the set of flattened interface blocks */
+ ir_variable *found_var =
+ (ir_variable *) hash_table_find(interface_namespace,
+ iface_field_name);
+ assert(found_var);
+
+ ir_dereference_variable *deref_var =
+ new(mem_ctx) ir_dereference_variable(found_var);
+
+ ir_dereference_array *deref_array =
+ ir->record->as_dereference_array();
+ if (deref_array != NULL) {
+ *rvalue =
+ new(mem_ctx) ir_dereference_array(deref_var,
+ deref_array->array_index);
+ } else {
+ *rvalue = deref_var;
+ }
+ }
+}
+
+void
+lower_named_interface_blocks(void *mem_ctx, gl_shader *shader)
+{
+ flatten_named_interface_blocks_declarations v_decl(mem_ctx);
+ v_decl.run(shader->ir);
+}
+
diff --git a/mesalib/src/glsl/lower_packed_varyings.cpp b/mesalib/src/glsl/lower_packed_varyings.cpp
index b4cc5cd0d..cdf2289b4 100644
--- a/mesalib/src/glsl/lower_packed_varyings.cpp
+++ b/mesalib/src/glsl/lower_packed_varyings.cpp
@@ -178,6 +178,14 @@ lower_packed_varyings_visitor::run(exec_list *instructions)
!this->needs_lowering(var))
continue;
+ /* This lowering pass is only capable of packing floats and ints
+ * together when their interpolation mode is "flat". Therefore, to be
+ * safe, caller should ensure that integral varyings always use flat
+ * interpolation, even when this is not required by GLSL.
+ */
+ assert(var->interpolation == INTERP_QUALIFIER_FLAT ||
+ !var->type->contains_integer());
+
/* Change the old varying into an ordinary global. */
var->mode = ir_var_auto;
diff --git a/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp b/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp
index f85875f49..880859688 100644
--- a/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp
+++ b/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp
@@ -52,7 +52,12 @@ public:
progress = false;
}
- ir_rvalue *convert_vec_index_to_cond_assign(ir_rvalue *val);
+ ir_rvalue *convert_vec_index_to_cond_assign(void *mem_ctx,
+ ir_rvalue *orig_vector,
+ ir_rvalue *orig_index,
+ const glsl_type *type);
+
+ ir_rvalue *convert_vector_extract_to_cond_assign(ir_rvalue *ir);
virtual ir_visitor_status visit_enter(ir_expression *);
virtual ir_visitor_status visit_enter(ir_swizzle *);
@@ -65,24 +70,16 @@ public:
};
ir_rvalue *
-ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue *ir)
+ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(void *mem_ctx,
+ ir_rvalue *orig_vector,
+ ir_rvalue *orig_index,
+ const glsl_type *type)
{
- ir_dereference_array *orig_deref = ir->as_dereference_array();
ir_assignment *assign, *value_assign;
ir_variable *index, *var, *value;
ir_dereference *deref, *deref_value;
unsigned i;
- if (!orig_deref)
- return ir;
-
- if (orig_deref->array->type->is_matrix() ||
- orig_deref->array->type->is_array())
- return ir;
-
- void *mem_ctx = ralloc_parent(ir);
-
- assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
exec_list list;
@@ -92,19 +89,19 @@ ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue
ir_var_temporary);
list.push_tail(index);
deref = new(base_ir) ir_dereference_variable(index);
- assign = new(base_ir) ir_assignment(deref, orig_deref->array_index, NULL);
+ assign = new(base_ir) ir_assignment(deref, orig_index, NULL);
list.push_tail(assign);
/* Store the value inside a temp, thus avoiding matrixes duplication */
- value = new(base_ir) ir_variable(orig_deref->array->type, "vec_value_tmp",
- ir_var_temporary);
+ value = new(base_ir) ir_variable(orig_vector->type, "vec_value_tmp",
+ ir_var_temporary);
list.push_tail(value);
deref_value = new(base_ir) ir_dereference_variable(value);
- value_assign = new(base_ir) ir_assignment(deref_value, orig_deref->array);
+ value_assign = new(base_ir) ir_assignment(deref_value, orig_vector);
list.push_tail(value_assign);
/* Temporary where we store whichever value we swizzle out. */
- var = new(base_ir) ir_variable(ir->type, "vec_index_tmp_v",
+ var = new(base_ir) ir_variable(type, "vec_index_tmp_v",
ir_var_temporary);
list.push_tail(var);
@@ -113,13 +110,14 @@ ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue
*/
ir_rvalue *const cond_deref =
compare_index_block(&list, index, 0,
- orig_deref->array->type->vector_elements,
+ orig_vector->type->vector_elements,
mem_ctx);
/* Generate a conditional move of each vector element to the temp. */
- for (i = 0; i < orig_deref->array->type->vector_elements; i++) {
+ for (i = 0; i < orig_vector->type->vector_elements; i++) {
ir_rvalue *condition_swizzle =
- new(base_ir) ir_swizzle(cond_deref->clone(ir, NULL), i, 0, 0, 0, 1);
+ new(base_ir) ir_swizzle(cond_deref->clone(mem_ctx, NULL),
+ i, 0, 0, 0, 1);
/* Just clone the rest of the deref chain when trying to get at the
* underlying variable.
@@ -142,13 +140,27 @@ ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue
return new(base_ir) ir_dereference_variable(var);
}
+ir_rvalue *
+ir_vec_index_to_cond_assign_visitor::convert_vector_extract_to_cond_assign(ir_rvalue *ir)
+{
+ ir_expression *const expr = ir->as_expression();
+
+ if (expr == NULL || expr->operation != ir_binop_vector_extract)
+ return ir;
+
+ return convert_vec_index_to_cond_assign(ralloc_parent(ir),
+ expr->operands[0],
+ expr->operands[1],
+ ir->type);
+}
+
ir_visitor_status
ir_vec_index_to_cond_assign_visitor::visit_enter(ir_expression *ir)
{
unsigned int i;
for (i = 0; i < ir->get_num_operands(); i++) {
- ir->operands[i] = convert_vec_index_to_cond_assign(ir->operands[i]);
+ ir->operands[i] = convert_vector_extract_to_cond_assign(ir->operands[i]);
}
return visit_continue;
@@ -161,7 +173,7 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_swizzle *ir)
* the result of indexing a vector is. But maybe at some point we'll end up
* using swizzling of scalars for vector construction.
*/
- ir->val = convert_vec_index_to_cond_assign(ir->val);
+ ir->val = convert_vector_extract_to_cond_assign(ir->val);
return visit_continue;
}
@@ -169,91 +181,12 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_swizzle *ir)
ir_visitor_status
ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir)
{
- ir_variable *index, *var;
- ir_dereference_variable *deref;
- ir_assignment *assign;
- unsigned i;
-
- ir->rhs = convert_vec_index_to_cond_assign(ir->rhs);
- if (ir->condition)
- ir->condition = convert_vec_index_to_cond_assign(ir->condition);
-
- /* Last, handle the LHS */
- ir_dereference_array *orig_deref = ir->lhs->as_dereference_array();
-
- if (!orig_deref ||
- orig_deref->array->type->is_matrix() ||
- orig_deref->array->type->is_array())
- return visit_continue;
-
- void *mem_ctx = ralloc_parent(ir);
-
- assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
-
- exec_list list;
-
- /* Store the index to a temporary to avoid reusing its tree. */
- index = new(ir) ir_variable(glsl_type::int_type, "vec_index_tmp_i",
- ir_var_temporary);
- list.push_tail(index);
- deref = new(ir) ir_dereference_variable(index);
- assign = new(ir) ir_assignment(deref, orig_deref->array_index, NULL);
- list.push_tail(assign);
-
- /* Store the RHS to a temporary to avoid reusing its tree. */
- var = new(ir) ir_variable(ir->rhs->type, "vec_index_tmp_v",
- ir_var_temporary);
- list.push_tail(var);
- deref = new(ir) ir_dereference_variable(var);
- assign = new(ir) ir_assignment(deref, ir->rhs, NULL);
- list.push_tail(assign);
-
- /* Generate a single comparison condition "mask" for all of the components
- * in the vector.
- */
- ir_rvalue *const cond_deref =
- compare_index_block(&list, index, 0,
- orig_deref->array->type->vector_elements,
- mem_ctx);
+ ir->rhs = convert_vector_extract_to_cond_assign(ir->rhs);
- /* Generate a conditional move of each vector element to the temp. */
- for (i = 0; i < orig_deref->array->type->vector_elements; i++) {
- ir_rvalue *condition_swizzle =
- new(ir) ir_swizzle(cond_deref->clone(ir, NULL), i, 0, 0, 0, 1);
-
-
- /* Just clone the rest of the deref chain when trying to get at the
- * underlying variable.
- */
- ir_rvalue *swizzle =
- new(ir) ir_swizzle(orig_deref->array->clone(mem_ctx, NULL),
- i, 0, 0, 0, 1);
-
- deref = new(ir) ir_dereference_variable(var);
- assign = new(ir) ir_assignment(swizzle, deref, condition_swizzle);
- list.push_tail(assign);
+ if (ir->condition) {
+ ir->condition = convert_vector_extract_to_cond_assign(ir->condition);
}
- /* If the original assignment has a condition, respect that original
- * condition! This is acomplished by wrapping the new conditional
- * assignments in an if-statement that uses the original condition.
- */
- if (ir->condition != NULL) {
- /* No need to clone the condition because the IR that it hangs on is
- * going to be removed from the instruction sequence.
- */
- ir_if *if_stmt = new(mem_ctx) ir_if(ir->condition);
-
- list.move_nodes_to(&if_stmt->then_instructions);
- ir->insert_before(if_stmt);
- } else {
- ir->insert_before(&list);
- }
-
- ir->remove();
-
- this->progress = true;
-
return visit_continue;
}
@@ -262,7 +195,7 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_call *ir)
{
foreach_iter(exec_list_iterator, iter, *ir) {
ir_rvalue *param = (ir_rvalue *)iter.get();
- ir_rvalue *new_param = convert_vec_index_to_cond_assign(param);
+ ir_rvalue *new_param = convert_vector_extract_to_cond_assign(param);
if (new_param != param) {
param->replace_with(new_param);
@@ -276,7 +209,7 @@ ir_visitor_status
ir_vec_index_to_cond_assign_visitor::visit_enter(ir_return *ir)
{
if (ir->value) {
- ir->value = convert_vec_index_to_cond_assign(ir->value);
+ ir->value = convert_vector_extract_to_cond_assign(ir->value);
}
return visit_continue;
@@ -285,7 +218,7 @@ ir_vec_index_to_cond_assign_visitor::visit_enter(ir_return *ir)
ir_visitor_status
ir_vec_index_to_cond_assign_visitor::visit_enter(ir_if *ir)
{
- ir->condition = convert_vec_index_to_cond_assign(ir->condition);
+ ir->condition = convert_vector_extract_to_cond_assign(ir->condition);
return visit_continue;
}
diff --git a/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp b/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
index 264d6dc07..d5ad692c2 100644
--- a/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
@@ -46,7 +46,7 @@ public:
progress = false;
}
- ir_rvalue *convert_vec_index_to_swizzle(ir_rvalue *val);
+ ir_rvalue *convert_vector_extract_to_swizzle(ir_rvalue *val);
virtual ir_visitor_status visit_enter(ir_expression *);
virtual ir_visitor_status visit_enter(ir_swizzle *);
@@ -59,20 +59,14 @@ public:
};
ir_rvalue *
-ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
+ir_vec_index_to_swizzle_visitor::convert_vector_extract_to_swizzle(ir_rvalue *ir)
{
- ir_dereference_array *deref = ir->as_dereference_array();
- ir_constant *ir_constant;
-
- if (!deref)
- return ir;
-
- if (deref->array->type->is_matrix() || deref->array->type->is_array())
+ ir_expression *const expr = ir->as_expression();
+ if (expr == NULL || expr->operation != ir_binop_vector_extract)
return ir;
- assert(deref->array_index->type->base_type == GLSL_TYPE_INT);
- ir_constant = deref->array_index->constant_expression_value();
- if (!ir_constant)
+ ir_constant *const idx = expr->operands[1]->constant_expression_value();
+ if (idx == NULL)
return ir;
void *ctx = ralloc_parent(ir);
@@ -92,10 +86,10 @@ ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
* The ir_swizzle constructor gets angry if the index is negative or too
* large. For simplicity sake, just clamp the index to [0, size-1].
*/
- const int i = MIN2(MAX2(ir_constant->value.i[0], 0),
- ((int) deref->array->type->vector_elements - 1));
+ const int i = CLAMP(idx->value.i[0], 0,
+ (int) expr->operands[0]->type->vector_elements - 1);
- return new(ctx) ir_swizzle(deref->array, i, 0, 0, 0, 1);
+ return new(ctx) ir_swizzle(expr->operands[0], i, 0, 0, 0, 1);
}
ir_visitor_status
@@ -104,7 +98,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_expression *ir)
unsigned int i;
for (i = 0; i < ir->get_num_operands(); i++) {
- ir->operands[i] = convert_vec_index_to_swizzle(ir->operands[i]);
+ ir->operands[i] = convert_vector_extract_to_swizzle(ir->operands[i]);
}
return visit_continue;
@@ -117,7 +111,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_swizzle *ir)
* the result of indexing a vector is. But maybe at some point we'll end up
* using swizzling of scalars for vector construction.
*/
- ir->val = convert_vec_index_to_swizzle(ir->val);
+ ir->val = convert_vector_extract_to_swizzle(ir->val);
return visit_continue;
}
@@ -125,8 +119,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_swizzle *ir)
ir_visitor_status
ir_vec_index_to_swizzle_visitor::visit_enter(ir_assignment *ir)
{
- ir->set_lhs(convert_vec_index_to_swizzle(ir->lhs));
- ir->rhs = convert_vec_index_to_swizzle(ir->rhs);
+ ir->rhs = convert_vector_extract_to_swizzle(ir->rhs);
return visit_continue;
}
@@ -136,7 +129,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_call *ir)
{
foreach_iter(exec_list_iterator, iter, *ir) {
ir_rvalue *param = (ir_rvalue *)iter.get();
- ir_rvalue *new_param = convert_vec_index_to_swizzle(param);
+ ir_rvalue *new_param = convert_vector_extract_to_swizzle(param);
if (new_param != param) {
param->replace_with(new_param);
@@ -150,7 +143,7 @@ ir_visitor_status
ir_vec_index_to_swizzle_visitor::visit_enter(ir_return *ir)
{
if (ir->value) {
- ir->value = convert_vec_index_to_swizzle(ir->value);
+ ir->value = convert_vector_extract_to_swizzle(ir->value);
}
return visit_continue;
@@ -159,7 +152,7 @@ ir_vec_index_to_swizzle_visitor::visit_enter(ir_return *ir)
ir_visitor_status
ir_vec_index_to_swizzle_visitor::visit_enter(ir_if *ir)
{
- ir->condition = convert_vec_index_to_swizzle(ir->condition);
+ ir->condition = convert_vector_extract_to_swizzle(ir->condition);
return visit_continue;
}
diff --git a/mesalib/src/glsl/lower_vector_insert.cpp b/mesalib/src/glsl/lower_vector_insert.cpp
new file mode 100644
index 000000000..0e640cc32
--- /dev/null
+++ b/mesalib/src/glsl/lower_vector_insert.cpp
@@ -0,0 +1,139 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include "ir.h"
+#include "ir_builder.h"
+#include "ir_rvalue_visitor.h"
+#include "ir_optimization.h"
+
+using namespace ir_builder;
+
+class vector_insert_visitor : public ir_rvalue_visitor {
+public:
+ vector_insert_visitor(bool lower_nonconstant_index)
+ : progress(false), lower_nonconstant_index(lower_nonconstant_index)
+ {
+ factory.instructions = &factory_instructions;
+ }
+
+ virtual ~vector_insert_visitor()
+ {
+ assert(factory_instructions.is_empty());
+ }
+
+ virtual void handle_rvalue(ir_rvalue **rv);
+
+ ir_factory factory;
+ exec_list factory_instructions;
+ bool progress;
+ bool lower_nonconstant_index;
+};
+
+
+void
+vector_insert_visitor::handle_rvalue(ir_rvalue **rv)
+{
+ if (*rv == NULL || (*rv)->ir_type != ir_type_expression)
+ return;
+
+ ir_expression *const expr = (ir_expression *) *rv;
+
+ if (likely(expr->operation != ir_triop_vector_insert))
+ return;
+
+ factory.mem_ctx = ralloc_parent(expr);
+
+ ir_constant *const idx = expr->operands[2]->constant_expression_value();
+ if (idx != NULL) {
+ /* Replace (vector_insert (vec) (scalar) (index)) with a dereference of
+ * a new temporary. The new temporary gets assigned as
+ *
+ * t = vec
+ * t.mask = scalar
+ *
+ * where mask is the component selected by index.
+ */
+ ir_variable *const temp =
+ factory.make_temp(expr->operands[0]->type, "vec_tmp");
+
+ const int mask = 1 << idx->value.i[0];
+
+ factory.emit(assign(temp, expr->operands[0]));
+ factory.emit(assign(temp, expr->operands[1], mask));
+
+ this->progress = true;
+ *rv = new(factory.mem_ctx) ir_dereference_variable(temp);
+ } else if (this->lower_nonconstant_index) {
+ /* Replace (vector_insert (vec) (scalar) (index)) with a dereference of
+ * a new temporary. The new temporary gets assigned as
+ *
+ * t = vec
+ * if (index == 0)
+ * t.x = scalar
+ * if (index == 1)
+ * t.y = scalar
+ * if (index == 2)
+ * t.z = scalar
+ * if (index == 3)
+ * t.w = scalar
+ */
+ ir_variable *const temp =
+ factory.make_temp(expr->operands[0]->type, "vec_tmp");
+
+ ir_variable *const src_temp =
+ factory.make_temp(expr->operands[1]->type, "src_temp");
+
+ factory.emit(assign(temp, expr->operands[0]));
+ factory.emit(assign(src_temp, expr->operands[1]));
+
+ for (unsigned i = 0; i < expr->type->vector_elements; i++) {
+ ir_constant *const cmp_index =
+ new(factory.mem_ctx) ir_constant(int(i));
+
+ ir_variable *const cmp_result =
+ factory.make_temp(glsl_type::bool_type, "index_condition");
+
+ factory.emit(assign(cmp_result,
+ equal(expr->operands[2]->clone(factory.mem_ctx,
+ NULL),
+ cmp_index)));
+
+ factory.emit(if_tree(cmp_result,
+ assign(temp, src_temp, WRITEMASK_X << i)));
+ }
+
+ this->progress = true;
+ *rv = new(factory.mem_ctx) ir_dereference_variable(temp);
+ }
+
+ base_ir->insert_before(factory.instructions);
+}
+
+bool
+lower_vector_insert(exec_list *instructions, bool lower_nonconstant_index)
+{
+ vector_insert_visitor v(lower_nonconstant_index);
+
+ visit_list_elements(&v, instructions);
+
+ return v.progress;
+}
diff --git a/mesalib/src/glsl/main.cpp b/mesalib/src/glsl/main.cpp
index 7989680a2..768415169 100644
--- a/mesalib/src/glsl/main.cpp
+++ b/mesalib/src/glsl/main.cpp
@@ -185,9 +185,11 @@ compile_shader(struct gl_context *ctx, struct gl_shader *shader)
/* Optimization passes */
if (!state->error && !shader->ir->is_empty()) {
+ const struct gl_shader_compiler_options *opts =
+ &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)];
bool progress;
do {
- progress = do_common_optimization(shader->ir, false, false, 32);
+ progress = do_common_optimization(shader->ir, false, false, 32, opts);
} while (progress);
validate_ir_tree(shader->ir);
diff --git a/mesalib/src/glsl/opt_algebraic.cpp b/mesalib/src/glsl/opt_algebraic.cpp
index 70e016d22..d706a6ad1 100644
--- a/mesalib/src/glsl/opt_algebraic.cpp
+++ b/mesalib/src/glsl/opt_algebraic.cpp
@@ -186,12 +186,12 @@ ir_algebraic_visitor::swizzle_if_required(ir_expression *expr,
ir_rvalue *
ir_algebraic_visitor::handle_expression(ir_expression *ir)
{
- ir_constant *op_const[3] = {NULL, NULL, NULL};
- ir_expression *op_expr[3] = {NULL, NULL, NULL};
+ ir_constant *op_const[4] = {NULL, NULL, NULL, NULL};
+ ir_expression *op_expr[4] = {NULL, NULL, NULL, NULL};
ir_expression *temp;
unsigned int i;
- assert(ir->get_num_operands() <= 3);
+ assert(ir->get_num_operands() <= 4);
for (i = 0; i < ir->get_num_operands(); i++) {
if (ir->operands[i]->type->is_matrix())
return ir;
diff --git a/mesalib/src/glsl/opt_flip_matrices.cpp b/mesalib/src/glsl/opt_flip_matrices.cpp
new file mode 100644
index 000000000..497513fe8
--- /dev/null
+++ b/mesalib/src/glsl/opt_flip_matrices.cpp
@@ -0,0 +1,122 @@
+/*
+ * Copyright © 2013 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_flip_matrices.cpp
+ *
+ * Convert (matrix * vector) operations to (vector * matrixTranspose),
+ * which can be done using dot products rather than multiplies and adds.
+ * On some hardware, this is more efficient.
+ *
+ * This currently only does the conversion for built-in matrices which
+ * already have transposed equivalents. Namely, gl_ModelViewProjectionMatrix
+ * and gl_TextureMatrix.
+ */
+#include "ir.h"
+#include "ir_optimization.h"
+#include "main/macros.h"
+
+namespace {
+class matrix_flipper : public ir_hierarchical_visitor {
+public:
+ matrix_flipper(exec_list *instructions)
+ {
+ progress = false;
+ mvp_transpose = NULL;
+ texmat_transpose = NULL;
+
+ foreach_list(n, instructions) {
+ ir_instruction *ir = (ir_instruction *) n;
+ ir_variable *var = ir->as_variable();
+ if (!var)
+ continue;
+ if (strcmp(var->name, "gl_ModelViewProjectionMatrixTranspose") == 0)
+ mvp_transpose = var;
+ if (strcmp(var->name, "gl_TextureMatrixTranspose") == 0)
+ texmat_transpose = var;
+ }
+ }
+
+ ir_visitor_status visit_enter(ir_expression *ir);
+
+ bool progress;
+
+private:
+ ir_variable *mvp_transpose;
+ ir_variable *texmat_transpose;
+};
+}
+
+ir_visitor_status
+matrix_flipper::visit_enter(ir_expression *ir)
+{
+ if (ir->operation != ir_binop_mul ||
+ !ir->operands[0]->type->is_matrix() ||
+ !ir->operands[1]->type->is_vector())
+ return visit_continue;
+
+ ir_variable *mat_var = ir->operands[0]->variable_referenced();
+ if (!mat_var)
+ return visit_continue;
+
+ if (mvp_transpose &&
+ strcmp(mat_var->name, "gl_ModelViewProjectionMatrix") == 0) {
+ ir_dereference_variable *deref = ir->operands[0]->as_dereference_variable();
+ assert(deref && deref->var == mat_var);
+
+ void *mem_ctx = ralloc_parent(ir);
+
+ ir->operands[0] = ir->operands[1];
+ ir->operands[1] = new(mem_ctx) ir_dereference_variable(mvp_transpose);
+
+ progress = true;
+ } else if (texmat_transpose &&
+ strcmp(mat_var->name, "gl_TextureMatrix") == 0) {
+ ir_dereference_array *array_ref = ir->operands[0]->as_dereference_array();
+ assert(array_ref != NULL);
+ ir_dereference_variable *var_ref = array_ref->array->as_dereference_variable();
+ assert(var_ref && var_ref->var == mat_var);
+
+ ir->operands[0] = ir->operands[1];
+ ir->operands[1] = array_ref;
+
+ var_ref->var = texmat_transpose;
+
+ texmat_transpose->max_array_access =
+ MAX2(texmat_transpose->max_array_access, mat_var->max_array_access);
+
+ progress = true;
+ }
+
+ return visit_continue;
+}
+
+bool
+opt_flip_matrices(struct exec_list *instructions)
+{
+ matrix_flipper v(instructions);
+
+ visit_list_elements(&v, instructions);
+
+ return v.progress;
+}
diff --git a/mesalib/src/glsl/opt_if_simplification.cpp b/mesalib/src/glsl/opt_if_simplification.cpp
index e1a23d94a..db59b131d 100644
--- a/mesalib/src/glsl/opt_if_simplification.cpp
+++ b/mesalib/src/glsl/opt_if_simplification.cpp
@@ -25,7 +25,8 @@
* \file opt_if_simplification.cpp
*
* Moves constant branches of if statements out to the surrounding
- * instruction stream.
+ * instruction stream, and inverts if conditionals to avoid empty
+ * "then" blocks.
*/
#include "ir.h"
@@ -101,6 +102,30 @@ ir_if_simplification_visitor::visit_leave(ir_if *ir)
}
ir->remove();
this->made_progress = true;
+ return visit_continue;
+ }
+
+ /* Turn:
+ *
+ * if (cond) {
+ * } else {
+ * do_work();
+ * }
+ *
+ * into :
+ *
+ * if (!cond)
+ * do_work();
+ *
+ * which avoids control flow for "else" (which is usually more
+ * expensive than normal operations), and the "not" can usually be
+ * folded into the generation of "cond" anyway.
+ */
+ if (ir->then_instructions.is_empty()) {
+ ir->condition = new(ralloc_parent(ir->condition))
+ ir_expression(ir_unop_logic_not, ir->condition);
+ ir->else_instructions.move_nodes_to(&ir->then_instructions);
+ this->made_progress = true;
}
return visit_continue;
diff --git a/mesalib/src/glsl/program.h b/mesalib/src/glsl/program.h
index 46ce9dccc..6a76d4d54 100644
--- a/mesalib/src/glsl/program.h
+++ b/mesalib/src/glsl/program.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/core.h"
diff --git a/mesalib/src/glsl/ralloc.c b/mesalib/src/glsl/ralloc.c
index 59e71c48b..e79dad764 100644
--- a/mesalib/src/glsl/ralloc.c
+++ b/mesalib/src/glsl/ralloc.c
@@ -107,9 +107,13 @@ void *
ralloc_size(const void *ctx, size_t size)
{
void *block = calloc(1, size + sizeof(ralloc_header));
+ ralloc_header *info;
+ ralloc_header *parent;
- ralloc_header *info = (ralloc_header *) block;
- ralloc_header *parent = ctx != NULL ? get_header(ctx) : NULL;
+ if (unlikely(block == NULL))
+ return NULL;
+ info = (ralloc_header *) block;
+ parent = ctx != NULL ? get_header(ctx) : NULL;
add_child(parent, info);
diff --git a/mesalib/src/glsl/standalone_scaffolding.cpp b/mesalib/src/glsl/standalone_scaffolding.cpp
index 0c1f52f48..11cd6cdc0 100644
--- a/mesalib/src/glsl/standalone_scaffolding.cpp
+++ b/mesalib/src/glsl/standalone_scaffolding.cpp
@@ -104,6 +104,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.ARB_texture_cube_map_array = true;
ctx->Extensions.ARB_texture_multisample = true;
ctx->Extensions.ARB_texture_query_lod = true;
+ ctx->Extensions.ARB_gpu_shader5 = true;
ctx->Const.GLSLVersion = 120;
@@ -116,10 +117,22 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Const.VertexProgram.MaxUniformComponents = 512;
ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */
- ctx->Const.MaxVertexTextureImageUnits = 0;
+ ctx->Const.VertexProgram.MaxTextureImageUnits = 0;
ctx->Const.MaxCombinedTextureImageUnits = 2;
- ctx->Const.MaxTextureImageUnits = 2;
+ ctx->Const.FragmentProgram.MaxTextureImageUnits = 2;
ctx->Const.FragmentProgram.MaxUniformComponents = 64;
ctx->Const.MaxDrawBuffers = 1;
+
+ /* Set up default shader compiler options. */
+ struct gl_shader_compiler_options options;
+ memset(&options, 0, sizeof(options));
+ options.MaxUnrollIterations = 32;
+ options.MaxIfDepth = UINT_MAX;
+
+ /* Default pragma settings */
+ options.DefaultPragmas.Optimize = true;
+
+ for (int sh = 0; sh < MESA_SHADER_TYPES; ++sh)
+ memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
}
diff --git a/mesalib/src/glsl/standalone_scaffolding.h b/mesalib/src/glsl/standalone_scaffolding.h
index 0a2cde8a3..7afb1c313 100644
--- a/mesalib/src/glsl/standalone_scaffolding.h
+++ b/mesalib/src/glsl/standalone_scaffolding.h
@@ -31,6 +31,7 @@
#ifndef STANDALONE_SCAFFOLDING_H
#define STANDALONE_SCAFFOLDING_H
+#include <assert.h>
#include "main/mtypes.h"
extern "C" void
@@ -47,6 +48,22 @@ extern "C" void
_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg, int len);
+static inline gl_shader_type
+_mesa_shader_type_to_index(GLenum v)
+{
+ switch (v) {
+ case GL_VERTEX_SHADER:
+ return MESA_SHADER_VERTEX;
+ case GL_FRAGMENT_SHADER:
+ return MESA_SHADER_FRAGMENT;
+ case GL_GEOMETRY_SHADER:
+ return MESA_SHADER_GEOMETRY;
+ default:
+ assert(!"bad value in _mesa_shader_type_to_index()");
+ return MESA_SHADER_TYPES;
+ }
+}
+
/**
* Initialize the given gl_context structure to a reasonable set of
* defaults representing the minimum capabilities required by the
diff --git a/mesalib/src/glsl/test_optpass.cpp b/mesalib/src/glsl/test_optpass.cpp
index 117b0b006..fc10cbbde 100644
--- a/mesalib/src/glsl/test_optpass.cpp
+++ b/mesalib/src/glsl/test_optpass.cpp
@@ -54,7 +54,8 @@ static string read_stdin_to_eof()
}
static GLboolean
-do_optimization(struct exec_list *ir, const char *optimization)
+do_optimization(struct exec_list *ir, const char *optimization,
+ const struct gl_shader_compiler_options *options)
{
int int_0;
int int_1;
@@ -64,7 +65,7 @@ do_optimization(struct exec_list *ir, const char *optimization)
if (sscanf(optimization, "do_common_optimization ( %d , %d ) ",
&int_0, &int_1) == 2) {
- return do_common_optimization(ir, int_0 != 0, false, int_1);
+ return do_common_optimization(ir, int_0 != 0, false, int_1, options);
} else if (strcmp(optimization, "do_algebraic") == 0) {
return do_algebraic(ir);
} else if (strcmp(optimization, "do_constant_folding") == 0) {
@@ -141,7 +142,8 @@ do_optimization(struct exec_list *ir, const char *optimization)
static GLboolean
do_optimization_passes(struct exec_list *ir, char **optimizations,
- int num_optimizations, bool quiet)
+ int num_optimizations, bool quiet,
+ const struct gl_shader_compiler_options *options)
{
GLboolean overall_progress = false;
@@ -150,7 +152,7 @@ do_optimization_passes(struct exec_list *ir, char **optimizations,
if (!quiet) {
printf("*** Running optimization %s...", optimization);
}
- GLboolean progress = do_optimization(ir, optimization);
+ GLboolean progress = do_optimization(ir, optimization, options);
if (!quiet) {
printf("%s\n", progress ? "progress" : "no progress");
}
@@ -240,9 +242,11 @@ int test_optpass(int argc, char **argv)
/* Optimization passes */
if (!state->error) {
GLboolean progress;
+ const struct gl_shader_compiler_options *options =
+ &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader_type)];
do {
progress = do_optimization_passes(shader->ir, &argv[optind],
- argc - optind, quiet != 0);
+ argc - optind, quiet != 0, options);
} while (loop && progress);
}
diff --git a/mesalib/src/mapi/Android.mk b/mesalib/src/mapi/Android.mk
index d1749a262..f10437874 100644
--- a/mesalib/src/mapi/Android.mk
+++ b/mesalib/src/mapi/Android.mk
@@ -36,12 +36,12 @@ include $(CLEAR_VARS)
abi_header := shared-glapi/glapi_mapi_tmp.h
LOCAL_SRC_FILES := \
- mapi/entry.c \
- mapi/mapi_glapi.c \
- mapi/stub.c \
- mapi/table.c \
- mapi/u_current.c \
- mapi/u_execmem.c
+ entry.c \
+ mapi_glapi.c \
+ stub.c \
+ table.c \
+ u_current.c \
+ u_execmem.c
LOCAL_CFLAGS := \
-DMAPI_MODE_GLAPI \
@@ -68,9 +68,9 @@ include $(BUILD_SHARED_LIBRARY)
mapi_abi_deps := \
$(wildcard $(LOCAL_PATH)/glapi/gen/*.py) \
$(wildcard $(LOCAL_PATH)/glapi/gen/*.xml) \
- $(LOCAL_PATH)/mapi/mapi_abi.py
+ $(LOCAL_PATH)/mapi_abi.py
-$(mapi_abi_headers): PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/mapi/mapi_abi.py
+$(mapi_abi_headers): PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/mapi_abi.py
$(mapi_abi_headers): PRIVATE_APIXML := $(LOCAL_PATH)/glapi/gen/gl_and_es_API.xml
$(mapi_abi_headers): $(mapi_abi_deps)
@mkdir -p $(dir $@)
diff --git a/mesalib/src/gallium/Makefile.am b/mesalib/src/mapi/Makefile.am
index e7cff8920..ef538039b 100644
--- a/mesalib/src/gallium/Makefile.am
+++ b/mesalib/src/mapi/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2012 Intel Corporation
+# Copyright © 2013 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -19,4 +19,24 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = $(GALLIUM_DIRS)
+SUBDIRS = glapi/gen
+
+if HAVE_SHARED_GLAPI
+SUBDIRS += shared-glapi
+endif
+
+if HAVE_OPENGL
+SUBDIRS += glapi
+endif
+
+if HAVE_OPENGL_ES1
+SUBDIRS += es1api
+endif
+
+if HAVE_OPENGL_ES2
+SUBDIRS += es2api
+endif
+
+if HAVE_OPENVG
+SUBDIRS += vgapi
+endif
diff --git a/mesalib/src/mapi/mapi/sources.mak b/mesalib/src/mapi/Makefile.sources
index 56f4afd3e..aff465a60 100644
--- a/mesalib/src/mapi/mapi/sources.mak
+++ b/mesalib/src/mapi/Makefile.sources
@@ -1,4 +1,4 @@
-# src/mapi/mapi/sources.mak
+# src/mapi/Makefile.sources
#
# mapi may be used in several ways
#
@@ -15,22 +15,22 @@
# this mode, compile MAPI_BRIDGE_FILES with MAPI_MODE_BRIDGE defined.
MAPI_UTIL_FILES = \
- $(TOP)/src/mapi/mapi/u_current.c \
- $(TOP)/src/mapi/mapi/u_execmem.c
+ $(TOP)/src/mapi/u_current.c \
+ $(TOP)/src/mapi/u_execmem.c
MAPI_FILES = \
- $(TOP)/src/mapi/mapi/entry.c \
- $(TOP)/src/mapi/mapi/mapi.c \
- $(TOP)/src/mapi/mapi/stub.c \
- $(TOP)/src/mapi/mapi/table.c \
+ $(TOP)/src/mapi/entry.c \
+ $(TOP)/src/mapi/mapi.c \
+ $(TOP)/src/mapi/stub.c \
+ $(TOP)/src/mapi/table.c \
$(MAPI_UTIL_FILES)
MAPI_GLAPI_FILES = \
- $(TOP)/src/mapi/mapi/entry.c \
- $(TOP)/src/mapi/mapi/mapi_glapi.c \
- $(TOP)/src/mapi/mapi/stub.c \
- $(TOP)/src/mapi/mapi/table.c \
+ $(TOP)/src/mapi/entry.c \
+ $(TOP)/src/mapi/mapi_glapi.c \
+ $(TOP)/src/mapi/stub.c \
+ $(TOP)/src/mapi/table.c \
$(MAPI_UTIL_FILES)
MAPI_BRIDGE_FILES = \
- $(TOP)/src/mapi/mapi/entry.c
+ $(TOP)/src/mapi/entry.c
diff --git a/mesalib/src/mapi/mapi/entry.c b/mesalib/src/mapi/entry.c
index 3d9168a72..3d9168a72 100644
--- a/mesalib/src/mapi/mapi/entry.c
+++ b/mesalib/src/mapi/entry.c
diff --git a/mesalib/src/mapi/mapi/entry.h b/mesalib/src/mapi/entry.h
index 9df810004..9df810004 100644
--- a/mesalib/src/mapi/mapi/entry.h
+++ b/mesalib/src/mapi/entry.h
diff --git a/mesalib/src/mapi/mapi/entry_x86-64_tls.h b/mesalib/src/mapi/entry_x86-64_tls.h
index 72d4125a6..36cad00c2 100644
--- a/mesalib/src/mapi/mapi/entry_x86-64_tls.h
+++ b/mesalib/src/mapi/entry_x86-64_tls.h
@@ -28,19 +28,6 @@
#include "u_macros.h"
-#ifdef __linux__
-__asm__(".section .note.ABI-tag, \"a\"\n\t"
- ".p2align 2\n\t"
- ".long 1f - 0f\n\t" /* name length */
- ".long 3f - 2f\n\t" /* data length */
- ".long 1\n\t" /* note length */
- "0: .asciz \"GNU\"\n\t" /* vendor name */
- "1: .p2align 2\n\t"
- "2: .long 0\n\t" /* note data: the ABI tag */
- ".long 2,4,20\n\t" /* Minimum kernel version w/TLS */
- "3: .p2align 2\n\t"); /* pad out section */
-#endif /* __linux__ */
-
__asm__(".text\n"
".balign 32\n"
"x86_64_entry_start:");
diff --git a/mesalib/src/mapi/mapi/entry_x86_tls.h b/mesalib/src/mapi/entry_x86_tls.h
index de918128e..58d09caa6 100644
--- a/mesalib/src/mapi/mapi/entry_x86_tls.h
+++ b/mesalib/src/mapi/entry_x86_tls.h
@@ -29,19 +29,6 @@
#include <string.h>
#include "u_macros.h"
-#ifdef __linux__
-__asm__(".section .note.ABI-tag, \"a\"\n\t"
- ".p2align 2\n\t"
- ".long 1f - 0f\n\t" /* name length */
- ".long 3f - 2f\n\t" /* data length */
- ".long 1\n\t" /* note length */
- "0: .asciz \"GNU\"\n\t" /* vendor name */
- "1: .p2align 2\n\t"
- "2: .long 0\n\t" /* note data: the ABI tag */
- ".long 2,4,20\n\t" /* Minimum kernel version w/TLS */
- "3: .p2align 2\n\t"); /* pad out section */
-#endif /* __linux__ */
-
__asm__(".text");
__asm__("x86_current_tls:\n\t"
diff --git a/mesalib/src/mapi/mapi/entry_x86_tsd.h b/mesalib/src/mapi/entry_x86_tsd.h
index c479c199e..c479c199e 100644
--- a/mesalib/src/mapi/mapi/entry_x86_tsd.h
+++ b/mesalib/src/mapi/entry_x86_tsd.h
diff --git a/mesalib/src/mapi/glapi/Makefile.am b/mesalib/src/mapi/glapi/Makefile.am
index bdb527d5c..1698d1474 100644
--- a/mesalib/src/mapi/glapi/Makefile.am
+++ b/mesalib/src/mapi/glapi/Makefile.am
@@ -20,8 +20,8 @@
# IN THE SOFTWARE.
TOP = $(top_srcdir)
-include sources.mak
-include ../mapi/sources.mak
+include Makefile.sources
+include ../Makefile.sources
AM_CPPFLAGS = \
$(DEFINES) \
diff --git a/mesalib/src/mapi/glapi/sources.mak b/mesalib/src/mapi/glapi/Makefile.sources
index aa8a4d40a..58d28c52c 100644
--- a/mesalib/src/mapi/glapi/sources.mak
+++ b/mesalib/src/mapi/glapi/Makefile.sources
@@ -1,4 +1,4 @@
-# src/mapi/glapi/sources.mak
+# src/mapi/glapi/Makefile.sources
GLAPI_SOURCES = \
glapi_dispatch.c \
diff --git a/mesalib/src/mapi/glapi/SConscript b/mesalib/src/mapi/glapi/SConscript
index 00cce3e7f..c4ac080aa 100644
--- a/mesalib/src/mapi/glapi/SConscript
+++ b/mesalib/src/mapi/glapi/SConscript
@@ -43,13 +43,14 @@ mapi_sources = [
'u_execmem.c',
]
for s in mapi_sources:
- o = env.SharedObject(s[:-2], '../mapi/' + s)
+ o = env.SharedObject(s[:-2], '../' + s)
glapi_sources.append(o)
#
# Assembly sources
#
-if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows'):
+if (env['gcc'] or env['clang']) and \
+ env['platform'] not in ('cygwin', 'darwin', 'windows'):
GLAPI = '#src/mapi/glapi/'
if env['machine'] == 'x86':
@@ -94,11 +95,6 @@ if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows'):
else:
pass
-if env['toolchain'] == 'crossmingw':
- # compile these files without -gstabs option
- glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c")
- glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c")
-
glapi = env.ConvenienceLibrary(
target = 'glapi',
source = glapi_sources,
diff --git a/mesalib/src/mapi/glapi/gen/GL3x.xml b/mesalib/src/mapi/glapi/gen/GL3x.xml
index 1e959cc2b..11c5a186c 100644
--- a/mesalib/src/mapi/glapi/gen/GL3x.xml
+++ b/mesalib/src/mapi/glapi/gen/GL3x.xml
@@ -428,26 +428,26 @@
<function name="Uniform1uiv" es2="3.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLuint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLuint *" count="count"/>
</function>
<function name="Uniform2uiv" es2="3.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLuint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLuint *" count="count" count_scale="2"/>
</function>
<function name="Uniform3uiv" es2="3.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLuint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLuint *" count="count" count_scale="3"/>
</function>
<function name="Uniform4uiv" es2="3.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLuint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLuint *" count="count" count_scale="4"/>
</function>
<!-- These functions alias ones from GL_EXT_texture_integer -->
@@ -611,7 +611,7 @@
<param name="params" type="GLint64 *"/>
</function>
- <function name="FramebufferTexture" offset="assign" exec="skip">
+ <function name="FramebufferTexture" offset="assign">
<param name="target" type="GLenum"/>
<param name="attachment" type="GLenum"/>
<param name="texture" type="GLuint"/>
diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am
index 36e47e21e..97200598e 100644
--- a/mesalib/src/mapi/glapi/gen/Makefile.am
+++ b/mesalib/src/mapi/glapi/gen/Makefile.am
@@ -20,7 +20,7 @@ XORG_INDENT_FLAGS = -linux -bad -bap -blf -bli0 -cbi0 -cdw -nce -cs -i4 -lc80 -p
MESA_DIR = $(top_srcdir)/src/mesa
MESA_GLAPI_DIR = $(top_srcdir)/src/mapi/glapi
-MESA_MAPI_DIR = $(top_srcdir)/src/mapi/mapi
+MESA_MAPI_DIR = $(top_srcdir)/src/mapi
MESA_GLX_DIR = $(top_srcdir)/src/glx
MESA_GLAPI_OUTPUTS = \
diff --git a/mesalib/src/mapi/glapi/gen/es_EXT.xml b/mesalib/src/mapi/glapi/gen/es_EXT.xml
index ff378acf1..f412333df 100644
--- a/mesalib/src/mapi/glapi/gen/es_EXT.xml
+++ b/mesalib/src/mapi/glapi/gen/es_EXT.xml
@@ -689,22 +689,25 @@
<!-- 71. GL_OES_vertex_array_object -->
<category name="GL_OES_vertex_array_object" number="71">
- <function name="BindVertexArrayOES" alias="BindVertexArray" es2="2.0">
+ <function name="BindVertexArrayOES" alias="BindVertexArray"
+ static_dispatch="false" es2="2.0">
<param name="array" type="GLuint"/>
</function>
<function name="DeleteVertexArraysOES" alias="DeleteVertexArrays"
- es2="2.0">
+ static_dispatch="false" es2="2.0">
<param name="n" type="GLsizei"/>
<param name="arrays" type="const GLuint *" count="n"/>
</function>
- <function name="GenVertexArraysOES" alias="GenVertexArrays" es2="2.0">
+ <function name="GenVertexArraysOES" alias="GenVertexArrays"
+ static_dispatch="false" es2="2.0">
<param name="n" type="GLsizei"/>
<param name="arrays" type="GLuint *" output="true" count="n"/>
</function>
- <function name="IsVertexArrayOES" alias="IsVertexArray" es2="2.0">
+ <function name="IsVertexArrayOES" alias="IsVertexArray"
+ static_dispatch="false" es2="2.0">
<param name="array" type="GLuint"/>
<return type="GLboolean"/>
</function>
@@ -779,7 +782,8 @@
<size name="Get" mode="get"/>
</enum>
- <function name="DrawBuffersNV" alias="DrawBuffers" es2="2.0">
+ <function name="DrawBuffersNV" alias="DrawBuffers"
+ static_dispatch="false" es2="2.0">
<param name="n" type="GLsizei" counter="true"/>
<param name="bufs" type="const GLenum *" count="n"/>
</function>
@@ -787,7 +791,8 @@
<!-- 93. GL_NV_read_buffer -->
<category name="GL_NV_read_buffer">
- <function name="ReadBufferNV" alias="ReadBuffer" es2="2.0">
+ <function name="ReadBufferNV" alias="ReadBuffer"
+ static_dispatch="false" es2="2.0">
<param name="mode" type="GLenum"/>
</function>
</category>
@@ -815,8 +820,8 @@
<enum name="MAP_FLUSH_EXPLICIT_BIT_EXT" value="0x0010"/>
<enum name="MAP_UNSYNCHRONIZED_BIT_EXT" value="0x0020"/>
- <function name="MapBufferRangeEXT" alias="MapBufferRange" es1="1.0"
- es2="2.0">
+ <function name="MapBufferRangeEXT" alias="MapBufferRange"
+ static_dispatch="false" es1="1.0" es2="2.0">
<param name="target" type="GLenum"/>
<param name="offset" type="GLintptr"/>
<param name="size" type="GLsizeiptr"/>
@@ -825,7 +830,7 @@
</function>
<function name="FlushMappedBufferRangeEXT" alias="FlushMappedBufferRange"
- es1="1.0" es2="2.0">
+ static_dispatch="false" es1="1.0" es2="2.0">
<param name="target" type="GLenum"/>
<param name="offset" type="GLintptr"/>
<param name="length" type="GLsizeiptr"/>
diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml
index d57b5e8a7..e0a833f27 100755
--- a/mesalib/src/mapi/glapi/gen/gl_API.xml
+++ b/mesalib/src/mapi/glapi/gen/gl_API.xml
@@ -5685,83 +5685,83 @@
<function name="Uniform1fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLfloat *" count="count"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform2fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="2"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform3fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="3"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform4fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="4"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform1iv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLint *" count="count"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform2iv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLint *" count="count" count_scale="2"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform3iv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLint *" count="count" count_scale="3"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="Uniform4iv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
- <param name="value" type="const GLint *"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="value" type="const GLint *" count="count" count_scale="4"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix2fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="4"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix3fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="9"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix4fv" es2="2.0" offset="assign">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="16"/>
<glx ignore="true"/>
<glx ignore="true"/>
</function>
@@ -6004,44 +6004,44 @@
<function name="UniformMatrix2x3fv" offset="assign" es2="3.0">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="6"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix3x2fv" offset="assign" es2="3.0">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="6"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix2x4fv" offset="assign" es2="3.0">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="6"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix4x2fv" offset="assign" es2="3.0">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="8"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix3x4fv" offset="assign" es2="3.0">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="12"/>
<glx ignore="true"/>
</function>
<function name="UniformMatrix4x3fv" offset="assign" es2="3.0">
<param name="location" type="GLint"/>
- <param name="count" type="GLsizei"/>
+ <param name="count" type="GLsizei" counter="true"/>
<param name="transpose" type="GLboolean"/>
- <param name="value" type="const GLfloat *"/>
+ <param name="value" type="const GLfloat *" count="count" count_scale="12"/>
<glx ignore="true"/>
</function>
@@ -7656,8 +7656,8 @@
<function name="BufferDataARB" alias="BufferData">
<param name="target" type="GLenum"/>
- <param name="size" type="GLsizeiptrARB"/>
- <param name="data" type="const GLvoid *"/>
+ <param name="size" type="GLsizeiptrARB" counter="true"/>
+ <param name="data" type="const GLvoid *" count="size"/>
<param name="usage" type="GLenum"/>
</function>
diff --git a/mesalib/src/mapi/glapi/gen/gl_XML.py b/mesalib/src/mapi/glapi/gen/gl_XML.py
index 227e9fcd9..3bbc79439 100644
--- a/mesalib/src/mapi/glapi/gen/gl_XML.py
+++ b/mesalib/src/mapi/glapi/gen/gl_XML.py
@@ -802,6 +802,8 @@ class gl_function( gl_item ):
comma = ""
for p in self.parameterIterator():
+ if p.is_padding:
+ continue
p_string = p_string + comma + p.name
comma = ", "
diff --git a/mesalib/src/mapi/glapi/gen/gl_enums.py b/mesalib/src/mapi/glapi/gen/gl_enums.py
index f2951be1e..6aa36c363 100755
--- a/mesalib/src/mapi/glapi/gen/gl_enums.py
+++ b/mesalib/src/mapi/glapi/gen/gl_enums.py
@@ -43,7 +43,6 @@ class PrintGlEnums(gl_XML.gl_print_base):
def printRealHeader(self):
print '#include "main/glheader.h"'
- print '#include "main/mfeatures.h"'
print '#include "main/enums.h"'
print '#include "main/imports.h"'
print '#include "main/mtypes.h"'
@@ -115,7 +114,7 @@ const char *_mesa_lookup_enum_by_nr( int nr )
/**
* Primitive names
*/
-static const char *prim_names[PRIM_UNKNOWN + 1] = {
+static const char *prim_names[PRIM_MAX+3] = {
"GL_POINTS",
"GL_LINES",
"GL_LINE_LOOP",
@@ -126,8 +125,11 @@ static const char *prim_names[PRIM_UNKNOWN + 1] = {
"GL_QUADS",
"GL_QUAD_STRIP",
"GL_POLYGON",
+ "GL_LINES_ADJACENCY",
+ "GL_LINE_STRIP_ADJACENCY",
+ "GL_TRIANGLES_ADJACENCY",
+ "GL_TRIANGLE_STRIP_ADJACENCY",
"outside begin/end",
- "inside unknown primitive",
"unknown state"
};
diff --git a/mesalib/src/mapi/glapi/gen/gl_genexec.py b/mesalib/src/mapi/glapi/gen/gl_genexec.py
index a85b4471a..e91d4e9ac 100644
--- a/mesalib/src/mapi/glapi/gen/gl_genexec.py
+++ b/mesalib/src/mapi/glapi/gen/gl_genexec.py
@@ -44,7 +44,6 @@ header = """/**
*/
-#include "main/mfeatures.h"
#include "main/accum.h"
#include "main/api_loopback.h"
#include "main/api_exec.h"
@@ -110,6 +109,7 @@ header = """/**
#include "main/syncobj.h"
#include "main/formatquery.h"
#include "main/dispatch.h"
+#include "vbo/vbo.h"
/**
@@ -129,6 +129,8 @@ _mesa_initialize_exec_table(struct gl_context *ctx)
assert(exec != NULL);
assert(ctx->Version > 0);
+
+ vbo_initialize_exec_dispatch(ctx, exec);
"""
diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py
index 4f53beadb..afcd17d38 100755
--- a/mesalib/src/mapi/glapi/gen/gl_table.py
+++ b/mesalib/src/mapi/glapi/gen/gl_table.py
@@ -98,12 +98,6 @@ class PrintRemapTable(gl_XML.gl_print_base):
* can SET_FuncName, are used to get and set the dispatch pointer for the
* named function in the specified dispatch table.
*/
-
-/* GLXEXT is defined when building the GLX extension in the xserver.
- */
-#if !defined(GLXEXT)
-#include "main/mfeatures.h"
-#endif
"""
return
@@ -153,17 +147,6 @@ class PrintRemapTable(gl_XML.gl_print_base):
for f, index in abi_functions:
print '#define _gloffset_%s %d' % (f.name, f.offset)
- print ''
- print '#if !FEATURE_remap_table'
- print ''
-
- for f, index in functions:
- print '#define _gloffset_%s %d' % (f.name, f.offset)
-
- print ''
- print '#else /* !FEATURE_remap_table */'
- print ''
-
if self.es:
remap_table = "esLocalRemapTable"
@@ -186,8 +169,6 @@ class PrintRemapTable(gl_XML.gl_print_base):
print '#define _gloffset_%s %s[%s_remap_index]' % (f.name, remap_table, f.name)
print ''
- print '#endif /* !FEATURE_remap_table */'
- print ''
for f, index in abi_functions + functions:
arg_string = gl_XML.create_parameter_string( f.parameters, 0 )
@@ -215,12 +196,10 @@ class PrintRemapTable(gl_XML.gl_print_base):
print '#define SET_%s(disp, fn) SET_%s(disp, fn)' % (name, f.name)
print ''
- print '#if FEATURE_remap_table'
for f in alias_functions:
for name in f.entry_points:
if name != f.name:
print '#define %s_remap_index %s_remap_index' % (name, f.name)
- print '#endif /* FEATURE_remap_table */'
print ''
return
diff --git a/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py b/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py
index a3548c295..19e0e15b0 100644
--- a/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py
+++ b/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py
@@ -181,19 +181,6 @@ class PrintGenericStubs(gl_XML.gl_print_base):
def printRealFooter(self):
print ''
- print '#if defined(GLX_USE_TLS) && defined(__linux__)'
- print ' .section ".note.ABI-tag", "a"'
- print ' .p2align 2'
- print ' .long 1f - 0f /* name length */'
- print ' .long 3f - 2f /* data length */'
- print ' .long 1 /* note length */'
- print '0: .asciz "GNU" /* vendor name */'
- print '1: .p2align 2'
- print '2: .long 0 /* note data: the ABI tag */'
- print ' .long 2,4,20 /* Minimum kernel version w/TLS */'
- print '3: .p2align 2 /* pad out section */'
- print '#endif /* GLX_USE_TLS */'
- print ''
print '#if defined (__ELF__) && defined (__linux__)'
print ' .section .note.GNU-stack,"",%progbits'
print '#endif'
diff --git a/mesalib/src/mapi/glapi/gen/gl_x86_asm.py b/mesalib/src/mapi/glapi/gen/gl_x86_asm.py
index 8b0f6ee24..919bbc032 100644
--- a/mesalib/src/mapi/glapi/gen/gl_x86_asm.py
+++ b/mesalib/src/mapi/glapi/gen/gl_x86_asm.py
@@ -189,19 +189,6 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\t\tALIGNTEXT16'
print 'GLNAME(gl_dispatch_functions_end):'
print ''
- print '#if defined(GLX_USE_TLS) && defined(__linux__)'
- print ' .section ".note.ABI-tag", "a"'
- print ' .p2align 2'
- print ' .long 1f - 0f /* name length */'
- print ' .long 3f - 2f /* data length */'
- print ' .long 1 /* note length */'
- print '0: .asciz "GNU" /* vendor name */'
- print '1: .p2align 2'
- print '2: .long 0 /* note data: the ABI tag */'
- print ' .long 2,4,20 /* Minimum kernel version w/TLS */'
- print '3: .p2align 2 /* pad out section */'
- print '#endif /* GLX_USE_TLS */'
- print ''
print '#if defined (__ELF__) && defined (__linux__)'
print ' .section .note.GNU-stack,"",%progbits'
print '#endif'
diff --git a/mesalib/src/mapi/glapi/gen/glapi_gen.mk b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
index f65286fbd..242ae5fd9 100644
--- a/mesalib/src/mapi/glapi/gen/glapi_gen.mk
+++ b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
@@ -4,7 +4,7 @@ glapi_gen_common_deps := \
$(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \
$(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py)
-glapi_gen_mapi_script := $(top_srcdir)/src/mapi/mapi/mapi_abi.py
+glapi_gen_mapi_script := $(top_srcdir)/src/mapi/mapi_abi.py
glapi_gen_mapi_deps := \
$(glapi_gen_mapi_script) \
$(glapi_gen_common_deps)
diff --git a/mesalib/src/mapi/glapi/gen/mesadef.py b/mesalib/src/mapi/glapi/gen/mesadef.py
index 473baaee5..eefda7643 100644
--- a/mesalib/src/mapi/glapi/gen/mesadef.py
+++ b/mesalib/src/mapi/glapi/gen/mesadef.py
@@ -19,9 +19,10 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
# Generate the mesa.def file for Windows.
diff --git a/mesalib/src/mapi/glapi/glapi.c b/mesalib/src/mapi/glapi/glapi.c
index f7655c558..18a7d31a7 100644
--- a/mesalib/src/mapi/glapi/glapi.c
+++ b/mesalib/src/mapi/glapi/glapi.c
@@ -27,7 +27,7 @@
*/
#include "glapi/glapi.h"
-#include "mapi/u_current.h"
+#include "u_current.h"
/*
* Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in
diff --git a/mesalib/src/mapi/glapi/glapi.h b/mesalib/src/mapi/glapi/glapi.h
index 5edec8ebd..43e77b275 100644
--- a/mesalib/src/mapi/glapi/glapi.h
+++ b/mesalib/src/mapi/glapi/glapi.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mapi/glapi/glapi_dispatch.c b/mesalib/src/mapi/glapi/glapi_dispatch.c
index be65ebedd..7f8056242 100644
--- a/mesalib/src/mapi/glapi/glapi_dispatch.c
+++ b/mesalib/src/mapi/glapi/glapi_dispatch.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mapi/glapi/glapi_entrypoint.c b/mesalib/src/mapi/glapi/glapi_entrypoint.c
index 7a0eb3537..6b03548fe 100644
--- a/mesalib/src/mapi/glapi/glapi_entrypoint.c
+++ b/mesalib/src/mapi/glapi/glapi_entrypoint.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -30,7 +31,7 @@
#include "glapi/glapi_priv.h"
-#include "mapi/u_execmem.h"
+#include "u_execmem.h"
#ifdef USE_X86_ASM
diff --git a/mesalib/src/mapi/glapi/glapi_getproc.c b/mesalib/src/mapi/glapi/glapi_getproc.c
index 231db46c3..43526320b 100644
--- a/mesalib/src/mapi/glapi/glapi_getproc.c
+++ b/mesalib/src/mapi/glapi/glapi_getproc.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mapi/glapi/glapi_nop.c b/mesalib/src/mapi/glapi/glapi_nop.c
index f34075e70..e30289527 100644
--- a/mesalib/src/mapi/glapi/glapi_nop.c
+++ b/mesalib/src/mapi/glapi/glapi_nop.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mapi/glapi/glapi_priv.h b/mesalib/src/mapi/glapi/glapi_priv.h
index 3ab553a2b..ea32f302f 100644
--- a/mesalib/src/mapi/glapi/glapi_priv.h
+++ b/mesalib/src/mapi/glapi/glapi_priv.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mapi/glapi/glthread.h b/mesalib/src/mapi/glapi/glthread.h
index 1c3f4e2bf..2399abb2b 100644
--- a/mesalib/src/mapi/glapi/glthread.h
+++ b/mesalib/src/mapi/glapi/glthread.h
@@ -1,7 +1,7 @@
#ifndef GLTHREAD_H
#define GLTHREAD_H
-#include "mapi/u_thread.h"
+#include "u_thread.h"
#ifdef __cplusplus
extern "C" {
diff --git a/mesalib/src/mapi/mapi/mapi.c b/mesalib/src/mapi/mapi.c
index b471c40b1..b471c40b1 100644
--- a/mesalib/src/mapi/mapi/mapi.c
+++ b/mesalib/src/mapi/mapi.c
diff --git a/mesalib/src/mapi/mapi/mapi.h b/mesalib/src/mapi/mapi.h
index c7e43e22e..c7e43e22e 100644
--- a/mesalib/src/mapi/mapi/mapi.h
+++ b/mesalib/src/mapi/mapi.h
diff --git a/mesalib/src/mapi/mapi/mapi_abi.py b/mesalib/src/mapi/mapi_abi.py
index c645c02f9..6bfcfa9af 100755
--- a/mesalib/src/mapi/mapi/mapi_abi.py
+++ b/mesalib/src/mapi/mapi_abi.py
@@ -29,7 +29,7 @@
import sys
# make it possible to import glapi
import os
-GLAPI = os.path.join(".", os.path.dirname(sys.argv[0]), "../glapi/gen")
+GLAPI = os.path.join(".", os.path.dirname(sys.argv[0]), "glapi/gen")
sys.path.append(GLAPI)
import re
diff --git a/mesalib/src/mapi/mapi/mapi_glapi.c b/mesalib/src/mapi/mapi_glapi.c
index 4627c4de0..a6838ce61 100644
--- a/mesalib/src/mapi/mapi/mapi_glapi.c
+++ b/mesalib/src/mapi/mapi_glapi.c
@@ -29,9 +29,9 @@
#include <string.h>
#include "glapi/glapi.h"
-#include "mapi/u_current.h"
-#include "mapi/table.h" /* for MAPI_TABLE_NUM_SLOTS */
-#include "mapi/stub.h"
+#include "u_current.h"
+#include "table.h" /* for MAPI_TABLE_NUM_SLOTS */
+#include "stub.h"
/*
* Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in
diff --git a/mesalib/src/mapi/mapi/mapi_tmp.h b/mesalib/src/mapi/mapi_tmp.h
index f326b4a4e..f326b4a4e 100644
--- a/mesalib/src/mapi/mapi/mapi_tmp.h
+++ b/mesalib/src/mapi/mapi_tmp.h
diff --git a/mesalib/src/mapi/mapi/stub.c b/mesalib/src/mapi/stub.c
index 688dc8143..688dc8143 100644
--- a/mesalib/src/mapi/mapi/stub.c
+++ b/mesalib/src/mapi/stub.c
diff --git a/mesalib/src/mapi/mapi/stub.h b/mesalib/src/mapi/stub.h
index 98e2553ec..98e2553ec 100644
--- a/mesalib/src/mapi/mapi/stub.h
+++ b/mesalib/src/mapi/stub.h
diff --git a/mesalib/src/mapi/mapi/table.c b/mesalib/src/mapi/table.c
index 9bb9f654a..9bb9f654a 100644
--- a/mesalib/src/mapi/mapi/table.c
+++ b/mesalib/src/mapi/table.c
diff --git a/mesalib/src/mapi/mapi/table.h b/mesalib/src/mapi/table.h
index d84523f77..d84523f77 100644
--- a/mesalib/src/mapi/mapi/table.h
+++ b/mesalib/src/mapi/table.h
diff --git a/mesalib/src/mapi/mapi/u_compiler.h b/mesalib/src/mapi/u_compiler.h
index f376e97a0..f376e97a0 100644
--- a/mesalib/src/mapi/mapi/u_compiler.h
+++ b/mesalib/src/mapi/u_compiler.h
diff --git a/mesalib/src/mapi/mapi/u_current.c b/mesalib/src/mapi/u_current.c
index d902375f8..344344939 100644
--- a/mesalib/src/mapi/mapi/u_current.c
+++ b/mesalib/src/mapi/u_current.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mapi/mapi/u_current.h b/mesalib/src/mapi/u_current.h
index f9cffd8c3..f9cffd8c3 100644
--- a/mesalib/src/mapi/mapi/u_current.h
+++ b/mesalib/src/mapi/u_current.h
diff --git a/mesalib/src/mapi/mapi/u_execmem.c b/mesalib/src/mapi/u_execmem.c
index e5072e06e..b6751edb5 100644
--- a/mesalib/src/mapi/mapi/u_execmem.c
+++ b/mesalib/src/mapi/u_execmem.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -46,7 +47,7 @@ static unsigned int head = 0;
static unsigned char *exec_mem = (unsigned char *)0;
-#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
+#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
#include <unistd.h>
#include <sys/mman.h>
diff --git a/mesalib/src/mapi/mapi/u_execmem.h b/mesalib/src/mapi/u_execmem.h
index 13fff8df2..13fff8df2 100644
--- a/mesalib/src/mapi/mapi/u_execmem.h
+++ b/mesalib/src/mapi/u_execmem.h
diff --git a/mesalib/src/mapi/mapi/u_macros.h b/mesalib/src/mapi/u_macros.h
index 72345b5f1..72345b5f1 100644
--- a/mesalib/src/mapi/mapi/u_macros.h
+++ b/mesalib/src/mapi/u_macros.h
diff --git a/mesalib/src/mapi/mapi/u_thread.h b/mesalib/src/mapi/u_thread.h
index a5e504370..2f8154373 100644
--- a/mesalib/src/mapi/mapi/u_thread.h
+++ b/mesalib/src/mapi/u_thread.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/Android.gen.mk b/mesalib/src/mesa/Android.gen.mk
index 35f00da09..c6280f5cb 100644
--- a/mesalib/src/mesa/Android.gen.mk
+++ b/mesalib/src/mesa/Android.gen.mk
@@ -111,8 +111,7 @@ $(intermediates)/main/api_exec.c: $(dispatch_deps)
$(call es-gen)
GET_HASH_GEN := $(LOCAL_PATH)/main/get_hash_generator.py
-GET_HASH_GEN_FLAGS := $(patsubst %,-a %,$(MESA_ENABLED_APIS))
$(intermediates)/main/get_hash.h: $(glapi)/gl_and_es_API.xml \
$(LOCAL_PATH)/main/get_hash_params.py $(GET_HASH_GEN)
- @$(MESA_PYTHON2) $(GET_HASH_GEN) $(GET_HASH_GEN_FLAGS) -f $< > $@
+ @$(MESA_PYTHON2) $(GET_HASH_GEN) -f $< > $@
diff --git a/mesalib/src/mesa/Android.libmesa_dricore.mk b/mesalib/src/mesa/Android.libmesa_dricore.mk
index 093d7a189..00c06943c 100644
--- a/mesalib/src/mesa/Android.libmesa_dricore.mk
+++ b/mesalib/src/mesa/Android.libmesa_dricore.mk
@@ -31,7 +31,7 @@ LOCAL_PATH := $(call my-dir)
# Import the following variables:
# MESA_FILES
# X86_FILES
-include $(LOCAL_PATH)/sources.mak
+include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS)
diff --git a/mesalib/src/mesa/Android.libmesa_st_mesa.mk b/mesalib/src/mesa/Android.libmesa_st_mesa.mk
index 79914caf1..e7203c41d 100644
--- a/mesalib/src/mesa/Android.libmesa_st_mesa.mk
+++ b/mesalib/src/mesa/Android.libmesa_st_mesa.mk
@@ -31,7 +31,7 @@ LOCAL_PATH := $(call my-dir)
# Import variables:
# MESA_GALLIUM_FILES.
# X86_FILES
-include $(LOCAL_PATH)/sources.mak
+include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS)
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index c341c48e7..d5f5f5b86 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -23,7 +23,19 @@ if NEED_LIBDRICORE
DRICORE_SUBDIR = libdricore
endif
-SUBDIRS = program x86 x86-64 . $(DRICORE_SUBDIR) drivers
+SUBDIRS = program x86 x86-64 . $(DRICORE_SUBDIR)
+
+if HAVE_X11_DRIVER
+SUBDIRS += drivers/x11
+endif
+
+if HAVE_DRI
+SUBDIRS += drivers/dri
+endif
+
+if HAVE_OSMESA
+SUBDIRS += drivers/osmesa
+endif
gldir = $(includedir)/GL
gl_HEADERS = $(top_srcdir)/include/GL/*.h
@@ -59,14 +71,12 @@ CLEANFILES = \
git_sha1.h.tmp
GET_HASH_GEN = main/get_hash_generator.py
-GET_HASH_GEN_FLAGS := $(patsubst -DFEATURE_%=1,-a %, \
- $(patsubst -DFEATURE_%=0,,$(API_DEFINES)))
main/get_hash.h: $(GLAPI)/gl_and_es_API.xml main/get_hash_params.py \
$(GET_HASH_GEN) Makefile
$(AM_V_GEN)set -e; \
- $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/$(GET_HASH_GEN) \
- $(GET_HASH_GEN_FLAGS) -f $< > $@.tmp; \
+ $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/$(GET_HASH_GEN) \
+ -f $< > $@.tmp; \
mv $@.tmp $@;
noinst_LTLIBRARIES =
@@ -81,9 +91,9 @@ endif
SRCDIR = $(top_srcdir)/src/mesa/
BUILDDIR = $(top_builddir)/src/mesa/
-include sources.mak
+include Makefile.sources
-AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
+AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
diff --git a/mesalib/src/mesa/sources.mak b/mesalib/src/mesa/Makefile.sources
index 3c881082c..a5c1f5dea 100644
--- a/mesalib/src/mesa/sources.mak
+++ b/mesalib/src/mesa/Makefile.sources
@@ -224,6 +224,7 @@ STATETRACKER_FILES = \
$(SRCDIR)state_tracker/st_cb_eglimage.c \
$(SRCDIR)state_tracker/st_cb_fbo.c \
$(SRCDIR)state_tracker/st_cb_feedback.c \
+ $(SRCDIR)state_tracker/st_cb_msaa.c \
$(SRCDIR)state_tracker/st_cb_program.c \
$(SRCDIR)state_tracker/st_cb_queryobj.c \
$(SRCDIR)state_tracker/st_cb_rasterpos.c \
diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript
index ca9b70bad..0f1543802 100644
--- a/mesalib/src/mesa/SConscript
+++ b/mesalib/src/mesa/SConscript
@@ -31,7 +31,6 @@ if env['platform'] == 'windows':
env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
else:
env.Append(CPPDEFINES = [
- 'IN_DRI_DRIVER', # enable the remap table (for DRI drivers)
('HAVE_DLOPEN', '1'),
])
@@ -263,6 +262,7 @@ statetracker_sources = [
'state_tracker/st_cb_eglimage.c',
'state_tracker/st_cb_fbo.c',
'state_tracker/st_cb_feedback.c',
+ 'state_tracker/st_cb_msaa.c',
'state_tracker/st_cb_program.c',
'state_tracker/st_cb_queryobj.c',
'state_tracker/st_cb_rasterpos.c',
@@ -340,22 +340,18 @@ if env['gles']:
enabled_apis += ['ES1', 'ES2']
-env.Append(CPPDEFINES = ["FEATURE_%s=1" % api for api in enabled_apis])
-
-get_hash_gen_opts = ' '.join(["-a %s" % api for api in enabled_apis])
-
get_hash_header = env.CodeGenerate(
target = 'main/get_hash.h',
script = 'main/get_hash_generator.py',
source = GLAPI + 'gen/gl_and_es_API.xml',
- command = python_cmd + ' $SCRIPT ' + get_hash_gen_opts +
- ' -f $SOURCE > $TARGET'
+ command = python_cmd + ' $SCRIPT ' + ' -f $SOURCE > $TARGET'
)
#
# Assembly sources
#
-if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
+if (env['gcc'] or env['clang']) and \
+ env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
if env['machine'] == 'x86':
env.Append(CPPDEFINES = [
'USE_X86_ASM',
diff --git a/mesalib/src/mesa/drivers/Makefile.am b/mesalib/src/mesa/drivers/Makefile.am
deleted file mode 100644
index 1bc74eadf..000000000
--- a/mesalib/src/mesa/drivers/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright © 2012 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.
-
-SUBDIRS = $(DRIVER_DIRS)
diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.c b/mesalib/src/mesa/drivers/common/driverfuncs.c
index a98dfc607..4f7696c4c 100644
--- a/mesalib/src/mesa/drivers/common/driverfuncs.c
+++ b/mesalib/src/mesa/drivers/common/driverfuncs.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -40,6 +41,7 @@
#include "main/texgetimage.h"
#include "main/teximage.h"
#include "main/texobj.h"
+#include "main/texstorage.h"
#include "main/texstore.h"
#include "main/bufferobj.h"
#include "main/fbobject.h"
@@ -209,7 +211,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->EndCallList = NULL;
/* GL_ARB_texture_storage */
- driver->AllocTextureStorage = _swrast_AllocTextureStorage;
+ driver->AllocTextureStorage = _mesa_alloc_texture_storage;
/* GL_ARB_texture_multisample */
driver->GetSamplePosition = NULL;
diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.h b/mesalib/src/mesa/drivers/common/driverfuncs.h
index 212f30742..806c8b0af 100644
--- a/mesalib/src/mesa/drivers/common/driverfuncs.h
+++ b/mesalib/src/mesa/drivers/common/driverfuncs.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index e3ab82bfe..1250bd35c 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -3048,16 +3049,33 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
GLenum status;
/* check for fallbacks */
- if (!ctx->Extensions.EXT_framebuffer_object ||
- target == GL_TEXTURE_3D ||
+ if (!ctx->Extensions.EXT_framebuffer_object) {
+ _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
+ "glGenerateMipmap() without FBOs\n");
+ return GL_TRUE;
+ }
+
+ if (target == GL_TEXTURE_3D ||
target == GL_TEXTURE_1D_ARRAY ||
target == GL_TEXTURE_2D_ARRAY) {
+ _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
+ "glGenerateMipmap() to %s target\n",
+ _mesa_lookup_enum_by_nr(target));
return GL_TRUE;
}
srcLevel = texObj->BaseLevel;
baseImage = _mesa_select_tex_image(ctx, texObj, target, srcLevel);
- if (!baseImage || _mesa_is_format_compressed(baseImage->TexFormat)) {
+ if (!baseImage) {
+ _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
+ "glGenerateMipmap() couldn't find base teximage\n");
+ return GL_TRUE;
+ }
+
+ if (_mesa_is_format_compressed(baseImage->TexFormat)) {
+ _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
+ "glGenerateMipmap() with %s format\n",
+ _mesa_get_format_name(baseImage->TexFormat));
return GL_TRUE;
}
@@ -3067,6 +3085,9 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
* texture sample conversion. So we won't be able to generate the
* right colors when rendering. Need to use a fallback.
*/
+ _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
+ "glGenerateMipmap() of sRGB texture without "
+ "sRGB decode\n");
return GL_TRUE;
}
@@ -3103,6 +3124,8 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
_mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, fboSave);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
+ "glGenerateMipmap() got incomplete FBO\n");
return GL_TRUE;
}
@@ -3374,6 +3397,8 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
sizeof(struct vertex), OFFSET(x));
_mesa_VertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE,
sizeof(struct vertex), OFFSET(tex));
+ _mesa_EnableVertexAttribArray(0);
+ _mesa_EnableVertexAttribArray(1);
}
/* Generate a fragment shader program appropriate for the texture target */
@@ -3445,8 +3470,6 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
_mesa_DeleteObjectARB(vs);
_mesa_BindAttribLocation(mipmap->ShaderProg, 0, "position");
_mesa_BindAttribLocation(mipmap->ShaderProg, 1, "texcoords");
- _mesa_EnableVertexAttribArray(0);
- _mesa_EnableVertexAttribArray(1);
link_program_with_debug(ctx, mipmap->ShaderProg);
sampler->shader_prog = mipmap->ShaderProg;
ralloc_free(mem_ctx);
@@ -3741,10 +3764,20 @@ get_temp_image_type(struct gl_context *ctx, gl_format format)
return datatype;
return GL_FLOAT;
}
- case GL_DEPTH_COMPONENT:
- return GL_UNSIGNED_INT;
- case GL_DEPTH_STENCIL:
- return GL_UNSIGNED_INT_24_8;
+ case GL_DEPTH_COMPONENT: {
+ GLenum datatype = _mesa_get_format_datatype(format);
+ if (datatype == GL_FLOAT)
+ return GL_FLOAT;
+ else
+ return GL_UNSIGNED_INT;
+ }
+ case GL_DEPTH_STENCIL: {
+ GLenum datatype = _mesa_get_format_datatype(format);
+ if (datatype == GL_FLOAT)
+ return GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
+ else
+ return GL_UNSIGNED_INT_24_8;
+ }
default:
_mesa_problem(ctx, "Unexpected format %d in get_temp_image_type()",
baseFormat);
diff --git a/mesalib/src/mesa/drivers/common/meta.h b/mesalib/src/mesa/drivers/common/meta.h
index a6bdd3947..823be14c7 100644
--- a/mesalib/src/mesa/drivers/common/meta.h
+++ b/mesalib/src/mesa/drivers/common/meta.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/drivers/dri/common/Makefile.am b/mesalib/src/mesa/drivers/dri/common/Makefile.am
index dfc8f3b7a..ce4119d0f 100644
--- a/mesalib/src/mesa/drivers/dri/common/Makefile.am
+++ b/mesalib/src/mesa/drivers/dri/common/Makefile.am
@@ -27,7 +27,6 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa/ \
$(DEFINES) \
- $(API_DEFINES) \
$(LIBDRM_CFLAGS) \
$(VISIBILITY_CFLAGS)
diff --git a/mesalib/src/mesa/drivers/dri/common/drisw_util.c b/mesalib/src/mesa/drivers/dri/common/drisw_util.c
index 62bdd88d1..e8bac6414 100644
--- a/mesalib/src/mesa/drivers/dri/common/drisw_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/drisw_util.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool.h b/mesalib/src/mesa/drivers/dri/common/xmlpool.h
index ffea43002..ebd4e7c86 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlpool.h
+++ b/mesalib/src/mesa/drivers/dri/common/xmlpool.h
@@ -60,6 +60,13 @@
#define DRI_CONF_OPT_BEGIN(name,type,def) \
"<option name=\""#name"\" type=\""#type"\" default=\""#def"\">\n"
+/**
+ * \brief Begin a boolean option definition, with the default value passed in
+ * as a string
+ */
+#define DRI_CONF_OPT_BEGIN_B(name,def) \
+"<option name=\""#name"\" type=\"bool\" default="#def">\n"
+
/** \brief Begin an option definition with quoted default value */
#define DRI_CONF_OPT_BEGIN_Q(name,type,def) \
"<option name=\""#name"\" type=\""#type"\" default="#def">\n"
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h b/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h
index 7b441c68f..ca4772003 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h
+++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h
@@ -56,42 +56,42 @@ DRI_CONF_SECTION_BEGIN \
DRI_CONF_DESC(en,gettext("Debugging"))
#define DRI_CONF_NO_RAST(def) \
-DRI_CONF_OPT_BEGIN(no_rast,bool,def) \
+DRI_CONF_OPT_BEGIN_B(no_rast, def) \
DRI_CONF_DESC(en,gettext("Disable 3D acceleration")) \
DRI_CONF_OPT_END
#define DRI_CONF_PERFORMANCE_BOXES(def) \
-DRI_CONF_OPT_BEGIN(performance_boxes,bool,def) \
+DRI_CONF_OPT_BEGIN_B(performance_boxes, def) \
DRI_CONF_DESC(en,gettext("Show performance boxes")) \
DRI_CONF_OPT_END
#define DRI_CONF_ALWAYS_FLUSH_BATCH(def) \
-DRI_CONF_OPT_BEGIN(always_flush_batch,bool,def) \
+DRI_CONF_OPT_BEGIN_B(always_flush_batch, def) \
DRI_CONF_DESC(en,gettext("Enable flushing batchbuffer after each draw call")) \
DRI_CONF_OPT_END
#define DRI_CONF_ALWAYS_FLUSH_CACHE(def) \
-DRI_CONF_OPT_BEGIN(always_flush_cache,bool,def) \
+DRI_CONF_OPT_BEGIN_B(always_flush_cache, def) \
DRI_CONF_DESC(en,gettext("Enable flushing GPU caches with each draw call")) \
DRI_CONF_OPT_END
#define DRI_CONF_DISABLE_THROTTLING(def) \
-DRI_CONF_OPT_BEGIN(disable_throttling,bool,def) \
+DRI_CONF_OPT_BEGIN_B(disable_throttling, def) \
DRI_CONF_DESC(en,gettext("Disable throttling on first batch after flush")) \
DRI_CONF_OPT_END
#define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \
-DRI_CONF_OPT_BEGIN(force_glsl_extensions_warn,bool,def) \
+DRI_CONF_OPT_BEGIN_B(force_glsl_extensions_warn, def) \
DRI_CONF_DESC(en,gettext("Force GLSL extension default behavior to 'warn'")) \
DRI_CONF_OPT_END
#define DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(def) \
-DRI_CONF_OPT_BEGIN(disable_blend_func_extended,bool,def) \
+DRI_CONF_OPT_BEGIN_B(disable_blend_func_extended, def) \
DRI_CONF_DESC(en,gettext("Disable dual source blending")) \
DRI_CONF_OPT_END
#define DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(def) \
-DRI_CONF_OPT_BEGIN(disable_glsl_line_continuations,bool,def) \
+DRI_CONF_OPT_BEGIN_B(disable_glsl_line_continuations, def) \
DRI_CONF_DESC(en,gettext("Disable backslash-based line continuations in GLSL source")) \
DRI_CONF_OPT_END
@@ -105,7 +105,7 @@ DRI_CONF_SECTION_BEGIN \
DRI_CONF_DESC(en,gettext("Image Quality"))
#define DRI_CONF_EXCESS_MIPMAP(def) \
-DRI_CONF_OPT_BEGIN(excess_mipmap,bool,def) \
+DRI_CONF_OPT_BEGIN_B(excess_mipmap, def) \
DRI_CONF_DESC(en,"Enable extra mipmap level") \
DRI_CONF_OPT_END
@@ -129,12 +129,12 @@ DRI_CONF_OPT_BEGIN_V(def_max_anisotropy,float,def,range) \
DRI_CONF_OPT_END
#define DRI_CONF_NO_NEG_LOD_BIAS(def) \
-DRI_CONF_OPT_BEGIN(no_neg_lod_bias,bool,def) \
+DRI_CONF_OPT_BEGIN_B(no_neg_lod_bias, def) \
DRI_CONF_DESC(en,gettext("Forbid negative texture LOD bias")) \
DRI_CONF_OPT_END
#define DRI_CONF_FORCE_S3TC_ENABLE(def) \
-DRI_CONF_OPT_BEGIN(force_s3tc_enable,bool,def) \
+DRI_CONF_OPT_BEGIN_B(force_s3tc_enable, def) \
DRI_CONF_DESC(en,gettext("Enable S3TC texture compression even if software support is not available")) \
DRI_CONF_OPT_END
@@ -171,7 +171,7 @@ DRI_CONF_OPT_BEGIN_V(dither_mode,enum,def,"0:2") \
DRI_CONF_OPT_END
#define DRI_CONF_FLOAT_DEPTH(def) \
-DRI_CONF_OPT_BEGIN(float_depth,bool,def) \
+DRI_CONF_OPT_BEGIN_B(float_depth, def) \
DRI_CONF_DESC(en,gettext("Floating point depth buffer")) \
DRI_CONF_OPT_END
@@ -257,7 +257,7 @@ DRI_CONF_OPT_END
#define DRI_CONF_HYPERZ_DISABLED 0
#define DRI_CONF_HYPERZ_ENABLED 1
#define DRI_CONF_HYPERZ(def) \
-DRI_CONF_OPT_BEGIN(hyperz,bool,def) \
+DRI_CONF_OPT_BEGIN_B(hyperz, def) \
DRI_CONF_DESC(en,gettext("Use HyperZ to boost performance")) \
DRI_CONF_OPT_END
@@ -303,7 +303,7 @@ DRI_CONF_SECTION_BEGIN \
DRI_CONF_DESC(en,gettext("Features that are not hardware-accelerated"))
#define DRI_CONF_ARB_VERTEX_PROGRAM(def) \
-DRI_CONF_OPT_BEGIN(arb_vertex_program,bool,def) \
+DRI_CONF_OPT_BEGIN_B(arb_vertex_program, def) \
DRI_CONF_DESC(en,gettext("Enable extension GL_ARB_vertex_program")) \
DRI_CONF_OPT_END
@@ -317,6 +317,6 @@ DRI_CONF_SECTION_BEGIN \
DRI_CONF_DESC(en,gettext("Miscellaneous"))
#define DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(def) \
-DRI_CONF_OPT_BEGIN(always_have_depth_buffer, bool, def) \
+DRI_CONF_OPT_BEGIN_B(always_have_depth_buffer, def) \
DRI_CONF_DESC(en,gettext("Create all visuals with a depth buffer")) \
DRI_CONF_OPT_END
diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am
index 3e539073c..d3da19651 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am
+++ b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am
@@ -31,7 +31,6 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(DEFINES) \
- $(API_DEFINES) \
$(VISIBILITY_CFLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index e6e001cf5..f72db1029 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -14,9 +14,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
index 36ab02053..1c1ae9860 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/accum.c b/mesalib/src/mesa/main/accum.c
index f5888017f..b4677397b 100644
--- a/mesalib/src/mesa/main/accum.c
+++ b/mesalib/src/mesa/main/accum.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
@@ -30,7 +31,6 @@
#include "format_pack.h"
#include "imports.h"
#include "macros.h"
-#include "mfeatures.h"
#include "state.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/accum.h b/mesalib/src/mesa/main/accum.h
index 00c24b2db..7e4d9f6b9 100644
--- a/mesalib/src/mesa/main/accum.h
+++ b/mesalib/src/mesa/main/accum.h
@@ -27,9 +27,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -38,7 +39,6 @@
#define ACCUM_H
#include "main/glheader.h"
-#include "main/mfeatures.h"
struct _glapi_table;
struct gl_context;
diff --git a/mesalib/src/mesa/main/api_arrayelt.c b/mesalib/src/mesa/main/api_arrayelt.c
index ea3361488..8e581c8d9 100644
--- a/mesalib/src/mesa/main/api_arrayelt.c
+++ b/mesalib/src/mesa/main/api_arrayelt.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -40,7 +41,6 @@
#include "context.h"
#include "imports.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
@@ -64,13 +64,19 @@ typedef struct {
AEattrib attribs[VERT_ATTRIB_MAX + 1];
GLuint NewState;
+ /* List of VBOs we need to map before executing ArrayElements */
struct gl_buffer_object *vbo[VERT_ATTRIB_MAX];
GLuint nr_vbos;
- GLboolean mapped_vbos;
-
+ GLboolean mapped_vbos; /**< Any currently mapped VBOs? */
} AEcontext;
-#define AE_CONTEXT(ctx) ((AEcontext *)(ctx)->aelt_context)
+
+/** Cast wrapper */
+static INLINE AEcontext *
+AE_CONTEXT(struct gl_context *ctx)
+{
+ return (AEcontext *) ctx->aelt_context;
+}
/*
@@ -78,7 +84,12 @@ typedef struct {
* in the range [0, 7]. Luckily these type tokens are sequentially
* numbered in gl.h, except for GL_DOUBLE.
*/
-#define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 )
+static INLINE int
+TYPE_IDX(GLenum t)
+{
+ return t == GL_DOUBLE ? 7 : t & 7;
+}
+
#define NUM_TYPES 8
@@ -1245,8 +1256,6 @@ VertexAttribI4uiv(GLuint index, const GLuint *v)
}
-
-
/*
* Array [unnormalized/normalized/integer][size][type] of VertexAttrib
* functions
@@ -1396,10 +1405,9 @@ static attrib_func AttribFuncsARB[3][4][NUM_TYPES] = {
}
};
-/**********************************************************************/
-
-GLboolean _ae_create_context( struct gl_context *ctx )
+GLboolean
+_ae_create_context(struct gl_context *ctx)
{
if (ctx->aelt_context)
return GL_TRUE;
@@ -1432,22 +1440,29 @@ GLboolean _ae_create_context( struct gl_context *ctx )
}
-void _ae_destroy_context( struct gl_context *ctx )
+void
+_ae_destroy_context(struct gl_context *ctx)
{
- if ( AE_CONTEXT( ctx ) ) {
+ if (AE_CONTEXT(ctx)) {
free(ctx->aelt_context);
ctx->aelt_context = NULL;
}
}
-static void check_vbo( AEcontext *actx,
- struct gl_buffer_object *vbo )
+
+/**
+ * Check if the given vertex buffer object exists and is not mapped.
+ * If so, add it to the list of buffers we must map before executing
+ * an glArrayElement call.
+ */
+static void
+check_vbo(AEcontext *actx, struct gl_buffer_object *vbo)
{
if (_mesa_is_bufferobj(vbo) && !_mesa_bufferobj_mapped(vbo)) {
GLuint i;
for (i = 0; i < actx->nr_vbos; i++)
- if (actx->vbo[i] == vbo)
- return;
+ if (actx->vbo[i] == vbo)
+ return; /* already in the list, we're done */
assert(actx->nr_vbos < VERT_ATTRIB_MAX);
actx->vbo[actx->nr_vbos++] = vbo;
}
@@ -1460,11 +1475,12 @@ static void check_vbo( AEcontext *actx,
* etc).
* Note: this may be called during display list construction.
*/
-static void _ae_update_state( struct gl_context *ctx )
+static void
+_ae_update_state(struct gl_context *ctx)
{
AEcontext *actx = AE_CONTEXT(ctx);
- AEarray *aa = actx->arrays;
- AEattrib *at = actx->attribs;
+ AEarray *aa = actx->arrays; /* non-indexed arrays (ex: glNormal) */
+ AEattrib *at = actx->attribs; /* indexed arrays (ex: glMultiTexCoord) */
GLuint i;
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
@@ -1508,7 +1524,8 @@ static void _ae_update_state( struct gl_context *ctx )
aa++;
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)];
+ struct gl_client_array *attribArray =
+ &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)];
if (attribArray->Enabled) {
/* NOTE: we use generic glVertexAttribNV functions here.
* If we ever remove GL_NV_vertex_program this will have to change.
@@ -1524,9 +1541,10 @@ static void _ae_update_state( struct gl_context *ctx )
}
}
- /* generic vertex attribute arrays */
+ /* generic vertex attribute arrays */
for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */
- struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
+ struct gl_client_array *attribArray =
+ &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
if (attribArray->Enabled) {
GLint intOrNorm;
at->array = attribArray;
@@ -1580,11 +1598,17 @@ static void _ae_update_state( struct gl_context *ctx )
actx->NewState = 0;
}
-void _ae_map_vbos( struct gl_context *ctx )
+
+/**
+ * Before replaying glArrayElements calls we need to map (for reading) any
+ * VBOs referenced by the enabled vertex arrays.
+ */
+void
+_ae_map_vbos(struct gl_context *ctx)
{
AEcontext *actx = AE_CONTEXT(ctx);
GLuint i;
-
+
if (actx->mapped_vbos)
return;
@@ -1601,7 +1625,12 @@ void _ae_map_vbos( struct gl_context *ctx )
actx->mapped_vbos = GL_TRUE;
}
-void _ae_unmap_vbos( struct gl_context *ctx )
+
+/**
+ * Unmap VBOs
+ */
+void
+_ae_unmap_vbos(struct gl_context *ctx)
{
AEcontext *actx = AE_CONTEXT(ctx);
GLuint i;
@@ -1624,7 +1653,8 @@ void _ae_unmap_vbos( struct gl_context *ctx )
* for all enabled vertex arrays (for elt-th element).
* Note: this may be called during display list construction.
*/
-void GLAPIENTRY _ae_ArrayElement( GLint elt )
+void GLAPIENTRY
+_ae_ArrayElement(GLint elt)
{
GET_CURRENT_CONTEXT(ctx);
const AEcontext *actx = AE_CONTEXT(ctx);
@@ -1636,14 +1666,14 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
/* If PrimitiveRestart is enabled and the index is the RestartIndex
* then we call PrimitiveRestartNV and return.
*/
- if (ctx->Array._PrimitiveRestart && (elt == ctx->Array._RestartIndex)) {
+ if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) {
CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ());
return;
}
if (actx->NewState) {
assert(!actx->mapped_vbos);
- _ae_update_state( ctx );
+ _ae_update_state(ctx);
}
/* Determine if we need to map/unmap VBOs */
@@ -1651,13 +1681,13 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
if (do_map)
_ae_map_vbos(ctx);
-
+
/* emit generic attribute elements */
for (at = actx->attribs; at->func; at++) {
const GLubyte *src
= ADD_POINTERS(at->array->BufferObj->Pointer, at->array->Ptr)
+ elt * at->array->StrideB;
- at->func( at->index, src );
+ at->func(at->index, src);
}
/* emit conventional arrays elements */
@@ -1665,8 +1695,7 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
const GLubyte *src
= ADD_POINTERS(aa->array->BufferObj->Pointer, aa->array->Ptr)
+ elt * aa->array->StrideB;
- CALL_by_offset( disp, (array_func), aa->offset,
- ((const void *) src) );
+ CALL_by_offset(disp, (array_func), aa->offset, ((const void *) src));
}
if (do_map)
@@ -1674,16 +1703,16 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
}
-void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state )
+void
+_ae_invalidate_state(struct gl_context *ctx, GLuint new_state)
{
AEcontext *actx = AE_CONTEXT(ctx);
-
/* Only interested in this subset of mesa state. Need to prune
* this down as both tnl/ and the drivers can raise statechanges
* for arcane reasons in the middle of seemingly atomic operations
* like DrawElements, over which we'd like to keep a known set of
- * arrays and vbo's mapped.
+ * arrays and vbo's mapped.
*
* Luckily, neither the drivers nor tnl muck with the state that
* concerns us here:
@@ -1696,8 +1725,9 @@ void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state )
}
-void _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
- const GLvertexformat *vfmt)
+void
+_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
{
SET_ArrayElement(disp, vfmt->ArrayElement);
}
diff --git a/mesalib/src/mesa/main/api_arrayelt.h b/mesalib/src/mesa/main/api_arrayelt.h
index 988703259..e250cb4c8 100644
--- a/mesalib/src/mesa/main/api_arrayelt.h
+++ b/mesalib/src/mesa/main/api_arrayelt.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -28,13 +29,8 @@
#define API_ARRAYELT_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
-#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) \
- do { \
- (vfmt)->ArrayElement = impl ## ArrayElement; \
- } while (0)
extern GLboolean _ae_create_context( struct gl_context *ctx );
extern void _ae_destroy_context( struct gl_context *ctx );
diff --git a/mesalib/src/mesa/main/api_exec.h b/mesalib/src/mesa/main/api_exec.h
index 94f7f41c1..bcf461163 100644
--- a/mesalib/src/mesa/main/api_exec.h
+++ b/mesalib/src/mesa/main/api_exec.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/api_loopback.c b/mesalib/src/mesa/main/api_loopback.c
index 59d399b42..938e9b5c0 100644
--- a/mesalib/src/mesa/main/api_loopback.c
+++ b/mesalib/src/mesa/main/api_loopback.c
@@ -23,9 +23,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -36,7 +37,6 @@
#include "glapi/glapi.h"
#include "glapi/glthread.h"
#include "main/dispatch.h"
-#include "mfeatures.h"
#include "main/context.h"
/* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
diff --git a/mesalib/src/mesa/main/api_loopback.h b/mesalib/src/mesa/main/api_loopback.h
index c35d57bff..af6572d1b 100644
--- a/mesalib/src/mesa/main/api_loopback.h
+++ b/mesalib/src/mesa/main/api_loopback.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -28,14 +29,12 @@
#define API_LOOPBACK_H
#include "main/compiler.h"
-#include "main/mfeatures.h"
#include "main/glheader.h" // ?
#include "main/macros.h" // ?
#include "main/mtypes.h" // ?
#include "glapi/glapi.h" // ?
#include "glapi/glthread.h" // ?
#include "main/dispatch.h" // ?
-#include "main/mfeatures.h" // ?
#include "main/context.h" // ?
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index 53b00211b..30a195350 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdbool.h>
@@ -28,7 +29,6 @@
#include "bufferobj.h"
#include "context.h"
#include "imports.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "enums.h"
#include "vbo/vbo.h"
@@ -201,12 +201,11 @@ check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type,
* Is 'mode' a valid value for glBegin(), glDrawArrays(), glDrawElements(),
* etc? The set of legal values depends on whether geometry shaders/programs
* are supported.
+ * Note: This may be called during display list compilation.
*/
-GLboolean
-_mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
+bool
+_mesa_is_valid_prim_mode(struct gl_context *ctx, GLenum mode)
{
- bool valid_enum;
-
switch (mode) {
case GL_POINTS:
case GL_LINES:
@@ -215,24 +214,32 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
case GL_TRIANGLES:
case GL_TRIANGLE_STRIP:
case GL_TRIANGLE_FAN:
- valid_enum = true;
- break;
+ return true;
case GL_QUADS:
case GL_QUAD_STRIP:
case GL_POLYGON:
- valid_enum = (ctx->API == API_OPENGL_COMPAT);
- break;
+ return (ctx->API == API_OPENGL_COMPAT);
case GL_LINES_ADJACENCY:
case GL_LINE_STRIP_ADJACENCY:
case GL_TRIANGLES_ADJACENCY:
case GL_TRIANGLE_STRIP_ADJACENCY:
- valid_enum = _mesa_is_desktop_gl(ctx)
- && ctx->Extensions.ARB_geometry_shader4;
- break;
+ return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4;
default:
- valid_enum = false;
- break;
+ return false;
}
+}
+
+
+/**
+ * Is 'mode' a valid value for glBegin(), glDrawArrays(), glDrawElements(),
+ * etc? Also, do additional checking related to transformation feedback.
+ * Note: this function cannot be called during glNewList(GL_COMPILE) because
+ * this code depends on current transform feedback state.
+ */
+GLboolean
+_mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
+{
+ bool valid_enum = _mesa_is_valid_prim_mode(ctx, mode);
if (!valid_enum) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(mode=%x)", name, mode);
diff --git a/mesalib/src/mesa/main/api_validate.h b/mesalib/src/mesa/main/api_validate.h
index 0ca9c90d9..a5004b8a3 100644
--- a/mesalib/src/mesa/main/api_validate.h
+++ b/mesalib/src/mesa/main/api_validate.h
@@ -18,18 +18,18 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef API_VALIDATE_H
#define API_VALIDATE_H
-
+#include <stdbool.h>
#include "glheader.h"
-#include "mfeatures.h"
struct gl_buffer_object;
struct gl_context;
@@ -42,6 +42,9 @@ _mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
struct gl_buffer_object *elementBuf);
+extern bool
+_mesa_is_valid_prim_mode(struct gl_context *ctx, GLenum mode);
+
extern GLboolean
_mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name);
diff --git a/mesalib/src/mesa/main/arbprogram.c b/mesalib/src/mesa/main/arbprogram.c
index 5730ea495..327f582cb 100644
--- a/mesalib/src/mesa/main/arbprogram.c
+++ b/mesalib/src/mesa/main/arbprogram.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/main/arbprogram.h b/mesalib/src/mesa/main/arbprogram.h
index 4f40a70c5..2b31b9984 100644
--- a/mesalib/src/mesa/main/arbprogram.h
+++ b/mesalib/src/mesa/main/arbprogram.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c
index ac3e7e666..34d50955f 100644
--- a/mesalib/src/mesa/main/arrayobj.c
+++ b/mesalib/src/mesa/main/arrayobj.c
@@ -19,10 +19,10 @@
* 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 OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -44,7 +44,6 @@
#include "image.h"
#include "imports.h"
#include "context.h"
-#include "mfeatures.h"
#include "bufferobj.h"
#include "arrayobj.h"
#include "macros.h"
diff --git a/mesalib/src/mesa/main/arrayobj.h b/mesalib/src/mesa/main/arrayobj.h
index 0d58bb75a..d7ff35a56 100644
--- a/mesalib/src/mesa/main/arrayobj.h
+++ b/mesalib/src/mesa/main/arrayobj.h
@@ -19,10 +19,10 @@
* 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 OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef ARRAYOBJ_H
diff --git a/mesalib/src/mesa/main/atifragshader.c b/mesalib/src/mesa/main/atifragshader.c
index 2a0790862..7077c96f1 100644
--- a/mesalib/src/mesa/main/atifragshader.c
+++ b/mesalib/src/mesa/main/atifragshader.c
@@ -26,7 +26,6 @@
#include "main/hash.h"
#include "main/imports.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/enums.h"
#include "main/mtypes.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/atifragshader.h b/mesalib/src/mesa/main/atifragshader.h
index c47a7d56e..afaea009d 100644
--- a/mesalib/src/mesa/main/atifragshader.h
+++ b/mesalib/src/mesa/main/atifragshader.h
@@ -10,7 +10,6 @@
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
struct _glapi_table;
struct gl_context;
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index a672845bf..249e88a4a 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
@@ -43,7 +44,6 @@
#include "lines.h"
#include "macros.h"
#include "matrix.h"
-#include "mfeatures.h"
#include "multisample.h"
#include "points.h"
#include "polygon.h"
@@ -1399,7 +1399,6 @@ copy_array_attrib(struct gl_context *ctx,
dest->PrimitiveRestartFixedIndex = src->PrimitiveRestartFixedIndex;
dest->_PrimitiveRestart = src->_PrimitiveRestart;
dest->RestartIndex = src->RestartIndex;
- dest->_RestartIndex = src->_RestartIndex;
/* skip NewState */
/* skip RebindArrays */
@@ -1578,7 +1577,6 @@ _mesa_PopClientAttrib(void)
copy_pixelstore(ctx, &ctx->Pack, store);
_mesa_reference_buffer_object(ctx, &store->BufferObj, NULL);
}
- ctx->NewState |= _NEW_PACKUNPACK;
break;
case GL_CLIENT_UNPACK_BIT:
{
@@ -1587,7 +1585,6 @@ _mesa_PopClientAttrib(void)
copy_pixelstore(ctx, &ctx->Unpack, store);
_mesa_reference_buffer_object(ctx, &store->BufferObj, NULL);
}
- ctx->NewState |= _NEW_PACKUNPACK;
break;
case GL_CLIENT_VERTEX_ARRAY_BIT: {
struct gl_array_attrib * attr =
diff --git a/mesalib/src/mesa/main/attrib.h b/mesalib/src/mesa/main/attrib.h
index 1ecf3a591..bb9fc5a94 100644
--- a/mesalib/src/mesa/main/attrib.h
+++ b/mesalib/src/mesa/main/attrib.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef ATTRIB_H
@@ -28,7 +29,6 @@
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
struct _glapi_table;
struct gl_context;
diff --git a/mesalib/src/mesa/main/bitset.h b/mesalib/src/mesa/main/bitset.h
index 28b3c127e..aceaa0d4d 100644
--- a/mesalib/src/mesa/main/bitset.h
+++ b/mesalib/src/mesa/main/bitset.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -42,8 +43,8 @@
/* bitset declarations
*/
-#define BITSET_DECLARE(name, size) \
- BITSET_WORD name[((size) + BITSET_WORDBITS - 1) / BITSET_WORDBITS]
+#define BITSET_WORDS(bits) (ALIGN(bits, BITSET_WORDBITS) / BITSET_WORDBITS)
+#define BITSET_DECLARE(name, bits) BITSET_WORD name[BITSET_WORDS(bits)]
/* bitset operations
*/
diff --git a/mesalib/src/mesa/main/blend.c b/mesalib/src/mesa/main/blend.c
index 09a1c9ae8..0c28352b2 100644
--- a/mesalib/src/mesa/main/blend.c
+++ b/mesalib/src/mesa/main/blend.c
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -783,7 +784,6 @@ _mesa_ClampColor(GLenum target, GLenum clamp)
_mesa_update_clamp_fragment_color(ctx);
break;
case GL_CLAMP_READ_COLOR_ARB:
- FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ClampReadColor = clamp;
break;
default:
@@ -856,6 +856,23 @@ _mesa_update_clamp_vertex_color(struct gl_context *ctx)
ctx->Light._ClampVertexColor = _mesa_get_clamp_vertex_color(ctx);
}
+/**
+ * Returns an appropriate gl_format for color rendering based on the
+ * GL_FRAMEBUFFER_SRGB state.
+ *
+ * Some drivers implement GL_FRAMEBUFFER_SRGB using a flag on the blend state
+ * (which GL_FRAMEBUFFER_SRGB maps to reasonably), but some have to do so by
+ * overriding the format of the surface. This is a helper for doing the
+ * surface format override variant.
+ */
+gl_format
+_mesa_get_render_format(const struct gl_context *ctx, gl_format format)
+{
+ if (ctx->Color.sRGBEnabled)
+ return format;
+ else
+ return _mesa_get_srgb_format_linear(format);
+}
/**********************************************************************/
/** \name Initialization */
diff --git a/mesalib/src/mesa/main/blend.h b/mesalib/src/mesa/main/blend.h
index 621311d55..b43b3ccb3 100644
--- a/mesalib/src/mesa/main/blend.h
+++ b/mesalib/src/mesa/main/blend.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -34,6 +35,7 @@
#include "glheader.h"
+#include "formats.h"
struct gl_context;
@@ -114,6 +116,9 @@ _mesa_update_clamp_fragment_color(struct gl_context *ctx);
extern void
_mesa_update_clamp_vertex_color(struct gl_context *ctx);
+extern gl_format
+_mesa_get_render_format(const struct gl_context *ctx, gl_format format);
+
extern void
_mesa_init_color( struct gl_context * ctx );
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index ba464fe9f..29ac6897b 100644
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/src/mesa/main/bufferobj.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -39,7 +40,6 @@
#include "context.h"
#include "bufferobj.h"
#include "fbobject.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "texobj.h"
#include "transformfeedback.h"
@@ -619,13 +619,10 @@ _mesa_init_buffer_objects( struct gl_context *ctx )
_mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer,
ctx->Shared->NullBufferObj);
- ctx->UniformBufferBindings = calloc(ctx->Const.MaxUniformBufferBindings,
- sizeof(*ctx->UniformBufferBindings));
-
_mesa_reference_buffer_object(ctx, &ctx->UniformBuffer,
ctx->Shared->NullBufferObj);
- for (i = 0; i < ctx->Const.MaxUniformBufferBindings; i++) {
+ for (i = 0; i < MAX_COMBINED_UNIFORM_BUFFERS; i++) {
_mesa_reference_buffer_object(ctx,
&ctx->UniformBufferBindings[i].BufferObject,
ctx->Shared->NullBufferObj);
@@ -647,14 +644,11 @@ _mesa_free_buffer_objects( struct gl_context *ctx )
_mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, NULL);
- for (i = 0; i < ctx->Const.MaxUniformBufferBindings; i++) {
+ for (i = 0; i < MAX_COMBINED_UNIFORM_BUFFERS; i++) {
_mesa_reference_buffer_object(ctx,
&ctx->UniformBufferBindings[i].BufferObject,
NULL);
}
-
- free(ctx->UniformBufferBindings);
- ctx->UniformBufferBindings = NULL;
}
static bool
@@ -2060,7 +2054,8 @@ set_ubo_binding(struct gl_context *ctx,
return;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFER_OBJECT);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewUniformBuffer;
_mesa_reference_buffer_object(ctx, &binding->BufferObject, bufObj);
binding->Offset = offset;
diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h
index e98e47670..249178a7a 100644
--- a/mesalib/src/mesa/main/bufferobj.h
+++ b/mesalib/src/mesa/main/bufferobj.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#define BUFFEROBJ_H
-#include "mfeatures.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/buffers.c b/mesalib/src/mesa/main/buffers.c
index 3f5cbcda7..12e636b17 100644
--- a/mesalib/src/mesa/main/buffers.c
+++ b/mesalib/src/mesa/main/buffers.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -226,8 +227,8 @@ read_buffer_enum_to_index(GLenum buffer)
* \param buffer buffer token such as GL_LEFT or GL_FRONT_AND_BACK, etc.
*
* Note that the behaviour of this function depends on whether the
- * current ctx->DrawBuffer is a window-system framebuffer (Name=0) or
- * a user-created framebuffer object (Name!=0).
+ * current ctx->DrawBuffer is a window-system framebuffer or a user-created
+ * framebuffer object.
* In the former case, we update the per-context ctx->Color.DrawBuffer
* state var _and_ the FB's ColorDrawBuffer state.
* In the later case, we update the FB's ColorDrawBuffer state only.
@@ -645,7 +646,6 @@ _mesa_ReadBuffer(GLenum buffer)
/* OK, all error checking has been completed now */
_mesa_readbuffer(ctx, buffer, srcBuffer);
- ctx->NewState |= _NEW_BUFFERS;
/*
* Call device driver function.
diff --git a/mesalib/src/mesa/main/buffers.h b/mesalib/src/mesa/main/buffers.h
index e9768f944..59fce4b05 100644
--- a/mesalib/src/mesa/main/buffers.h
+++ b/mesalib/src/mesa/main/buffers.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/clear.c b/mesalib/src/mesa/main/clear.c
index af9433306..fb3e576e6 100644
--- a/mesalib/src/mesa/main/clear.c
+++ b/mesalib/src/mesa/main/clear.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -46,10 +47,6 @@ _mesa_ClearIndex( GLfloat c )
{
GET_CURRENT_CONTEXT(ctx);
- if (ctx->Color.ClearIndex == (GLuint) c)
- return;
-
- FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ClearIndex = (GLuint) c;
}
@@ -71,19 +68,12 @@ _mesa_ClearIndex( GLfloat c )
void GLAPIENTRY
_mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
{
- GLfloat tmp[4];
GET_CURRENT_CONTEXT(ctx);
- tmp[0] = red;
- tmp[1] = green;
- tmp[2] = blue;
- tmp[3] = alpha;
-
- if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.f))
- return; /* no change */
-
- FLUSH_VERTICES(ctx, _NEW_COLOR);
- COPY_4V(ctx->Color.ClearColor.f, tmp);
+ ctx->Color.ClearColor.f[0] = red;
+ ctx->Color.ClearColor.f[1] = green;
+ ctx->Color.ClearColor.f[2] = blue;
+ ctx->Color.ClearColor.f[3] = alpha;
}
@@ -93,19 +83,12 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
void GLAPIENTRY
_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
{
- GLint tmp[4];
GET_CURRENT_CONTEXT(ctx);
- tmp[0] = r;
- tmp[1] = g;
- tmp[2] = b;
- tmp[3] = a;
-
- if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.i))
- return; /* no change */
-
- FLUSH_VERTICES(ctx, _NEW_COLOR);
- COPY_4V(ctx->Color.ClearColor.i, tmp);
+ ctx->Color.ClearColor.i[0] = r;
+ ctx->Color.ClearColor.i[1] = g;
+ ctx->Color.ClearColor.i[2] = b;
+ ctx->Color.ClearColor.i[3] = a;
}
@@ -115,19 +98,12 @@ _mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
void GLAPIENTRY
_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
{
- GLuint tmp[4];
GET_CURRENT_CONTEXT(ctx);
- tmp[0] = r;
- tmp[1] = g;
- tmp[2] = b;
- tmp[3] = a;
-
- if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.ui))
- return; /* no change */
-
- FLUSH_VERTICES(ctx, _NEW_COLOR);
- COPY_4V(ctx->Color.ClearColor.ui, tmp);
+ ctx->Color.ClearColor.ui[0] = r;
+ ctx->Color.ClearColor.ui[1] = g;
+ ctx->Color.ClearColor.ui[2] = b;
+ ctx->Color.ClearColor.ui[3] = a;
}
diff --git a/mesalib/src/mesa/main/clear.h b/mesalib/src/mesa/main/clear.h
index 783271920..e410ee6f1 100644
--- a/mesalib/src/mesa/main/clear.h
+++ b/mesalib/src/mesa/main/clear.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/clip.c b/mesalib/src/mesa/main/clip.c
index b01dd3c97..ebca202be 100644
--- a/mesalib/src/mesa/main/clip.c
+++ b/mesalib/src/mesa/main/clip.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/clip.h b/mesalib/src/mesa/main/clip.h
index a8e6d7687..dc65cf36c 100644
--- a/mesalib/src/mesa/main/clip.h
+++ b/mesalib/src/mesa/main/clip.h
@@ -21,9 +21,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/colormac.h b/mesalib/src/mesa/main/colormac.h
index 4294f3239..16c245225 100644
--- a/mesalib/src/mesa/main/colormac.h
+++ b/mesalib/src/mesa/main/colormac.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/colortab.c b/mesalib/src/mesa/main/colortab.c
index c201a27cb..18f993adf 100644
--- a/mesalib/src/mesa/main/colortab.c
+++ b/mesalib/src/mesa/main/colortab.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "context.h"
#include "image.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "pack.h"
#include "pbo.h"
diff --git a/mesalib/src/mesa/main/colortab.h b/mesalib/src/mesa/main/colortab.h
index f25fbe8a5..1c1854868 100644
--- a/mesalib/src/mesa/main/colortab.h
+++ b/mesalib/src/mesa/main/colortab.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index 8431534c3..1e10f2749 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h
index 8e83c3eab..4469fa808 100644
--- a/mesalib/src/mesa/main/config.h
+++ b/mesalib/src/mesa/main/config.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -94,9 +95,6 @@
/** Line width granularity */
#define LINE_WIDTH_GRANULARITY 0.1
-/** Max texture palette / color table size */
-#define MAX_COLOR_TABLE_SIZE 256
-
/** Max memory to allow for a single texture image (in megabytes) */
#define MAX_TEXTURE_MBYTES 1024
@@ -174,6 +172,9 @@
/*@{*/
#define MAX_PROGRAM_LOCAL_PARAMS 4096
#define MAX_UNIFORMS 4096
+#define MAX_UNIFORM_BUFFERS 15 /* + 1 default uniform buffer */
+/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
+#define MAX_COMBINED_UNIFORM_BUFFERS (MAX_UNIFORM_BUFFERS * 6)
/*@}*/
/**
@@ -222,9 +223,8 @@
/** For GL_ARB_vertex_shader */
/*@{*/
#define MAX_VERTEX_GENERIC_ATTRIBS 16
-#define MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS
-#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_VERTEX_TEXTURE_IMAGE_UNITS + \
- MAX_TEXTURE_IMAGE_UNITS)
+/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
+#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS * 6)
/*@}*/
@@ -249,9 +249,6 @@
/** For GL_ARB_geometry_shader4 */
/*@{*/
-#define MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 8
-#define MAX_GEOMETRY_VARYING_COMPONENTS 32
-#define MAX_VERTEX_VARYING_COMPONENTS 32
#define MAX_GEOMETRY_UNIFORM_COMPONENTS 512
#define MAX_GEOMETRY_OUTPUT_VERTICES 256
#define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 1024
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index 053993421..0053525e8 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -77,7 +78,6 @@
#include "glheader.h"
-#include "mfeatures.h"
#include "imports.h"
#include "accum.h"
#include "api_exec.h"
@@ -552,9 +552,9 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE;
ctx->Const.MaxArrayTextureLayers = MAX_ARRAY_TEXTURE_LAYERS;
ctx->Const.MaxTextureCoordUnits = MAX_TEXTURE_COORD_UNITS;
- ctx->Const.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.FragmentProgram.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureCoordUnits,
- ctx->Const.MaxTextureImageUnits);
+ ctx->Const.FragmentProgram.MaxTextureImageUnits);
ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY;
ctx->Const.MaxTextureLodBias = MAX_TEXTURE_LOD_BIAS;
ctx->Const.MaxTextureBufferSize = 65536;
@@ -571,7 +571,6 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MinLineWidthAA = MIN_LINE_WIDTH;
ctx->Const.MaxLineWidthAA = MAX_LINE_WIDTH;
ctx->Const.LineWidthGranularity = (GLfloat) LINE_WIDTH_GRANULARITY;
- ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE;
ctx->Const.MaxClipPlanes = 6;
ctx->Const.MaxLights = MAX_LIGHTS;
ctx->Const.MaxShininess = 128.0;
@@ -601,12 +600,10 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxColorAttachments = MAX_COLOR_ATTACHMENTS;
ctx->Const.MaxRenderbufferSize = MAX_RENDERBUFFER_SIZE;
- ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.VertexProgram.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVarying = 16; /* old limit not to break tnl and swrast */
- ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
- ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
- ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;
+ ctx->Const.GeometryProgram.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
ctx->Const.MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
@@ -676,27 +673,25 @@ check_context_limits(struct gl_context *ctx)
assert(VARYING_SLOT_MAX <=
(8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead)));
- assert(MAX_COMBINED_TEXTURE_IMAGE_UNITS <= 8 * sizeof(GLbitfield));
-
/* shader-related checks */
assert(ctx->Const.FragmentProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
assert(ctx->Const.VertexProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
/* Texture unit checks */
- assert(ctx->Const.MaxTextureImageUnits > 0);
- assert(ctx->Const.MaxTextureImageUnits <= MAX_TEXTURE_IMAGE_UNITS);
+ assert(ctx->Const.FragmentProgram.MaxTextureImageUnits > 0);
+ assert(ctx->Const.FragmentProgram.MaxTextureImageUnits <= MAX_TEXTURE_IMAGE_UNITS);
assert(ctx->Const.MaxTextureCoordUnits > 0);
assert(ctx->Const.MaxTextureCoordUnits <= MAX_TEXTURE_COORD_UNITS);
assert(ctx->Const.MaxTextureUnits > 0);
assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_IMAGE_UNITS);
assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_COORD_UNITS);
- assert(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits,
+ assert(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.FragmentProgram.MaxTextureImageUnits,
ctx->Const.MaxTextureCoordUnits));
assert(ctx->Const.MaxCombinedTextureImageUnits > 0);
assert(ctx->Const.MaxCombinedTextureImageUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS);
assert(ctx->Const.MaxTextureCoordUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS);
/* number of coord units cannot be greater than number of image units */
- assert(ctx->Const.MaxTextureCoordUnits <= ctx->Const.MaxTextureImageUnits);
+ assert(ctx->Const.MaxTextureCoordUnits <= ctx->Const.FragmentProgram.MaxTextureImageUnits);
/* Texture size checks */
@@ -924,7 +919,6 @@ create_beginend_table(const struct gl_context *ctx)
COPY_DISPATCH(MapBuffer);
COPY_DISPATCH(UnmapBuffer);
COPY_DISPATCH(MapBufferRange);
- COPY_DISPATCH(MapBufferRange);
COPY_DISPATCH(ObjectPurgeableAPPLE);
COPY_DISPATCH(ObjectUnpurgeableAPPLE);
@@ -1080,6 +1074,7 @@ _mesa_initialize_context(struct gl_context *ctx,
return GL_TRUE;
fail:
+ _mesa_reference_shared_state(ctx, &ctx->Shared, NULL);
free(ctx->BeginEnd);
free(ctx->Exec);
free(ctx->Save);
@@ -1180,6 +1175,7 @@ _mesa_free_context_data( struct gl_context *ctx )
_mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL);
/* free dispatch tables */
+ free(ctx->BeginEnd);
free(ctx->Exec);
free(ctx->Save);
@@ -1724,18 +1720,6 @@ _mesa_Flush(void)
}
-/**
- * Set mvp_with_dp4 flag. If a driver has a preference for DP4 over
- * MUL/MAD, or vice versa, call this function to register that.
- * Otherwise we default to MUL/MAD.
- */
-void
-_mesa_set_mvp_with_dp4( struct gl_context *ctx,
- GLboolean flag )
-{
- ctx->mvp_with_dp4 = flag;
-}
-
/*
* ARB_blend_func_extended - ERRORS section
* "The error INVALID_OPERATION is generated by Begin or any procedure that
diff --git a/mesalib/src/mesa/main/context.h b/mesalib/src/mesa/main/context.h
index 1b881f3f3..0118e5f6a 100644
--- a/mesalib/src/mesa/main/context.h
+++ b/mesalib/src/mesa/main/context.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -154,11 +155,6 @@ extern struct _glapi_table *
_mesa_get_dispatch(struct gl_context *ctx);
-void
-_mesa_set_mvp_with_dp4( struct gl_context *ctx,
- GLboolean flag );
-
-
extern GLboolean
_mesa_valid_to_render(struct gl_context *ctx, const char *where);
@@ -190,6 +186,28 @@ _mesa_Flush( void );
/**
+ * Are we currently between glBegin and glEnd?
+ * During execution, not display list compilation.
+ */
+static inline GLboolean
+_mesa_inside_begin_end(const struct gl_context *ctx)
+{
+ return ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END;
+}
+
+
+/**
+ * Are we currently between glBegin and glEnd in a display list?
+ */
+static inline GLboolean
+_mesa_inside_dlist_begin_end(const struct gl_context *ctx)
+{
+ return ctx->Driver.CurrentSavePrimitive <= PRIM_MAX;
+}
+
+
+
+/**
* \name Macros for flushing buffered rendering commands before state changes,
* checking if inside glBegin/glEnd, etc.
*/
@@ -242,7 +260,7 @@ do { \
*/
#define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \
do { \
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \
+ if (_mesa_inside_begin_end(ctx)) { \
_mesa_error(ctx, GL_INVALID_OPERATION, "Inside glBegin/glEnd"); \
return retval; \
} \
@@ -256,7 +274,7 @@ do { \
*/
#define ASSERT_OUTSIDE_BEGIN_END(ctx) \
do { \
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \
+ if (_mesa_inside_begin_end(ctx)) { \
_mesa_error(ctx, GL_INVALID_OPERATION, "Inside glBegin/glEnd"); \
return; \
} \
diff --git a/mesalib/src/mesa/main/convolve.c b/mesalib/src/mesa/main/convolve.c
index dfc1b9465..5f1e85b6b 100644
--- a/mesalib/src/mesa/main/convolve.c
+++ b/mesalib/src/mesa/main/convolve.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -36,7 +37,6 @@
#include "colormac.h"
#include "convolve.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/convolve.h b/mesalib/src/mesa/main/convolve.h
index 812debd61..3d4c999d9 100644
--- a/mesalib/src/mesa/main/convolve.h
+++ b/mesalib/src/mesa/main/convolve.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "compiler.h"
-#include "mfeatures.h"
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/cpuinfo.c b/mesalib/src/mesa/main/cpuinfo.c
index 41505f637..3b4ff8cd1 100644
--- a/mesalib/src/mesa/main/cpuinfo.c
+++ b/mesalib/src/mesa/main/cpuinfo.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/cpuinfo.h b/mesalib/src/mesa/main/cpuinfo.h
index bf846ef40..31de9b2e4 100644
--- a/mesalib/src/mesa/main/cpuinfo.h
+++ b/mesalib/src/mesa/main/cpuinfo.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/dd.h b/mesalib/src/mesa/main/dd.h
index 8f3cd3d6b..13c7a83d4 100644
--- a/mesalib/src/mesa/main/dd.h
+++ b/mesalib/src/mesa/main/dd.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -354,7 +355,9 @@ struct dd_function_table {
* \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
* GL_MAP_INVALIDATE_RANGE_BIT (if writing)
* \param mapOut returns start of mapping of region of interest
- * \param rowStrideOut returns row stride (in bytes)
+ * \param rowStrideOut returns row stride (in bytes). In the case of a
+ * compressed texture, this is the byte stride between one row of blocks
+ * and another.
*/
void (*MapTextureImage)(struct gl_context *ctx,
struct gl_texture_image *texImage,
@@ -622,7 +625,7 @@ struct dd_function_table {
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att);
void (*FinishRenderTexture)(struct gl_context *ctx,
- struct gl_renderbuffer_attachment *att);
+ struct gl_renderbuffer *rb);
void (*ValidateFramebuffer)(struct gl_context *ctx,
struct gl_framebuffer *fb);
/*@}*/
@@ -682,10 +685,9 @@ struct dd_function_table {
GLuint CurrentExecPrimitive;
/**
- * Current state of an in-progress compilation.
- *
- * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
- * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
+ * Current glBegin state of an in-progress compilation. May be
+ * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
+ * or PRIM_UNKNOWN.
*/
GLuint CurrentSavePrimitive;
@@ -694,15 +696,16 @@ struct dd_function_table {
#define FLUSH_UPDATE_CURRENT 0x2
/**
* Set by the driver-supplied T&L engine whenever vertices are buffered
- * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not
- * updated.
+ * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
+ * is not updated. A bitmask of the FLUSH_x values above.
*
* The dd_function_table::FlushVertices call below may be used to resolve
* these conditions.
*/
- GLuint NeedFlush;
- GLuint SaveNeedFlush;
+ GLbitfield NeedFlush;
+ /** Need to call SaveFlushVertices() upon state change? */
+ GLboolean SaveNeedFlush;
/* Called prior to any of the GLvertexformat functions being
* called. Paired with Driver.FlushVertices().
@@ -848,28 +851,17 @@ struct dd_function_table {
/**
- * Transform/Clip/Lighting interface
- *
- * Drivers present a reduced set of the functions possible in
- * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
- * remaining functions to map down to these entry points.
+ * Per-vertex functions.
*
- * These are the initial values to be installed into dispatch by
- * mesa. If the T&L driver wants to modify the dispatch table
- * while installed, it must do so itself. It would be possible for
- * the vertexformat to install its own initial values for these
- * functions, but this way there is an obvious list of what is
- * expected of the driver.
+ * These are the functions which can appear between glBegin and glEnd.
+ * Depending on whether we're inside or outside a glBegin/End pair
+ * and whether we're in immediate mode or building a display list, these
+ * functions behave differently. This structure allows us to switch
+ * between those modes more easily.
*
- * If the driver wants to hook in entry points other than those
- * listed, it must restore them to their original values in
- * the disable() callback, below.
+ * Generally, these pointers point to functions in the VBO module.
*/
typedef struct {
- /**
- * \name Vertex
- */
- /*@{*/
void (GLAPIENTRYP ArrayElement)( GLint );
void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
void (GLAPIENTRYP Color3fv)( const GLfloat * );
@@ -1017,84 +1009,6 @@ typedef struct {
void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
GLboolean normalized,
const GLuint *value);
-
- /*@}*/
-
- void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
-
- /**
- * \name Array
- */
- /*@{*/
- void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
- void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices );
- void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
- GLuint end, GLsizei count,
- GLenum type, const GLvoid *indices );
- void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count,
- GLenum type,
- const GLvoid **indices,
- GLsizei primcount);
- void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
- GLenum type,
- const GLvoid *indices,
- GLint basevertex );
- void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
- GLuint end, GLsizei count,
- GLenum type,
- const GLvoid *indices,
- GLint basevertex);
- void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
- const GLsizei *count,
- GLenum type,
- const GLvoid * const *indices,
- GLsizei primcount,
- const GLint *basevertex);
- void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first,
- GLsizei count, GLsizei primcount);
- void (GLAPIENTRYP DrawArraysInstancedBaseInstance)(GLenum mode, GLint first,
- GLsizei count, GLsizei primcount,
- GLuint baseinstance);
- void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count,
- GLenum type, const GLvoid *indices,
- GLsizei primcount);
- void (GLAPIENTRYP DrawElementsInstancedBaseInstance)(GLenum mode, GLsizei count,
- GLenum type, const GLvoid *indices,
- GLsizei primcount, GLuint baseinstance);
- void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count,
- GLenum type, const GLvoid *indices,
- GLsizei primcount, GLint basevertex);
- void (GLAPIENTRYP DrawElementsInstancedBaseVertexBaseInstance)(GLenum mode, GLsizei count,
- GLenum type, const GLvoid *indices,
- GLsizei primcount, GLint basevertex,
- GLuint baseinstance);
- void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint name);
- void (GLAPIENTRYP DrawTransformFeedbackStream)(GLenum mode, GLuint name,
- GLuint stream);
- void (GLAPIENTRYP DrawTransformFeedbackInstanced)(GLenum mode, GLuint name,
- GLsizei primcount);
- void (GLAPIENTRYP DrawTransformFeedbackStreamInstanced)(GLenum mode,
- GLuint name,
- GLuint stream,
- GLsizei primcount);
- /*@}*/
-
- /**
- * \name Eval
- *
- * If you don't support eval, fallback to the default vertex format
- * on receiving an eval call and use the pipeline mechanism to
- * provide partial T&L acceleration.
- *
- * Mesa will provide a set of helper functions to do eval within
- * accelerated vertex formats, eventually...
- */
- /*@{*/
- void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
- void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
- /*@}*/
-
} GLvertexformat;
diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c
index aee8ae2dc..bd75e4158 100644
--- a/mesalib/src/mesa/main/debug.c
+++ b/mesalib/src/mesa/main/debug.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "mtypes.h"
@@ -66,7 +67,7 @@ void
_mesa_print_state( const char *msg, GLuint state )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
msg,
state,
(state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "",
@@ -88,7 +89,6 @@ _mesa_print_state( const char *msg, GLuint state )
(state & _NEW_TEXTURE) ? "ctx->Texture, " : "",
(state & _NEW_TRANSFORM) ? "ctx->Transform, " : "",
(state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "",
- (state & _NEW_PACKUNPACK) ? "ctx->Pack/Unpack, " : "",
(state & _NEW_ARRAY) ? "ctx->Array, " : "",
(state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "",
(state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : "");
@@ -96,27 +96,6 @@ _mesa_print_state( const char *msg, GLuint state )
-void
-_mesa_print_tri_caps( const char *name, GLuint flags )
-{
- _mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s\n",
- name,
- flags,
- (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "",
- (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
- (flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "",
- (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",
- (flags & DD_TRI_OFFSET) ? "tri-offset, " : "",
- (flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "",
- (flags & DD_LINE_SMOOTH) ? "line-smooth, " : "",
- (flags & DD_LINE_STIPPLE) ? "line-stipple, " : "",
- (flags & DD_POINT_SMOOTH) ? "point-smooth, " : "",
- (flags & DD_POINT_ATTEN) ? "point-atten, " : ""
- );
-}
-
-
/**
* Print information about this Mesa version and build options.
*/
diff --git a/mesalib/src/mesa/main/debug.h b/mesalib/src/mesa/main/debug.h
index 6bc536591..919a6f3a1 100644
--- a/mesalib/src/mesa/main/debug.h
+++ b/mesalib/src/mesa/main/debug.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -37,12 +38,10 @@
#define _DEBUG_H
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
struct gl_texture_image;
-extern void _mesa_print_tri_caps( const char *name, GLuint flags );
extern void _mesa_print_enable_flags( const char *msg, GLuint flags );
extern void _mesa_print_state( const char *msg, GLuint state );
extern void _mesa_print_info( void );
diff --git a/mesalib/src/mesa/main/depth.c b/mesalib/src/mesa/main/depth.c
index 8aec94a2d..68ad56184 100644
--- a/mesalib/src/mesa/main/depth.c
+++ b/mesalib/src/mesa/main/depth.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -46,13 +47,7 @@ _mesa_ClearDepth( GLclampd depth )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glClearDepth(%f)\n", depth);
- depth = CLAMP( depth, 0.0, 1.0 );
-
- if (ctx->Depth.Clear == depth)
- return;
-
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
- ctx->Depth.Clear = depth;
+ ctx->Depth.Clear = CLAMP( depth, 0.0, 1.0 );
}
diff --git a/mesalib/src/mesa/main/depth.h b/mesalib/src/mesa/main/depth.h
index fe6b33f36..80e753837 100644
--- a/mesalib/src/mesa/main/depth.h
+++ b/mesalib/src/mesa/main/depth.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,7 +34,6 @@
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c
index 4b20d890d..18e3eb760 100644
--- a/mesalib/src/mesa/main/dlist.c
+++ b/mesalib/src/mesa/main/dlist.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -37,7 +38,6 @@
#include "api_validate.h"
#include "atifragshader.h"
#include "config.h"
-#include "mfeatures.h"
#include "bufferobj.h"
#include "arrayobj.h"
#include "context.h"
@@ -69,6 +69,8 @@
#include "main/dispatch.h"
+#include "vbo/vbo.h"
+
/**
@@ -122,8 +124,7 @@ do { \
*/
#define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval) \
do { \
- if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON || \
- ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \
+ if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) { \
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
return retval; \
} \
@@ -137,8 +138,7 @@ do { \
*/
#define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx) \
do { \
- if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON || \
- ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \
+ if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) { \
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
return; \
} \
@@ -1356,7 +1356,14 @@ save_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
"glDrawElementsInstancedBaseVertexBaseInstance() during display list compile");
}
-static void invalidate_saved_current_state( struct gl_context *ctx )
+
+/**
+ * While building a display list we cache some OpenGL state.
+ * Under some circumstances we need to invalidate that state (immediately
+ * when we start compiling a list, or after glCallList(s)).
+ */
+static void
+invalidate_saved_current_state(struct gl_context *ctx)
{
GLint i;
@@ -1371,6 +1378,7 @@ static void invalidate_saved_current_state( struct gl_context *ctx )
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
}
+
static void GLAPIENTRY
save_CallList(GLuint list)
{
@@ -3771,15 +3779,16 @@ save_ShadeModel(GLenum mode)
CALL_ShadeModel(ctx->Exec, (mode));
}
+ /* Don't compile this call if it's a no-op.
+ * By avoiding this state change we have a better chance of
+ * coalescing subsequent drawing commands into one batch.
+ */
if (ctx->ListState.Current.ShadeModel == mode)
return;
SAVE_FLUSH_VERTICES(ctx);
- /* Only save the value if we know the statechange will take effect:
- */
- if (ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END)
- ctx->ListState.Current.ShadeModel = mode;
+ ctx->ListState.Current.ShadeModel = mode;
n = alloc_instruction(ctx, OPCODE_SHADE_MODEL, 1);
if (n) {
@@ -5645,28 +5654,20 @@ static void GLAPIENTRY
save_Begin(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
- Node *n;
- GLboolean error = GL_FALSE;
- if (ctx->ExecuteFlag && !_mesa_valid_prim_mode(ctx, mode, "glBegin")) {
- error = GL_TRUE;
+ if (!_mesa_is_valid_prim_mode(ctx, mode)) {
+ /* compile this error into the display list */
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "glBegin(mode)");
}
- else if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN) {
- /* Typically the first begin. This may raise an error on
- * playback, depending on whether CallList is issued from inside
- * a begin/end or not.
- */
- ctx->Driver.CurrentSavePrimitive = PRIM_INSIDE_UNKNOWN_PRIM;
- }
- else if (ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END) {
- ctx->Driver.CurrentSavePrimitive = mode;
+ else if (_mesa_inside_dlist_begin_end(ctx)) {
+ /* compile this error into the display list */
+ _mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive glBegin");
}
else {
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive begin");
- error = GL_TRUE;
- }
+ Node *n;
+
+ ctx->Driver.CurrentSavePrimitive = mode;
- if (!error) {
/* Give the driver an opportunity to hook in an optimized
* display list compiler.
*/
@@ -5678,10 +5679,10 @@ save_Begin(GLenum mode)
if (n) {
n[1].e = mode;
}
- }
- if (ctx->ExecuteFlag) {
- CALL_Begin(ctx->Exec, (mode));
+ if (ctx->ExecuteFlag) {
+ CALL_Begin(ctx->Exec, (mode));
+ }
}
}
@@ -5702,7 +5703,7 @@ save_Rectf(GLfloat a, GLfloat b, GLfloat c, GLfloat d)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = alloc_instruction(ctx, OPCODE_RECTF, 4);
if (n) {
n[1].f = a;
@@ -7055,7 +7056,10 @@ save_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)
static void GLAPIENTRY
save_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
{
- save_SamplerParameterfv(sampler, pname, &param);
+ GLfloat parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_SamplerParameterfv(sampler, pname, parray);
}
static void GLAPIENTRY
@@ -8631,8 +8635,7 @@ _mesa_NewList(GLuint name, GLenum mode)
ctx->CompileFlag = GL_TRUE;
ctx->ExecuteFlag = (mode == GL_COMPILE_AND_EXECUTE);
- /* Reset acumulated list state:
- */
+ /* Reset accumulated list state */
invalidate_saved_current_state( ctx );
/* Allocate new display list */
@@ -8660,6 +8663,11 @@ _mesa_EndList(void)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glEndList\n");
+ if (ctx->ExecuteFlag && _mesa_inside_dlist_begin_end(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEndList() called inside glBegin/End");
+ }
+
/* Check that a list is under construction */
if (!ctx->ListState.CurrentList) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glEndList");
@@ -8817,6 +8825,9 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
_mesa_loopback_init_api_table(ctx, table);
+ /* VBO functions */
+ vbo_initialize_save_dispatch(ctx, table);
+
/* GL 1.0 */
SET_Accum(table, save_Accum);
SET_AlphaFunc(table, save_AlphaFunc);
@@ -8927,6 +8938,7 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
SET_RasterPos4s(table, save_RasterPos4s);
SET_RasterPos4sv(table, save_RasterPos4sv);
SET_ReadBuffer(table, save_ReadBuffer);
+ SET_Rectf(table, save_Rectf);
SET_Rotated(table, save_Rotated);
SET_Rotatef(table, save_Rotatef);
SET_Scaled(table, save_Scaled);
@@ -9256,6 +9268,18 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
/* GL_ARB_uniform_buffer_object */
SET_UniformBlockBinding(table, save_UniformBlockBinding);
+
+ /* GL_ARB_draw_instanced */
+ SET_DrawArraysInstancedARB(table, save_DrawArraysInstancedARB);
+ SET_DrawElementsInstancedARB(table, save_DrawElementsInstancedARB);
+
+ /* GL_ARB_draw_elements_base_vertex */
+ SET_DrawElementsInstancedBaseVertex(table, save_DrawElementsInstancedBaseVertexARB);
+
+ /* GL_ARB_base_instance */
+ SET_DrawArraysInstancedBaseInstance(table, save_DrawArraysInstancedBaseInstance);
+ SET_DrawElementsInstancedBaseInstance(table, save_DrawElementsInstancedBaseInstance);
+ SET_DrawElementsInstancedBaseVertexBaseInstance(table, save_DrawElementsInstancedBaseVertexBaseInstance);
}
@@ -9548,14 +9572,15 @@ mesa_print_display_list(GLuint list)
/***** Initialization *****/
/**********************************************************************/
-void
-_mesa_save_vtxfmt_init(GLvertexformat * vfmt)
+static void
+save_vtxfmt_init(GLvertexformat * vfmt)
{
- _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+ vfmt->ArrayElement = _ae_ArrayElement;
vfmt->Begin = save_Begin;
- _MESA_INIT_DLIST_VTXFMT(vfmt, save_);
+ vfmt->CallList = save_CallList;
+ vfmt->CallLists = save_CallLists;
vfmt->Color3f = save_Color3f;
vfmt->Color3fv = save_Color3fv;
@@ -9564,7 +9589,12 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt)
vfmt->EdgeFlag = save_EdgeFlag;
vfmt->End = save_End;
- _MESA_INIT_EVAL_VTXFMT(vfmt, save_);
+ vfmt->EvalCoord1f = save_EvalCoord1f;
+ vfmt->EvalCoord1fv = save_EvalCoord1fv;
+ vfmt->EvalCoord2f = save_EvalCoord2f;
+ vfmt->EvalCoord2fv = save_EvalCoord2fv;
+ vfmt->EvalPoint1 = save_EvalPoint1;
+ vfmt->EvalPoint2 = save_EvalPoint2;
vfmt->FogCoordfEXT = save_FogCoordfEXT;
vfmt->FogCoordfvEXT = save_FogCoordfvEXT;
@@ -9605,36 +9635,6 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt)
vfmt->VertexAttrib3fvARB = save_VertexAttrib3fvARB;
vfmt->VertexAttrib4fARB = save_VertexAttrib4fARB;
vfmt->VertexAttrib4fvARB = save_VertexAttrib4fvARB;
-
- vfmt->Rectf = save_Rectf;
-
- /* GL_ARB_draw_instanced */
- vfmt->DrawArraysInstanced = save_DrawArraysInstancedARB;
- vfmt->DrawElementsInstanced = save_DrawElementsInstancedARB;
-
- /* GL_ARB_draw_elements_base_vertex */
- vfmt->DrawElementsInstancedBaseVertex = save_DrawElementsInstancedBaseVertexARB;
-
- /* GL_ARB_base_instance */
- vfmt->DrawArraysInstancedBaseInstance = save_DrawArraysInstancedBaseInstance;
- vfmt->DrawElementsInstancedBaseInstance = save_DrawElementsInstancedBaseInstance;
- vfmt->DrawElementsInstancedBaseVertexBaseInstance = save_DrawElementsInstancedBaseVertexBaseInstance;
-
- /* The driver is required to implement these as
- * 1) They can probably do a better job.
- * 2) A lot of new mechanisms would have to be added to this module
- * to support it. That code would probably never get used,
- * because of (1).
- */
-#if 0
- vfmt->DrawArrays = 0;
- vfmt->DrawElements = 0;
- vfmt->DrawRangeElements = 0;
- vfmt->MultiDrawElemementsEXT = 0;
- vfmt->DrawElementsBaseVertex = 0;
- vfmt->DrawRangeElementsBaseVertex = 0;
- vfmt->MultiDrawElemementsBaseVertex = 0;
-#endif
}
@@ -9674,7 +9674,7 @@ _mesa_init_display_list(struct gl_context *ctx)
/* Display List group */
ctx->List.ListBase = 0;
- _mesa_save_vtxfmt_init(&ctx->ListState.ListVtxfmt);
+ save_vtxfmt_init(&ctx->ListState.ListVtxfmt);
}
diff --git a/mesalib/src/mesa/main/dlist.h b/mesalib/src/mesa/main/dlist.h
index e049476c1..4672d3e60 100644
--- a/mesalib/src/mesa/main/dlist.h
+++ b/mesalib/src/mesa/main/dlist.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,16 +34,9 @@
#define DLIST_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
-#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) \
- do { \
- (vfmt)->CallList = impl ## CallList; \
- (vfmt)->CallLists = impl ## CallLists; \
- } while (0)
-
GLboolean GLAPIENTRY
_mesa_IsList(GLuint list);
void GLAPIENTRY
@@ -72,8 +66,6 @@ extern GLint _mesa_dlist_alloc_opcode( struct gl_context *ctx, GLuint sz,
extern void _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist);
-extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt );
-
extern void _mesa_initialize_save_table(const struct gl_context *);
extern void _mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
diff --git a/mesalib/src/mesa/main/dlopen.h b/mesalib/src/mesa/main/dlopen.h
index 26422b695..b060cdbac 100644
--- a/mesalib/src/mesa/main/dlopen.h
+++ b/mesalib/src/mesa/main/dlopen.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/drawpix.c b/mesalib/src/mesa/main/drawpix.c
index d9f55d3af..e69113bb1 100644
--- a/mesalib/src/mesa/main/drawpix.c
+++ b/mesalib/src/mesa/main/drawpix.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
@@ -31,7 +32,6 @@
#include "feedback.h"
#include "framebuffer.h"
#include "image.h"
-#include "mfeatures.h"
#include "pbo.h"
#include "state.h"
#include "dispatch.h"
diff --git a/mesalib/src/mesa/main/drawpix.h b/mesalib/src/mesa/main/drawpix.h
index 087b3a8c9..57accbf0a 100644
--- a/mesalib/src/mesa/main/drawpix.h
+++ b/mesalib/src/mesa/main/drawpix.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef DRAWPIX_H
@@ -27,7 +28,6 @@
#include "compiler.h"
-#include "mfeatures.h"
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/drawtex.c b/mesalib/src/mesa/main/drawtex.c
index 7285805c8..7c0ec832b 100644
--- a/mesalib/src/mesa/main/drawtex.c
+++ b/mesalib/src/mesa/main/drawtex.c
@@ -24,7 +24,6 @@
#include "main/drawtex.h"
#include "main/state.h"
#include "main/imports.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
diff --git a/mesalib/src/mesa/main/drawtex.h b/mesalib/src/mesa/main/drawtex.h
index b916150b7..28e2435c8 100644
--- a/mesalib/src/mesa/main/drawtex.h
+++ b/mesalib/src/mesa/main/drawtex.h
@@ -26,7 +26,6 @@
#include "glheader.h"
-#include "mfeatures.h"
extern void GLAPIENTRY
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c
index b688f050b..fdde24e36 100644
--- a/mesalib/src/mesa/main/enable.c
+++ b/mesalib/src/mesa/main/enable.c
@@ -21,9 +21,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,7 +34,6 @@
#include "enable.h"
#include "light.h"
#include "simple_list.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "enums.h"
#include "api_arrayelt.h"
@@ -53,11 +53,6 @@ update_derived_primitive_restart_state(struct gl_context *ctx)
{
/* Update derived primitive restart state.
*/
- if (ctx->Array.PrimitiveRestart)
- ctx->Array._RestartIndex = ctx->Array.RestartIndex;
- else
- ctx->Array._RestartIndex = ~0;
-
ctx->Array._PrimitiveRestart = ctx->Array.PrimitiveRestart
|| ctx->Array.PrimitiveRestartFixedIndex;
}
@@ -140,8 +135,6 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
else
arrayObj->_Enabled &= ~flag;
- arrayObj->NewArrays |= flag;
-
if (ctx->Driver.Enable) {
ctx->Driver.Enable( ctx, cap, state );
}
@@ -419,10 +412,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Enabled = state;
- if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
- ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
- else
- ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
break;
case GL_LINE_SMOOTH:
if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
@@ -431,7 +420,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.SmoothFlag = state;
- ctx->_TriangleCaps ^= DD_LINE_SMOOTH;
break;
case GL_LINE_STIPPLE:
if (ctx->API != API_OPENGL_COMPAT)
@@ -440,7 +428,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.StippleFlag = state;
- ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
break;
case GL_INDEX_LOGIC_OP:
if (ctx->API != API_OPENGL_COMPAT)
@@ -617,7 +604,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.SmoothFlag = state;
- ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
break;
case GL_POLYGON_SMOOTH:
if (!_mesa_is_desktop_gl(ctx))
@@ -626,7 +612,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.SmoothFlag = state;
- ctx->_TriangleCaps ^= DD_TRI_SMOOTH;
break;
case GL_POLYGON_STIPPLE:
if (ctx->API != API_OPENGL_COMPAT)
@@ -635,7 +620,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.StippleFlag = state;
- ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
break;
case GL_POLYGON_OFFSET_POINT:
if (!_mesa_is_desktop_gl(ctx))
@@ -966,7 +950,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
CHECK_EXTENSION(EXT_transform_feedback, cap);
if (ctx->RasterDiscard != state) {
- FLUSH_VERTICES(ctx, _NEW_RASTERIZER_DISCARD);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewRasterizerDiscard;
ctx->RasterDiscard = state;
}
break;
diff --git a/mesalib/src/mesa/main/enable.h b/mesalib/src/mesa/main/enable.h
index 5b2515d59..060da5656 100644
--- a/mesalib/src/mesa/main/enable.h
+++ b/mesalib/src/mesa/main/enable.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/enums.h b/mesalib/src/mesa/main/enums.h
index 8f4069426..b2f373a4c 100644
--- a/mesalib/src/mesa/main/enums.h
+++ b/mesalib/src/mesa/main/enums.h
@@ -27,16 +27,16 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _ENUMS_H_
#define _ENUMS_H_
-#include "mfeatures.h"
extern const char *_mesa_lookup_enum_by_nr( int nr );
diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c
index 5c6a393e4..0ee3daef3 100644
--- a/mesalib/src/mesa/main/errors.c
+++ b/mesalib/src/mesa/main/errors.c
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/errors.h b/mesalib/src/mesa/main/errors.h
index 7d8be5aca..b21a44c98 100644
--- a/mesalib/src/mesa/main/errors.h
+++ b/mesalib/src/mesa/main/errors.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -73,6 +74,16 @@ _mesa_gl_debug(struct gl_context *ctx,
enum mesa_debug_severity severity,
const char *fmtString, ...) PRINTFLIKE(5, 6);
+#define _mesa_perf_debug(ctx, sev, ...) do { \
+ static GLuint msg_id = 0; \
+ if (unlikely(ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) { \
+ _mesa_gl_debug(ctx, &msg_id, \
+ MESA_DEBUG_TYPE_PERFORMANCE, \
+ sev, \
+ __VA_ARGS__); \
+ } \
+} while (0)
+
extern void
_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg, int len);
diff --git a/mesalib/src/mesa/main/es1_conversion.c b/mesalib/src/mesa/main/es1_conversion.c
index cd527dd78..60a60e287 100644
--- a/mesalib/src/mesa/main/es1_conversion.c
+++ b/mesalib/src/mesa/main/es1_conversion.c
@@ -1,5 +1,4 @@
#include <stdbool.h>
-#include "main/mfeatures.h"
#include "api_loopback.h"
#include "api_exec.h"
diff --git a/mesalib/src/mesa/main/eval.c b/mesalib/src/mesa/main/eval.c
index b3c284175..349331f00 100644
--- a/mesalib/src/mesa/main/eval.c
+++ b/mesalib/src/mesa/main/eval.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -43,7 +44,6 @@
#include "context.h"
#include "eval.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
@@ -824,8 +824,7 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
void
_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
- const GLvertexformat *vfmt,
- bool beginend)
+ const GLvertexformat *vfmt)
{
SET_EvalCoord1f(disp, vfmt->EvalCoord1f);
SET_EvalCoord1fv(disp, vfmt->EvalCoord1fv);
@@ -833,13 +832,6 @@ _mesa_install_eval_vtxfmt(struct _glapi_table *disp,
SET_EvalCoord2fv(disp, vfmt->EvalCoord2fv);
SET_EvalPoint1(disp, vfmt->EvalPoint1);
SET_EvalPoint2(disp, vfmt->EvalPoint2);
-
- /* glEvalMesh1 and glEvalMesh2 are not allowed between glBegin and glEnd.
- */
- if (!beginend) {
- SET_EvalMesh1(disp, vfmt->EvalMesh1);
- SET_EvalMesh2(disp, vfmt->EvalMesh2);
- }
}
diff --git a/mesalib/src/mesa/main/eval.h b/mesalib/src/mesa/main/eval.h
index cfde53fd6..33240f00d 100644
--- a/mesalib/src/mesa/main/eval.h
+++ b/mesalib/src/mesa/main/eval.h
@@ -27,9 +27,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -37,23 +38,10 @@
#define EVAL_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include <stdbool.h>
-#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) \
- do { \
- (vfmt)->EvalCoord1f = impl ## EvalCoord1f; \
- (vfmt)->EvalCoord1fv = impl ## EvalCoord1fv; \
- (vfmt)->EvalCoord2f = impl ## EvalCoord2f; \
- (vfmt)->EvalCoord2fv = impl ## EvalCoord2fv; \
- (vfmt)->EvalPoint1 = impl ## EvalPoint1; \
- (vfmt)->EvalPoint2 = impl ## EvalPoint2; \
- (vfmt)->EvalMesh1 = impl ## EvalMesh1; \
- (vfmt)->EvalMesh2 = impl ## EvalMesh2; \
- } while (0)
-
extern GLuint _mesa_evaluator_components( GLenum target );
@@ -77,8 +65,7 @@ extern GLfloat *_mesa_copy_map_points2d(GLenum target,
extern void
_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
- const GLvertexformat *vfmt,
- bool beginend);
+ const GLvertexformat *vfmt);
extern void _mesa_init_eval( struct gl_context *ctx );
extern void _mesa_free_eval_data( struct gl_context *ctx );
diff --git a/mesalib/src/mesa/main/execmem.c b/mesalib/src/mesa/main/execmem.c
index ccd6ab43f..5f319661e 100644
--- a/mesalib/src/mesa/main/execmem.c
+++ b/mesalib/src/mesa/main/execmem.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -36,7 +37,7 @@
-#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
+#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
/*
* Allocate a large block of memory which can hold code then dole it out
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index c7f038b88..39aaad48a 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -35,7 +36,6 @@
#include "context.h"
#include "extensions.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
enum {
@@ -102,6 +102,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_framebuffer_object", o(ARB_framebuffer_object), GL, 2005 },
{ "GL_ARB_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 },
{ "GL_ARB_get_program_binary", o(ARB_shader_objects), GL, 2010 },
+ { "GL_ARB_gpu_shader5", o(ARB_gpu_shader5), GL, 2010 },
{ "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 },
@@ -183,6 +184,7 @@ static const struct extension extension_table[] = {
{ "GL_EXT_fog_coord", o(EXT_fog_coord), GLL, 1999 },
{ "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), GL, 2005 },
{ "GL_EXT_framebuffer_multisample", o(EXT_framebuffer_multisample), GL, 2005 },
+ { "GL_EXT_framebuffer_multisample_blit_scaled", o(EXT_framebuffer_multisample_blit_scaled), GL, 2011 },
{ "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), GLL, 2006 },
@@ -278,7 +280,7 @@ static const struct extension extension_table[] = {
{ "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(dummy_true), ES1, 2005 },
- { "GL_OES_texture_npot", o(ARB_texture_non_power_of_two), ES2, 2005 },
+ { "GL_OES_texture_npot", o(ARB_texture_non_power_of_two), ES1 | ES2, 2005 },
{ "GL_OES_vertex_array_object", o(dummy_true), ES1 | ES2, 2010 },
/* Vendor extensions */
@@ -287,6 +289,7 @@ static const struct extension extension_table[] = {
{ "GL_AMD_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 },
{ "GL_AMD_seamless_cubemap_per_texture", o(AMD_seamless_cubemap_per_texture), GL, 2009 },
{ "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
+ { "GL_AMD_vertex_shader_layer", o(AMD_vertex_shader_layer), GL, 2012 },
{ "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 },
{ "GL_APPLE_packed_pixels", o(dummy_true), GLL, 2002 },
{ "GL_APPLE_texture_max_level", o(dummy_true), ES1 | ES2, 2009 },
@@ -398,7 +401,9 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE;
ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE;
- /*ctx->Extensions.ARB_texture_float = GL_TRUE;*/
+#ifdef TEXTURE_FLOAT_ENABLED
+ ctx->Extensions.ARB_texture_float = GL_TRUE;
+#endif
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
ctx->Extensions.ARB_texture_rg = GL_TRUE;
ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
diff --git a/mesalib/src/mesa/main/extensions.h b/mesalib/src/mesa/main/extensions.h
index 8acbd4b68..6e99116da 100644
--- a/mesalib/src/mesa/main/extensions.h
+++ b/mesalib/src/mesa/main/extensions.h
@@ -27,9 +27,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -37,7 +38,6 @@
#define _EXTENSIONS_H_
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index fc2b2620b..39fa242f7 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -42,7 +43,6 @@
#include "glformats.h"
#include "hash.h"
#include "macros.h"
-#include "mfeatures.h"
#include "multisample.h"
#include "mtypes.h"
#include "renderbuffer.h"
@@ -323,12 +323,14 @@ void
_mesa_remove_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att)
{
+ struct gl_renderbuffer *rb = att->Renderbuffer;
+
+ /* tell driver that we're done rendering to this texture. */
+ if (rb && rb->NeedsFinishRenderTexture)
+ ctx->Driver.FinishRenderTexture(ctx, rb);
+
if (att->Type == GL_TEXTURE) {
ASSERT(att->Texture);
- if (ctx->Driver.FinishRenderTexture) {
- /* tell driver that we're done rendering to this texture. */
- ctx->Driver.FinishRenderTexture(ctx, att);
- }
_mesa_reference_texobj(&att->Texture, NULL); /* unbind */
ASSERT(!att->Texture);
}
@@ -341,6 +343,57 @@ _mesa_remove_attachment(struct gl_context *ctx,
att->Complete = GL_TRUE;
}
+/**
+ * Create a renderbuffer which will be set up by the driver to wrap the
+ * texture image slice.
+ *
+ * By using a gl_renderbuffer (like user-allocated renderbuffers), drivers get
+ * to share most of their framebuffer rendering code between winsys,
+ * renderbuffer, and texture attachments.
+ *
+ * The allocated renderbuffer uses a non-zero Name so that drivers can check
+ * it for determining vertical orientation, but we use ~0 to make it fairly
+ * unambiguous with actual user (non-texture) renderbuffers.
+ */
+void
+_mesa_update_texture_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ struct gl_renderbuffer_attachment *att)
+{
+ struct gl_texture_image *texImage;
+ struct gl_renderbuffer *rb;
+
+ texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ if (!texImage)
+ return;
+
+ rb = att->Renderbuffer;
+ if (!rb) {
+ rb = ctx->Driver.NewRenderbuffer(ctx, ~0);
+ if (!rb) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glFramebufferTexture()");
+ return;
+ }
+ _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
+
+ /* This can't get called on a texture renderbuffer, so set it to NULL
+ * for clarity compared to user renderbuffers.
+ */
+ rb->AllocStorage = NULL;
+
+ rb->NeedsFinishRenderTexture = ctx->Driver.FinishRenderTexture != NULL;
+ }
+
+ rb->_BaseFormat = texImage->_BaseFormat;
+ rb->Format = texImage->TexFormat;
+ rb->InternalFormat = texImage->InternalFormat;
+ rb->Width = texImage->Width2;
+ rb->Height = texImage->Height2;
+ rb->NumSamples = texImage->NumSamples;
+ rb->TexImage = texImage;
+
+ ctx->Driver.RenderTexture(ctx, fb, att);
+}
/**
* Bind a texture object to an attachment point.
@@ -351,35 +404,35 @@ _mesa_set_texture_attachment(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att,
struct gl_texture_object *texObj,
- GLenum texTarget, GLuint level, GLuint zoffset)
+ GLenum texTarget, GLuint level, GLuint zoffset,
+ GLboolean layered)
{
+ struct gl_renderbuffer *rb = att->Renderbuffer;
+
+ if (rb && rb->NeedsFinishRenderTexture)
+ ctx->Driver.FinishRenderTexture(ctx, rb);
+
if (att->Texture == texObj) {
/* re-attaching same texture */
ASSERT(att->Type == GL_TEXTURE);
- if (ctx->Driver.FinishRenderTexture)
- ctx->Driver.FinishRenderTexture(ctx, att);
}
else {
/* new attachment */
- if (ctx->Driver.FinishRenderTexture && att->Texture)
- ctx->Driver.FinishRenderTexture(ctx, att);
_mesa_remove_attachment(ctx, att);
att->Type = GL_TEXTURE;
assert(!att->Texture);
_mesa_reference_texobj(&att->Texture, texObj);
}
+ invalidate_framebuffer(fb);
/* always update these fields */
att->TextureLevel = level;
att->CubeMapFace = _mesa_tex_target_to_face(texTarget);
att->Zoffset = zoffset;
+ att->Layered = layered;
att->Complete = GL_FALSE;
- if (_mesa_get_attachment_teximage(att)) {
- ctx->Driver.RenderTexture(ctx, fb, att);
- }
-
- invalidate_framebuffer(fb);
+ _mesa_update_texture_renderbuffer(ctx, fb, att);
}
@@ -775,6 +828,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
GLint fixedSampleLocations = -1;
GLint i;
GLuint j;
+ bool layer_count_valid = false;
+ GLuint layer_count = 0, att_layer_count;
assert(_mesa_is_user_fbo(fb));
@@ -835,8 +890,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
/* get width, height, format of the renderbuffer/texture
*/
if (att->Type == GL_TEXTURE) {
- const struct gl_texture_image *texImg =
- _mesa_get_attachment_teximage(att);
+ const struct gl_texture_image *texImg = att->Renderbuffer->TexImage;
minWidth = MIN2(minWidth, texImg->Width);
maxWidth = MAX2(maxWidth, texImg->Width);
minHeight = MIN2(minHeight, texImg->Height);
@@ -947,8 +1001,26 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
fbo_incomplete("unsupported renderbuffer format", i);
return;
}
+
+ /* Check that layered rendering is consistent. */
+ att_layer_count = att->Layered ? att->Renderbuffer->Depth : 0;
+ if (!layer_count_valid) {
+ layer_count = att_layer_count;
+ layer_count_valid = true;
+ } else if (layer_count != att_layer_count) {
+ if (layer_count == 0 || att_layer_count == 0) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS;
+ fbo_incomplete("framebuffer attachment layer mode is inconsistent", i);
+ } else {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB;
+ fbo_incomplete("framebuffer attachment layer count is inconsistent", i);
+ }
+ return;
+ }
}
+ fb->Layered = layer_count > 0;
+
if (_mesa_is_desktop_gl(ctx) && !ctx->Extensions.ARB_ES2_compatibility) {
/* Check that all DrawBuffers are present */
for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
@@ -1790,7 +1862,7 @@ check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
- if (att->Texture && _mesa_get_attachment_teximage(att)) {
+ if (att->Texture && att->Renderbuffer->TexImage) {
ctx->Driver.RenderTexture(ctx, fb, att);
}
}
@@ -1812,8 +1884,9 @@ check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
GLuint i;
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
- if (att->Texture && att->Renderbuffer) {
- ctx->Driver.FinishRenderTexture(ctx, att);
+ struct gl_renderbuffer *rb = att->Renderbuffer;
+ if (rb && rb->NeedsFinishRenderTexture) {
+ ctx->Driver.FinishRenderTexture(ctx, rb);
}
}
}
@@ -2103,7 +2176,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb,
static void
framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
GLenum attachment, GLenum textarget, GLuint texture,
- GLint level, GLint zoffset)
+ GLint level, GLint zoffset, GLboolean layered)
{
struct gl_renderbuffer_attachment *att;
struct gl_texture_object *texObj = NULL;
@@ -2230,7 +2303,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
BUFFER_DEPTH);
} else {
_mesa_set_texture_attachment(ctx, fb, att, texObj, textarget,
- level, zoffset);
+ level, zoffset, layered);
if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
/* Above we created a new renderbuffer and attached it to the
* depth attachment point. Now attach it to the stencil attachment
@@ -2296,7 +2369,7 @@ _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
}
framebuffer_texture(ctx, "1D", target, attachment, textarget, texture,
- level, 0);
+ level, 0, GL_FALSE);
}
@@ -2347,7 +2420,7 @@ _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
}
framebuffer_texture(ctx, "2D", target, attachment, textarget, texture,
- level, 0);
+ level, 0, GL_FALSE);
}
@@ -2365,7 +2438,7 @@ _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
}
framebuffer_texture(ctx, "3D", target, attachment, textarget, texture,
- level, zoffset);
+ level, zoffset, GL_FALSE);
}
@@ -2376,7 +2449,23 @@ _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
GET_CURRENT_CONTEXT(ctx);
framebuffer_texture(ctx, "Layer", target, attachment, 0, texture,
- level, layer);
+ level, layer, GL_FALSE);
+}
+
+
+void GLAPIENTRY
+_mesa_FramebufferTexture(GLenum target, GLenum attachment,
+ GLuint texture, GLint level)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4) {
+ framebuffer_texture(ctx, "Layer", target, attachment, 0, texture,
+ level, 0, GL_TRUE);
+ } else {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "unsupported function (glFramebufferTexture) called");
+ }
}
@@ -2725,7 +2814,7 @@ _mesa_GenerateMipmap(GLenum target)
GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, 0);
switch (target) {
case GL_TEXTURE_1D:
@@ -2891,6 +2980,20 @@ compatible_resolve_formats(const struct gl_renderbuffer *readRb,
return GL_FALSE;
}
+static GLboolean
+is_valid_blit_filter(const struct gl_context *ctx, GLenum filter)
+{
+ switch (filter) {
+ case GL_NEAREST:
+ case GL_LINEAR:
+ return true;
+ case GL_SCALED_RESOLVE_FASTEST_EXT:
+ case GL_SCALED_RESOLVE_NICEST_EXT:
+ return ctx->Extensions.EXT_framebuffer_multisample_blit_scaled;
+ default:
+ return false;
+ }
+}
/**
* Blit rectangular region, optionally from one framebuffer to another.
@@ -2909,7 +3012,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
const struct gl_framebuffer *readFb, *drawFb;
GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx,
@@ -2940,8 +3043,17 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
return;
}
- if (filter != GL_NEAREST && filter != GL_LINEAR) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlitFramebufferEXT(filter)");
+ if (!is_valid_blit_filter(ctx, filter)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBlitFramebufferEXT(%s)",
+ _mesa_lookup_enum_by_nr(filter));
+ return;
+ }
+
+ if ((filter == GL_SCALED_RESOLVE_FASTEST_EXT ||
+ filter == GL_SCALED_RESOLVE_NICEST_EXT) &&
+ (readFb->Visual.samples == 0 || drawFb->Visual.samples > 0)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBlitFramebufferEXT(%s)",
+ _mesa_lookup_enum_by_nr(filter));
return;
}
@@ -3013,10 +3125,10 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
}
}
}
- if (filter == GL_LINEAR) {
- /* 3.1 spec, page 199:
+ if (filter != GL_NEAREST) {
+ /* From EXT_framebuffer_multisample_blit_scaled specification:
* "Calling BlitFramebuffer will result in an INVALID_OPERATION error
- * if filter is LINEAR and read buffer contains integer data."
+ * if filter is not NEAREST and read buffer contains integer data."
*/
GLenum type = _mesa_get_format_datatype(colorReadRb->Format);
if (type == GL_INT || type == GL_UNSIGNED_INT) {
@@ -3174,7 +3286,8 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
}
/* extra checks for multisample copies... */
- if (readFb->Visual.samples > 0 || drawFb->Visual.samples > 0) {
+ if ((readFb->Visual.samples > 0 || drawFb->Visual.samples > 0) &&
+ (filter == GL_NEAREST || filter == GL_LINEAR)) {
/* src and dest region sizes must be the same */
if (abs(srcX1 - srcX0) != abs(dstX1 - dstX0) ||
abs(srcY1 - srcY0) != abs(dstY1 - dstY0)) {
diff --git a/mesalib/src/mesa/main/fbobject.h b/mesalib/src/mesa/main/fbobject.h
index 0358864d7..dfd795a3a 100644
--- a/mesalib/src/mesa/main/fbobject.h
+++ b/mesalib/src/mesa/main/fbobject.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -70,25 +71,6 @@ extern struct gl_renderbuffer_attachment *
_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment);
-
-/** Return the texture image for a renderbuffer attachment */
-static inline struct gl_texture_image *
-_mesa_get_attachment_teximage(struct gl_renderbuffer_attachment *att)
-{
- assert(att->Type == GL_TEXTURE);
- return att->Texture->Image[att->CubeMapFace][att->TextureLevel];
-}
-
-
-/** Return the (const) texture image for a renderbuffer attachment */
-static inline const struct gl_texture_image *
-_mesa_get_attachment_teximage_const(const struct gl_renderbuffer_attachment *att)
-{
- assert(att->Type == GL_TEXTURE);
- return att->Texture->Image[att->CubeMapFace][att->TextureLevel];
-}
-
-
extern void
_mesa_remove_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att);
@@ -98,13 +80,19 @@ _mesa_set_texture_attachment(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att,
struct gl_texture_object *texObj,
- GLenum texTarget, GLuint level, GLuint zoffset);
+ GLenum texTarget, GLuint level, GLuint zoffset,
+ GLboolean layered);
extern void
_mesa_set_renderbuffer_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att,
struct gl_renderbuffer *rb);
+void
+_mesa_update_texture_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ struct gl_renderbuffer_attachment *att);
+
extern void
_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
struct gl_framebuffer *fb,
@@ -191,6 +179,10 @@ _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
GLuint texture, GLint level, GLint layer);
extern void GLAPIENTRY
+_mesa_FramebufferTexture(GLenum target, GLenum attachment,
+ GLuint texture, GLint level);
+
+extern void GLAPIENTRY
_mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
diff --git a/mesalib/src/mesa/main/feedback.c b/mesalib/src/mesa/main/feedback.c
index 5d4c6e40d..990d1da6c 100644
--- a/mesalib/src/mesa/main/feedback.c
+++ b/mesalib/src/mesa/main/feedback.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -35,7 +36,6 @@
#include "enums.h"
#include "feedback.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/feedback.h b/mesalib/src/mesa/main/feedback.h
index a697dc0d2..48c0efc7d 100644
--- a/mesalib/src/mesa/main/feedback.h
+++ b/mesalib/src/mesa/main/feedback.h
@@ -18,16 +18,16 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef FEEDBACK_H
#define FEEDBACK_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp
index 01a4542d7..91c425be6 100644
--- a/mesalib/src/mesa/main/ff_fragment_shader.cpp
+++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp
@@ -1336,7 +1336,10 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
validate_ir_tree(p.shader->ir);
- while (do_common_optimization(p.shader->ir, false, false, 32))
+ const struct gl_shader_compiler_options *options =
+ &ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
+
+ while (do_common_optimization(p.shader->ir, false, false, 32, options))
;
reparent_ir(p.shader->ir, p.shader->ir);
diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c
index 093bc6651..be6ac0f2a 100644
--- a/mesalib/src/mesa/main/ffvertex_prog.c
+++ b/mesalib/src/mesa/main/ffvertex_prog.c
@@ -36,7 +36,6 @@
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/enums.h"
#include "main/ffvertex_prog.h"
#include "program/program.h"
@@ -608,7 +607,6 @@ static void emit_op3fn(struct tnl_program *p,
inst = &p->program->Base.Instructions[nr];
inst->Opcode = (enum prog_opcode) op;
- inst->Data = 0;
emit_arg( &inst->SrcReg[0], src0 );
emit_arg( &inst->SrcReg[1], src1 );
@@ -700,16 +698,11 @@ static void emit_normalize_vec3( struct tnl_program *p,
struct ureg dest,
struct ureg src )
{
-#if 0
- /* XXX use this when drivers are ready for NRM3 */
- emit_op1(p, OPCODE_NRM3, dest, WRITEMASK_XYZ, src);
-#else
struct ureg tmp = get_temp(p);
emit_op2(p, OPCODE_DP3, tmp, WRITEMASK_X, src, src);
emit_op1(p, OPCODE_RSQ, tmp, WRITEMASK_X, tmp);
emit_op2(p, OPCODE_MUL, dest, 0, src, swizzle1(tmp, X));
release_temp(p, tmp);
-#endif
}
@@ -1681,7 +1674,7 @@ _mesa_get_fixed_func_vertex_program(struct gl_context *ctx)
return NULL;
create_new_program( &key, prog,
- ctx->mvp_with_dp4,
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4,
ctx->Const.VertexProgram.MaxTemps );
#if 0
diff --git a/mesalib/src/mesa/main/fog.c b/mesalib/src/mesa/main/fog.c
index 3c5228ad5..7601651c3 100644
--- a/mesalib/src/mesa/main/fog.c
+++ b/mesalib/src/mesa/main/fog.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/fog.h b/mesalib/src/mesa/main/fog.h
index 20a75e96b..6bd1cc5ad 100644
--- a/mesalib/src/mesa/main/fog.h
+++ b/mesalib/src/mesa/main/fog.h
@@ -27,9 +27,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -38,7 +39,6 @@
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
diff --git a/mesalib/src/mesa/main/format_pack.c b/mesalib/src/mesa/main/format_pack.c
index 1a14b98b7..826fc10a6 100644
--- a/mesalib/src/mesa/main/format_pack.c
+++ b/mesalib/src/mesa/main/format_pack.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/format_pack.h b/mesalib/src/mesa/main/format_pack.h
index 20b2ad8a5..ebd103d03 100644
--- a/mesalib/src/mesa/main/format_pack.h
+++ b/mesalib/src/mesa/main/format_pack.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/format_unpack.c b/mesalib/src/mesa/main/format_unpack.c
index 0933b4e87..0a8b8b183 100644
--- a/mesalib/src/mesa/main/format_unpack.c
+++ b/mesalib/src/mesa/main/format_unpack.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -610,6 +611,20 @@ unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n)
static void
+unpack_ARGB2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat)((s[i] >> 20) & 0x3ff);
+ dst[i][GCOMP] = (GLfloat)((s[i] >> 10) & 0x3ff);
+ dst[i][BCOMP] = (GLfloat)((s[i] >> 0) & 0x3ff);
+ dst[i][ACOMP] = (GLfloat)((s[i] >> 30) & 0x03);
+ }
+}
+
+
+static void
unpack_ABGR2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
@@ -1060,6 +1075,344 @@ unpack_RG_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
}
}
+static void
+unpack_ALPHA_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_ALPHA_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_ALPHA_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_ALPHA_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_ALPHA_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_ALPHA_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_INTENSITY_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] =
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_INTENSITY_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] =
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_INTENSITY_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] =
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_INTENSITY_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] =
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_INTENSITY_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] =
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_INTENSITY_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] =
+ dst[i][ACOMP] = (GLfloat) s[i];
+ }
+}
+
+static void
+unpack_LUMINANCE_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = dst[i][GCOMP] = dst[i][BCOMP] = (GLfloat) s[i];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_LUMINANCE_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = dst[i][GCOMP] = dst[i][BCOMP] = (GLfloat) s[i];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_LUMINANCE_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = dst[i][GCOMP] = dst[i][BCOMP] = (GLfloat) s[i];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_LUMINANCE_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = dst[i][GCOMP] = dst[i][BCOMP] = (GLfloat) s[i];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_LUMINANCE_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = dst[i][GCOMP] = dst[i][BCOMP] = (GLfloat) s[i];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_LUMINANCE_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = dst[i][GCOMP] = dst[i][BCOMP] = (GLfloat) s[i];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_LUMINANCE_ALPHA_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = (GLfloat) s[2*i+0];
+ dst[i][ACOMP] = (GLfloat) s[2*i+1];
+ }
+}
+
+static void
+unpack_LUMINANCE_ALPHA_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = (GLfloat) s[2*i+0];
+ dst[i][ACOMP] = (GLfloat) s[2*i+1];
+ }
+}
+
+static void
+unpack_LUMINANCE_ALPHA_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = (GLfloat) s[2*i+0];
+ dst[i][ACOMP] = (GLfloat) s[2*i+1];
+ }
+}
+
+static void
+unpack_LUMINANCE_ALPHA_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = (GLfloat) s[2*i+0];
+ dst[i][ACOMP] = (GLfloat) s[2*i+1];
+ }
+}
+
+static void
+unpack_LUMINANCE_ALPHA_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = (GLfloat) s[2*i+0];
+ dst[i][ACOMP] = (GLfloat) s[2*i+1];
+ }
+}
+
+static void
+unpack_LUMINANCE_ALPHA_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] =
+ dst[i][GCOMP] =
+ dst[i][BCOMP] = (GLfloat) s[2*i+0];
+ dst[i][ACOMP] = (GLfloat) s[2*i+1];
+ }
+}
+
+static void
+unpack_R_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i];
+ dst[i][GCOMP] = 0.0;
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RG_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*2+0];
+ dst[i][GCOMP] = (GLfloat) s[i*2+1];
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RGB_INT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLbyte *s = (const GLbyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*3+0];
+ dst[i][GCOMP] = (GLfloat) s[i*3+1];
+ dst[i][BCOMP] = (GLfloat) s[i*3+2];
+ dst[i][ACOMP] = 1.0;
+ }
+}
static void
unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n)
@@ -1075,6 +1428,45 @@ unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
+unpack_R_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i];
+ dst[i][GCOMP] = 0.0;
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RG_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*2+0];
+ dst[i][GCOMP] = (GLfloat) s[i*2+1];
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RGB_INT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLshort *s = (const GLshort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*3+0];
+ dst[i][GCOMP] = (GLfloat) s[i*3+1];
+ dst[i][BCOMP] = (GLfloat) s[i*3+2];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
unpack_RGBA_INT16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = (const GLshort *) src;
@@ -1088,6 +1480,46 @@ unpack_RGBA_INT16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
+unpack_R_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i];
+ dst[i][GCOMP] = 0.0;
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RG_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*2+0];
+ dst[i][GCOMP] = (GLfloat) s[i*2+1];
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RGB_INT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLint *s = (const GLint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*3+0];
+ dst[i][GCOMP] = (GLfloat) s[i*3+1];
+ dst[i][BCOMP] = (GLfloat) s[i*3+2];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+
+static void
unpack_RGBA_INT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLint *s = (const GLint *) src;
@@ -1101,6 +1533,45 @@ unpack_RGBA_INT32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
+unpack_R_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i];
+ dst[i][GCOMP] = 0.0;
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RG_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*2+0];
+ dst[i][GCOMP] = (GLfloat) s[i*2+1];
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RGB_UINT8(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLubyte *s = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*3+0];
+ dst[i][GCOMP] = (GLfloat) s[i*3+1];
+ dst[i][BCOMP] = (GLfloat) s[i*3+2];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
unpack_RGBA_UINT8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = (const GLubyte *) src;
@@ -1114,6 +1585,45 @@ unpack_RGBA_UINT8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
+unpack_R_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i];
+ dst[i][GCOMP] = 0.0;
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RG_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*2+0];
+ dst[i][GCOMP] = (GLfloat) s[i*2+1];
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RGB_UINT16(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLushort *s = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*3+0];
+ dst[i][GCOMP] = (GLfloat) s[i*3+1];
+ dst[i][BCOMP] = (GLfloat) s[i*3+2];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
unpack_RGBA_UINT16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = (const GLushort *) src;
@@ -1127,6 +1637,45 @@ unpack_RGBA_UINT16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
+unpack_R_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i];
+ dst[i][GCOMP] = 0.0;
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RG_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*2+0];
+ dst[i][GCOMP] = (GLfloat) s[i*2+1];
+ dst[i][BCOMP] = 0.0;
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
+unpack_RGB_UINT32(const void *src, GLfloat dst[][4], GLuint n)
+{
+ const GLuint *s = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i][RCOMP] = (GLfloat) s[i*3+0];
+ dst[i][GCOMP] = (GLfloat) s[i*3+1];
+ dst[i][BCOMP] = (GLfloat) s[i*3+2];
+ dst[i][ACOMP] = 1.0;
+ }
+}
+
+static void
unpack_RGBA_UINT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = (const GLuint *) src;
@@ -1770,6 +2319,7 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_GR1616] = unpack_GR1616;
table[MESA_FORMAT_RG1616] = unpack_RG1616;
table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010;
+ table[MESA_FORMAT_ARGB2101010_UINT] = unpack_ARGB2101010_UINT;
table[MESA_FORMAT_ABGR2101010_UINT] = unpack_ABGR2101010_UINT;
table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8;
table[MESA_FORMAT_S8_Z24] = unpack_S8_Z24;
@@ -1812,11 +2362,57 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_RG_FLOAT32] = unpack_RG_FLOAT32;
table[MESA_FORMAT_RG_FLOAT16] = unpack_RG_FLOAT16;
+ table[MESA_FORMAT_ALPHA_UINT8] = unpack_ALPHA_UINT8;
+ table[MESA_FORMAT_ALPHA_UINT16] = unpack_ALPHA_UINT16;
+ table[MESA_FORMAT_ALPHA_UINT32] = unpack_ALPHA_UINT32;
+ table[MESA_FORMAT_ALPHA_INT8] = unpack_ALPHA_INT8;
+ table[MESA_FORMAT_ALPHA_INT16] = unpack_ALPHA_INT16;
+ table[MESA_FORMAT_ALPHA_INT32] = unpack_ALPHA_INT32;
+
+ table[MESA_FORMAT_INTENSITY_UINT8] = unpack_INTENSITY_UINT8;
+ table[MESA_FORMAT_INTENSITY_UINT16] = unpack_INTENSITY_UINT16;
+ table[MESA_FORMAT_INTENSITY_UINT32] = unpack_INTENSITY_UINT32;
+ table[MESA_FORMAT_INTENSITY_INT8] = unpack_INTENSITY_INT8;
+ table[MESA_FORMAT_INTENSITY_INT16] = unpack_INTENSITY_INT16;
+ table[MESA_FORMAT_INTENSITY_INT32] = unpack_INTENSITY_INT32;
+
+ table[MESA_FORMAT_LUMINANCE_UINT8] = unpack_LUMINANCE_UINT8;
+ table[MESA_FORMAT_LUMINANCE_UINT16] = unpack_LUMINANCE_UINT16;
+ table[MESA_FORMAT_LUMINANCE_UINT32] = unpack_LUMINANCE_UINT32;
+ table[MESA_FORMAT_LUMINANCE_INT8] = unpack_LUMINANCE_INT8;
+ table[MESA_FORMAT_LUMINANCE_INT16] = unpack_LUMINANCE_INT16;
+ table[MESA_FORMAT_LUMINANCE_INT32] = unpack_LUMINANCE_INT32;
+
+ table[MESA_FORMAT_LUMINANCE_ALPHA_UINT8] = unpack_LUMINANCE_ALPHA_UINT8;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_UINT16] = unpack_LUMINANCE_ALPHA_UINT16;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_UINT32] = unpack_LUMINANCE_ALPHA_UINT32;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_INT8] = unpack_LUMINANCE_ALPHA_INT8;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_INT16] = unpack_LUMINANCE_ALPHA_INT16;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_INT32] = unpack_LUMINANCE_ALPHA_INT32;
+
+ table[MESA_FORMAT_R_INT8] = unpack_R_INT8;
+ table[MESA_FORMAT_RG_INT8] = unpack_RG_INT8;
+ table[MESA_FORMAT_RGB_INT8] = unpack_RGB_INT8;
table[MESA_FORMAT_RGBA_INT8] = unpack_RGBA_INT8;
+ table[MESA_FORMAT_R_INT16] = unpack_R_INT16;
+ table[MESA_FORMAT_RG_INT16] = unpack_RG_INT16;
+ table[MESA_FORMAT_RGB_INT16] = unpack_RGB_INT16;
table[MESA_FORMAT_RGBA_INT16] = unpack_RGBA_INT16;
+ table[MESA_FORMAT_R_INT32] = unpack_R_INT32;
+ table[MESA_FORMAT_RG_INT32] = unpack_RG_INT32;
+ table[MESA_FORMAT_RGB_INT32] = unpack_RGB_INT32;
table[MESA_FORMAT_RGBA_INT32] = unpack_RGBA_INT32;
+ table[MESA_FORMAT_R_UINT8] = unpack_R_UINT8;
+ table[MESA_FORMAT_RG_UINT8] = unpack_RG_UINT8;
+ table[MESA_FORMAT_RGB_UINT8] = unpack_RGB_UINT8;
table[MESA_FORMAT_RGBA_UINT8] = unpack_RGBA_UINT8;
+ table[MESA_FORMAT_R_UINT16] = unpack_R_UINT16;
+ table[MESA_FORMAT_RG_UINT16] = unpack_RG_UINT16;
+ table[MESA_FORMAT_RGB_UINT16] = unpack_RGB_UINT16;
table[MESA_FORMAT_RGBA_UINT16] = unpack_RGBA_UINT16;
+ table[MESA_FORMAT_R_UINT32] = unpack_R_UINT32;
+ table[MESA_FORMAT_RG_UINT32] = unpack_RG_UINT32;
+ table[MESA_FORMAT_RGB_UINT32] = unpack_RGB_UINT32;
table[MESA_FORMAT_RGBA_UINT32] = unpack_RGBA_UINT32;
table[MESA_FORMAT_DUDV8] = unpack_DUDV8;
@@ -1852,7 +2448,7 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_ETC2_SIGNED_RG11_EAC] = unpack_ETC2_SIGNED_RG11_EAC;
table[MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1] =
unpack_ETC2_RGB8_PUNCHTHROUGH_ALPHA1;
- table[MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1] =
+ table[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] =
unpack_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1;
table[MESA_FORMAT_SIGNED_A8] = unpack_SIGNED_A8;
table[MESA_FORMAT_SIGNED_L8] = unpack_SIGNED_L8;
diff --git a/mesalib/src/mesa/main/format_unpack.h b/mesalib/src/mesa/main/format_unpack.h
index 29c526319..1da03caa8 100644
--- a/mesalib/src/mesa/main/format_unpack.h
+++ b/mesalib/src/mesa/main/format_unpack.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef FORMAT_UNPACK_H
diff --git a/mesalib/src/mesa/main/formatquery.c b/mesalib/src/mesa/main/formatquery.c
index e45dc8680..40eca8711 100644
--- a/mesalib/src/mesa/main/formatquery.c
+++ b/mesalib/src/mesa/main/formatquery.c
@@ -25,7 +25,6 @@
#include "context.h"
#include "glformats.h"
#include "macros.h"
-#include "mfeatures.h"
#include "enums.h"
#include "fbobject.h"
#include "formatquery.h"
diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c
index 68ce98430..fee52c1ea 100644
--- a/mesalib/src/mesa/main/formats.c
+++ b/mesalib/src/mesa/main/formats.c
@@ -18,15 +18,15 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "imports.h"
#include "formats.h"
-#include "mfeatures.h"
#include "macros.h"
#include "glformats.h"
diff --git a/mesalib/src/mesa/main/formats.h b/mesalib/src/mesa/main/formats.h
index 2961ffa9f..8dd71a086 100644
--- a/mesalib/src/mesa/main/formats.h
+++ b/mesalib/src/mesa/main/formats.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
@@ -288,21 +289,21 @@ typedef enum
MESA_FORMAT_ARGB2101010_UINT,
MESA_FORMAT_ABGR2101010_UINT,
- MESA_FORMAT_XRGB4444_UNORM,
- MESA_FORMAT_XRGB1555_UNORM,
- MESA_FORMAT_XBGR8888_SNORM,
- MESA_FORMAT_XBGR8888_SRGB,
- MESA_FORMAT_XBGR8888_UINT,
- MESA_FORMAT_XBGR8888_SINT,
- MESA_FORMAT_XRGB2101010_UNORM,
- MESA_FORMAT_XBGR16161616_UNORM,
- MESA_FORMAT_XBGR16161616_SNORM,
- MESA_FORMAT_XBGR16161616_FLOAT,
- MESA_FORMAT_XBGR16161616_UINT,
- MESA_FORMAT_XBGR16161616_SINT,
- MESA_FORMAT_XBGR32323232_FLOAT,
- MESA_FORMAT_XBGR32323232_UINT,
- MESA_FORMAT_XBGR32323232_SINT,
+ MESA_FORMAT_XRGB4444_UNORM, /* xxxx RRRR GGGG BBBB */
+ MESA_FORMAT_XRGB1555_UNORM, /* xRRR RRGG GGGB BBBB */
+ MESA_FORMAT_XBGR8888_SNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_XBGR8888_SRGB, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_XBGR8888_UINT, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_XBGR8888_SINT, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_XRGB2101010_UNORM, /* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_XBGR16161616_UNORM,/* ushort[3]=x, [2]=B, [1]=G, [0]=R */
+ MESA_FORMAT_XBGR16161616_SNORM,/* ... */
+ MESA_FORMAT_XBGR16161616_FLOAT,/* ... */
+ MESA_FORMAT_XBGR16161616_UINT, /* ... */
+ MESA_FORMAT_XBGR16161616_SINT, /* ... */
+ MESA_FORMAT_XBGR32323232_FLOAT,/* float[3]=x, [2]=B, [1]=G, [0]=R */
+ MESA_FORMAT_XBGR32323232_UINT, /* ... */
+ MESA_FORMAT_XBGR32323232_SINT, /* ... */
MESA_FORMAT_COUNT
} gl_format;
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c
index 6c6977431..0337b8b08 100644
--- a/mesalib/src/mesa/main/framebuffer.c
+++ b/mesalib/src/mesa/main/framebuffer.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -877,18 +878,29 @@ _mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format)
GLenum
_mesa_get_color_read_format(struct gl_context *ctx)
{
- const GLenum data_type = _mesa_get_format_datatype(
- ctx->ReadBuffer->_ColorReadBuffer->Format);
-
- switch (ctx->ReadBuffer->_ColorReadBuffer->Format) {
- case MESA_FORMAT_ARGB8888:
- return GL_BGRA;
- case MESA_FORMAT_RGB565:
- return GL_BGR;
- default:
- if (data_type == GL_UNSIGNED_INT || data_type == GL_INT) {
+ if (!ctx->ReadBuffer || !ctx->ReadBuffer->_ColorReadBuffer) {
+ /* The spec is unclear how to handle this case, but NVIDIA's
+ * driver generates GL_INVALID_OPERATION.
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT: "
+ "no GL_READ_BUFFER)");
+ return GL_NONE;
+ }
+ else {
+ const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
+ const GLenum data_type = _mesa_get_format_datatype(format);
+
+ if (format == MESA_FORMAT_ARGB8888)
+ return GL_BGRA;
+ else if (format == MESA_FORMAT_RGB565)
+ return GL_BGR;
+
+ switch (data_type) {
+ case GL_UNSIGNED_INT:
+ case GL_INT:
return GL_RGBA_INTEGER;
- } else {
+ default:
return GL_RGBA;
}
}
@@ -901,26 +913,33 @@ _mesa_get_color_read_format(struct gl_context *ctx)
GLenum
_mesa_get_color_read_type(struct gl_context *ctx)
{
- const GLenum data_type = _mesa_get_format_datatype(
- ctx->ReadBuffer->_ColorReadBuffer->Format);
-
- switch (ctx->ReadBuffer->_ColorReadBuffer->Format) {
- case MESA_FORMAT_RGB565:
- return GL_UNSIGNED_SHORT_5_6_5_REV;
- default:
- break;
+ if (!ctx->ReadBuffer || !ctx->ReadBuffer->_ColorReadBuffer) {
+ /* The spec is unclear how to handle this case, but NVIDIA's
+ * driver generates GL_INVALID_OPERATION.
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE: "
+ "no GL_READ_BUFFER)");
+ return GL_NONE;
}
-
- switch (data_type) {
- case GL_SIGNED_NORMALIZED:
- return GL_BYTE;
- case GL_UNSIGNED_INT:
- case GL_INT:
- case GL_FLOAT:
- return data_type;
- case GL_UNSIGNED_NORMALIZED:
- default:
- return GL_UNSIGNED_BYTE;
+ else {
+ const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
+ const GLenum data_type = _mesa_get_format_datatype(format);
+
+ if (format == MESA_FORMAT_RGB565)
+ return GL_UNSIGNED_SHORT_5_6_5_REV;
+
+ switch (data_type) {
+ case GL_SIGNED_NORMALIZED:
+ return GL_BYTE;
+ case GL_UNSIGNED_INT:
+ case GL_INT:
+ case GL_FLOAT:
+ return data_type;
+ case GL_UNSIGNED_NORMALIZED:
+ default:
+ return GL_UNSIGNED_BYTE;
+ }
}
}
@@ -961,8 +980,7 @@ _mesa_print_framebuffer(const struct gl_framebuffer *fb)
for (i = 0; i < BUFFER_COUNT; i++) {
const struct gl_renderbuffer_attachment *att = &fb->Attachment[i];
if (att->Type == GL_TEXTURE) {
- const struct gl_texture_image *texImage =
- _mesa_get_attachment_teximage_const(att);
+ const struct gl_texture_image *texImage = att->Renderbuffer->TexImage;
fprintf(stderr,
" %2d: Texture %u, level %u, face %u, slice %u, complete %d\n",
i, att->Texture->Name, att->TextureLevel, att->CubeMapFace,
diff --git a/mesalib/src/mesa/main/framebuffer.h b/mesalib/src/mesa/main/framebuffer.h
index 9b94452d6..962f2a4e2 100644
--- a/mesalib/src/mesa/main/framebuffer.h
+++ b/mesalib/src/mesa/main/framebuffer.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 2ba868c0d..593c75be2 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -15,9 +15,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Author: Kristian Høgsberg <krh@bitplanet.net>
*/
@@ -30,12 +31,12 @@
#include "extensions.h"
#include "get.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "state.h"
#include "texcompress.h"
#include "framebuffer.h"
#include "samplerobj.h"
+#include "stencil.h"
/* This is a table driven implemetation of the glGet*v() functions.
* The basic idea is that most getters just look up an int somewhere
@@ -141,6 +142,7 @@ enum value_extra {
EXTRA_VALID_CLIP_DISTANCE,
EXTRA_FLUSH_CURRENT,
EXTRA_GLSL_130,
+ EXTRA_EXT_UBO_GS4,
};
#define NO_EXTRA NULL
@@ -226,7 +228,13 @@ union value {
* extensions or specific gl versions) or actions (flush current, new
* buffers) that we need to do before looking up an enum. We need to
* declare them all up front so we can refer to them in the value_desc
- * structs below. */
+ * structs below.
+ *
+ * Each EXTRA_ will be executed. For EXTRA_* enums of extensions and API
+ * versions, listing multiple ones in an array means an error will be thrown
+ * only if none of them are available. If you need to check for "AND"
+ * behavior, you would need to make a custom EXTRA_ enum.
+ */
static const int extra_new_buffers[] = {
EXTRA_NEW_BUFFERS,
@@ -281,6 +289,12 @@ static const int extra_EXT_texture_integer[] = {
EXTRA_END
};
+static const int extra_EXT_texture_integer_and_new_buffers[] = {
+ EXT(EXT_texture_integer),
+ EXTRA_NEW_BUFFERS,
+ EXTRA_END
+};
+
static const int extra_GLSL_130[] = {
EXTRA_GLSL_130,
EXTRA_END
@@ -300,8 +314,7 @@ static const int extra_ARB_transform_feedback2_api_es3[] = {
};
static const int extra_ARB_uniform_buffer_object_and_geometry_shader[] = {
- EXT(ARB_uniform_buffer_object),
- EXT(ARB_geometry_shader4),
+ EXTRA_EXT_UBO_GS4,
EXTRA_END
};
@@ -317,6 +330,12 @@ static const int extra_ARB_ES3_compatibility_api_es3[] = {
EXTRA_END
};
+static const int extra_EXT_framebuffer_sRGB_and_new_buffers[] = {
+ EXT(EXT_framebuffer_sRGB),
+ EXTRA_NEW_BUFFERS,
+ EXTRA_END
+};
+
EXTRA_EXT(ARB_texture_cube_map);
EXTRA_EXT(MESA_texture_array);
EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
@@ -397,6 +416,13 @@ extra_NV_read_buffer_api_gl[] = {
EXTRA_END
};
+static const int extra_core_ARB_color_buffer_float_and_new_buffers[] = {
+ EXTRA_API_GL_CORE,
+ EXT(ARB_color_buffer_float),
+ EXTRA_NEW_BUFFERS,
+ EXTRA_END
+};
+
/* This is the big table describing all the enums we accept in
* glGet*v(). The table is partitioned into six parts: enums
* understood by all GL APIs (OpenGL, GLES and GLES2), enums shared
@@ -404,8 +430,7 @@ extra_NV_read_buffer_api_gl[] = {
* remaining combinations. To look up the enums valid in a given API
* we will use a hash table specific to that API. These tables are in
* turn generated at build time and included through get_hash.h.
- * The different sections are guarded by #if FEATURE_GL etc to make
- * sure we only compile in the enums we may need. */
+ */
#include "get_hash.h"
@@ -651,7 +676,10 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
v->value_enum = ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace];
break;
case GL_STENCIL_REF:
- v->value_int = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+ v->value_int = _mesa_get_stencil_ref(ctx, ctx->Stencil.ActiveFace);
+ break;
+ case GL_STENCIL_BACK_REF:
+ v->value_int = _mesa_get_stencil_ref(ctx, 1);
break;
case GL_STENCIL_VALUE_MASK:
v->value_int = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
@@ -883,58 +911,50 @@ static GLboolean
check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d)
{
const GLuint version = ctx->Version;
- int total, enabled;
+ GLboolean api_check = GL_FALSE;
+ GLboolean api_found = GL_FALSE;
const int *e;
- total = 0;
- enabled = 0;
- for (e = d->extra; *e != EXTRA_END; e++)
+ for (e = d->extra; *e != EXTRA_END; e++) {
switch (*e) {
case EXTRA_VERSION_30:
- if (version >= 30) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (version >= 30)
+ api_found = GL_TRUE;
break;
case EXTRA_VERSION_31:
- if (version >= 31) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (version >= 31)
+ api_found = GL_TRUE;
break;
case EXTRA_VERSION_32:
- if (version >= 32) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (version >= 32)
+ api_found = GL_TRUE;
break;
case EXTRA_NEW_FRAG_CLAMP:
if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP))
_mesa_update_state(ctx);
break;
case EXTRA_API_ES2:
- if (ctx->API == API_OPENGLES2) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (ctx->API == API_OPENGLES2)
+ api_found = GL_TRUE;
break;
case EXTRA_API_ES3:
- if (_mesa_is_gles3(ctx)) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (_mesa_is_gles3(ctx))
+ api_found = GL_TRUE;
break;
case EXTRA_API_GL:
- if (_mesa_is_desktop_gl(ctx)) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (_mesa_is_desktop_gl(ctx))
+ api_found = GL_TRUE;
break;
case EXTRA_API_GL_CORE:
- if (ctx->API == API_OPENGL_CORE) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (ctx->API == API_OPENGL_CORE)
+ api_found = GL_TRUE;
break;
case EXTRA_NEW_BUFFERS:
if (ctx->NewState & _NEW_BUFFERS)
@@ -965,21 +985,26 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
}
break;
case EXTRA_GLSL_130:
- if (ctx->Const.GLSLVersion >= 130) {
- total++;
- enabled++;
- }
+ api_check = GL_TRUE;
+ if (ctx->Const.GLSLVersion >= 130)
+ api_found = GL_TRUE;
break;
+ case EXTRA_EXT_UBO_GS4:
+ api_check = GL_TRUE;
+ api_found = (ctx->Extensions.ARB_uniform_buffer_object &&
+ ctx->Extensions.ARB_geometry_shader4);
+ break;
case EXTRA_END:
break;
default: /* *e is a offset into the extension struct */
- total++;
+ api_check = GL_TRUE;
if (*(GLboolean *) ((char *) &ctx->Extensions + *e))
- enabled++;
+ api_found = GL_TRUE;
break;
}
+ }
- if (total > 0 && enabled == 0) {
+ if (api_check && !api_found) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
_mesa_lookup_enum_by_nr(d->pname));
return GL_FALSE;
diff --git a/mesalib/src/mesa/main/get.h b/mesalib/src/mesa/main/get.h
index 6b0158f37..f58bb9409 100644
--- a/mesalib/src/mesa/main/get.h
+++ b/mesalib/src/mesa/main/get.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/get_hash_generator.py b/mesalib/src/mesa/main/get_hash_generator.py
index 04bf9ffe6..96bc49587 100644
--- a/mesalib/src/mesa/main/get_hash_generator.py
+++ b/mesalib/src/mesa/main/get_hash_generator.py
@@ -179,54 +179,34 @@ def generate_hash_tables(enum_list, enabled_apis, param_descriptors):
return params, merge_tables(sorted_tables)
-def opt_to_apis(feature):
- _map = {"ES1": "GLES", "ES2": "GLES2", "GL": "GL"}
- if feature not in _map:
- return None
-
- apis = set([_map[feature]])
- if "GL" in apis:
- apis.add("GL_CORE")
- if "GLES2" in apis:
- apis.add("GLES3")
-
- return apis
def show_usage():
sys.stderr.write(
"""Usage: %s [OPTIONS]
-f <file> specify GL API XML file
- -a [GL|ES1|ES2] specify APIs to generate hash tables for
""" % (program))
exit(1)
if __name__ == '__main__':
try:
- (opts, args) = getopt.getopt(sys.argv[1:], "f:a:")
+ (opts, args) = getopt.getopt(sys.argv[1:], "f:")
except Exception,e:
show_usage()
if len(args) != 0:
show_usage()
- enabled_apis = set([])
api_desc_file = ""
for opt_name, opt_val in opts:
if opt_name == "-f":
api_desc_file = opt_val
- if opt_name == "-a":
- apis = opt_to_apis(opt_val.upper())
- if not apis:
- die("invalid API %s\n" % opt_val)
-
- enabled_apis |= apis
if not api_desc_file:
die("missing descriptor file (-f)\n")
- if len(enabled_apis) == 0:
- die("need at least a single enabled API\n")
+ # generate the code for all APIs
+ enabled_apis = set(["GLES", "GLES2", "GLES3", "GL", "GL_CORE"])
try:
api_desc = gl_XML.parse_GL_API(api_desc_file)
diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py
index 4ef23247b..ef1ab02e1 100644
--- a/mesalib/src/mesa/main/get_hash_params.py
+++ b/mesalib/src/mesa/main/get_hash_params.py
@@ -8,7 +8,7 @@ descriptor=[
[ "COLOR_WRITEMASK", "LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA" ],
[ "CULL_FACE", "CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA" ],
[ "CULL_FACE_MODE", "CONTEXT_ENUM(Polygon.CullFaceMode), NO_EXTRA" ],
- [ "DEPTH_BITS", "BUFFER_INT(Visual.depthBits), NO_EXTRA" ],
+ [ "DEPTH_BITS", "BUFFER_INT(Visual.depthBits), extra_new_buffers" ],
[ "DEPTH_CLEAR_VALUE", "CONTEXT_FIELD(Depth.Clear, TYPE_DOUBLEN), NO_EXTRA" ],
[ "DEPTH_FUNC", "CONTEXT_ENUM(Depth.Func), NO_EXTRA" ],
[ "DEPTH_RANGE", "CONTEXT_FIELD(Viewport.Near, TYPE_FLOATN_2), NO_EXTRA" ],
@@ -31,7 +31,7 @@ descriptor=[
[ "RED_BITS", "BUFFER_INT(Visual.redBits), extra_new_buffers" ],
[ "SCISSOR_BOX", "LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA" ],
[ "SCISSOR_TEST", "CONTEXT_BOOL(Scissor.Enabled), NO_EXTRA" ],
- [ "STENCIL_BITS", "BUFFER_INT(Visual.stencilBits), NO_EXTRA" ],
+ [ "STENCIL_BITS", "BUFFER_INT(Visual.stencilBits), extra_new_buffers" ],
[ "STENCIL_CLEAR_VALUE", "CONTEXT_INT(Stencil.Clear), NO_EXTRA" ],
[ "STENCIL_FAIL", "LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA" ],
[ "STENCIL_FUNC", "LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA" ],
@@ -80,8 +80,8 @@ descriptor=[
[ "SAMPLE_COVERAGE_ARB", "CONTEXT_BOOL(Multisample.SampleCoverage), NO_EXTRA" ],
[ "SAMPLE_COVERAGE_VALUE_ARB", "CONTEXT_FLOAT(Multisample.SampleCoverageValue), NO_EXTRA" ],
[ "SAMPLE_COVERAGE_INVERT_ARB", "CONTEXT_BOOL(Multisample.SampleCoverageInvert), NO_EXTRA" ],
- [ "SAMPLE_BUFFERS_ARB", "BUFFER_INT(Visual.sampleBuffers), NO_EXTRA" ],
- [ "SAMPLES_ARB", "BUFFER_INT(Visual.samples), NO_EXTRA" ],
+ [ "SAMPLE_BUFFERS_ARB", "BUFFER_INT(Visual.sampleBuffers), extra_new_buffers" ],
+ [ "SAMPLES_ARB", "BUFFER_INT(Visual.samples), extra_new_buffers" ],
# GL_SGIS_generate_mipmap
[ "GENERATE_MIPMAP_HINT_SGIS", "CONTEXT_ENUM(Hint.GenerateMipmap), NO_EXTRA" ],
@@ -273,8 +273,8 @@ descriptor=[
# GL_ARB_fragment_program
# == GL_MAX_TEXTURE_IMAGE_UNITS_NV
- [ "MAX_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.MaxTextureImageUnits), extra_ARB_fragment_program" ],
- [ "MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.MaxVertexTextureImageUnits), extra_ARB_vertex_shader" ],
+ [ "MAX_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.FragmentProgram.MaxTextureImageUnits), extra_ARB_fragment_program" ],
+ [ "MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.VertexProgram.MaxTextureImageUnits), extra_ARB_vertex_shader" ],
[ "MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.MaxCombinedTextureImageUnits), extra_ARB_vertex_shader" ],
# GL_ARB_shader_objects
@@ -286,7 +286,7 @@ descriptor=[
[ "STENCIL_BACK_FUNC", "CONTEXT_ENUM(Stencil.Function[1]), NO_EXTRA" ],
[ "STENCIL_BACK_VALUE_MASK", "CONTEXT_INT(Stencil.ValueMask[1]), NO_EXTRA" ],
[ "STENCIL_BACK_WRITEMASK", "CONTEXT_INT(Stencil.WriteMask[1]), NO_EXTRA" ],
- [ "STENCIL_BACK_REF", "CONTEXT_INT(Stencil.Ref[1]), NO_EXTRA" ],
+ [ "STENCIL_BACK_REF", "LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA" ],
[ "STENCIL_BACK_FAIL", "CONTEXT_ENUM(Stencil.FailFunc[1]), NO_EXTRA" ],
[ "STENCIL_BACK_PASS_DEPTH_FAIL", "CONTEXT_ENUM(Stencil.ZFailFunc[1]), NO_EXTRA" ],
[ "STENCIL_BACK_PASS_DEPTH_PASS", "CONTEXT_ENUM(Stencil.ZPassFunc[1]), NO_EXTRA" ],
@@ -630,22 +630,22 @@ descriptor=[
[ "TEXTURE_CUBE_MAP_SEAMLESS", "CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map" ],
# GL_EXT_texture_integer
- [ "RGBA_INTEGER_MODE_EXT", "BUFFER_BOOL(_IntegerColor), extra_EXT_texture_integer" ],
+ [ "RGBA_INTEGER_MODE_EXT", "BUFFER_BOOL(_IntegerColor), extra_EXT_texture_integer_and_new_buffers" ],
# GL_ARB_transform_feedback3
[ "MAX_TRANSFORM_FEEDBACK_BUFFERS", "CONTEXT_INT(Const.MaxTransformFeedbackBuffers), extra_ARB_transform_feedback3" ],
[ "MAX_VERTEX_STREAMS", "CONTEXT_INT(Const.MaxVertexStreams), extra_ARB_transform_feedback3" ],
# GL_ARB_geometry_shader4
- [ "MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.MaxGeometryTextureImageUnits), extra_ARB_geometry_shader4" ],
+ [ "MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.GeometryProgram.MaxTextureImageUnits), extra_ARB_geometry_shader4" ],
[ "MAX_GEOMETRY_OUTPUT_VERTICES_ARB", "CONTEXT_INT(Const.MaxGeometryOutputVertices), extra_ARB_geometry_shader4" ],
[ "MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxGeometryTotalOutputComponents), extra_ARB_geometry_shader4" ],
[ "MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB", "CONTEXT_INT(Const.GeometryProgram.MaxUniformComponents), extra_ARB_geometry_shader4" ],
- [ "MAX_GEOMETRY_VARYING_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxGeometryVaryingComponents), extra_ARB_geometry_shader4" ],
- [ "MAX_VERTEX_VARYING_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxVertexVaryingComponents), extra_ARB_geometry_shader4" ],
+ [ "MAX_GEOMETRY_VARYING_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxVaryingComponents), extra_ARB_geometry_shader4" ],
+ [ "MAX_VERTEX_VARYING_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxVaryingComponents), extra_ARB_geometry_shader4" ],
# GL_ARB_color_buffer_float
- [ "RGBA_FLOAT_MODE_ARB", "BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), 0" ],
+ [ "RGBA_FLOAT_MODE_ARB", "BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), extra_core_ARB_color_buffer_float_and_new_buffers" ],
# GL_EXT_gpu_shader4 / GLSL 1.30
[ "MIN_PROGRAM_TEXEL_OFFSET", "CONTEXT_INT(Const.MinProgramTexelOffset), extra_GLSL_130" ],
@@ -676,7 +676,7 @@ descriptor=[
# GL3.0 / GL_EXT_framebuffer_sRGB
[ "FRAMEBUFFER_SRGB_EXT", "CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB" ],
- [ "FRAMEBUFFER_SRGB_CAPABLE_EXT", "BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB" ],
+ [ "FRAMEBUFFER_SRGB_CAPABLE_EXT", "BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB_and_new_buffers" ],
# GL 3.1
# NOTE: different enum values for GL_PRIMITIVE_RESTART_NV
diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c
index 5280b4dd3..52985f148 100644
--- a/mesalib/src/mesa/main/getstring.c
+++ b/mesalib/src/mesa/main/getstring.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "get.h"
#include "enums.h"
#include "extensions.h"
-#include "mfeatures.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c
index c1e16587a..dfee6f196 100644
--- a/mesalib/src/mesa/main/glformats.c
+++ b/mesalib/src/mesa/main/glformats.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/glformats.h b/mesalib/src/mesa/main/glformats.h
index cdd2b9427..af1089931 100644
--- a/mesalib/src/mesa/main/glformats.h
+++ b/mesalib/src/mesa/main/glformats.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef GLFORMATS_H
diff --git a/mesalib/src/mesa/main/glheader.h b/mesalib/src/mesa/main/glheader.h
index e93ca30e7..fd6985118 100644
--- a/mesalib/src/mesa/main/glheader.h
+++ b/mesalib/src/mesa/main/glheader.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/hash.c b/mesalib/src/mesa/main/hash.c
index 8c763e20a..e38158c75 100644
--- a/mesalib/src/mesa/main/hash.c
+++ b/mesalib/src/mesa/main/hash.c
@@ -29,9 +29,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
@@ -114,9 +115,9 @@ _mesa_NewHashTable(void)
{
struct _mesa_HashTable *table = CALLOC_STRUCT(_mesa_HashTable);
- table->ht = _mesa_hash_table_create(NULL, uint_key_compare);
- _mesa_hash_table_set_deleted_key(table->ht, uint_key(DELETED_KEY_VALUE));
if (table) {
+ table->ht = _mesa_hash_table_create(NULL, uint_key_compare);
+ _mesa_hash_table_set_deleted_key(table->ht, uint_key(DELETED_KEY_VALUE));
_glthread_INIT_MUTEX(table->Mutex);
_glthread_INIT_MUTEX(table->WalkMutex);
}
diff --git a/mesalib/src/mesa/main/hash.h b/mesalib/src/mesa/main/hash.h
index cdaa7669a..a3171df6b 100644
--- a/mesalib/src/mesa/main/hash.h
+++ b/mesalib/src/mesa/main/hash.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/hint.c b/mesalib/src/mesa/main/hint.c
index c2560192a..ed0394bc8 100644
--- a/mesalib/src/mesa/main/hint.c
+++ b/mesalib/src/mesa/main/hint.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/hint.h b/mesalib/src/mesa/main/hint.h
index ca9659d58..f702fbf51 100644
--- a/mesalib/src/mesa/main/hint.h
+++ b/mesalib/src/mesa/main/hint.h
@@ -27,9 +27,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -37,7 +38,6 @@
#define HINT_H
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
diff --git a/mesalib/src/mesa/main/histogram.c b/mesalib/src/mesa/main/histogram.c
index fe454bcfb..88440ad71 100644
--- a/mesalib/src/mesa/main/histogram.c
+++ b/mesalib/src/mesa/main/histogram.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -28,7 +29,6 @@
#include "colormac.h"
#include "histogram.h"
#include "macros.h"
-#include "mfeatures.h"
#include "main/dispatch.h"
diff --git a/mesalib/src/mesa/main/histogram.h b/mesalib/src/mesa/main/histogram.h
index 06781e732..a1ec5185b 100644
--- a/mesalib/src/mesa/main/histogram.h
+++ b/mesalib/src/mesa/main/histogram.h
@@ -27,9 +27,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -37,7 +38,6 @@
#define HISTOGRAM_H
#include "compiler.h"
-#include "mfeatures.h"
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/image.c b/mesalib/src/mesa/main/image.c
index 52804bd8b..42fec10e1 100644
--- a/mesalib/src/mesa/main/image.c
+++ b/mesalib/src/mesa/main/image.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -36,7 +37,6 @@
#include "image.h"
#include "imports.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/image.h b/mesalib/src/mesa/main/image.h
index 7e92790b7..5515be630 100644
--- a/mesalib/src/mesa/main/image.h
+++ b/mesalib/src/mesa/main/image.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/imports.c b/mesalib/src/mesa/main/imports.c
index e6f754254..ba30d8e84 100644
--- a/mesalib/src/mesa/main/imports.c
+++ b/mesalib/src/mesa/main/imports.c
@@ -37,9 +37,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h
index c4110ef10..1678f71b2 100644
--- a/mesalib/src/mesa/main/imports.h
+++ b/mesalib/src/mesa/main/imports.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/light.c b/mesalib/src/mesa/main/light.c
index c694bebe6..a3a576efd 100644
--- a/mesalib/src/mesa/main/light.c
+++ b/mesalib/src/mesa/main/light.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -474,10 +475,6 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Model.TwoSide = newbool;
- if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
- ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
- else
- ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
break;
case GL_LIGHT_MODEL_COLOR_CONTROL:
if (ctx->API != API_OPENGL_COMPAT)
diff --git a/mesalib/src/mesa/main/light.h b/mesalib/src/mesa/main/light.h
index e25dbf226..2247a7494 100644
--- a/mesalib/src/mesa/main/light.h
+++ b/mesalib/src/mesa/main/light.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
struct gl_light;
diff --git a/mesalib/src/mesa/main/lines.c b/mesalib/src/mesa/main/lines.c
index a01219c42..30eb21880 100644
--- a/mesalib/src/mesa/main/lines.c
+++ b/mesalib/src/mesa/main/lines.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/lines.h b/mesalib/src/mesa/main/lines.h
index 8e8b3f8d6..a6a610e71 100644
--- a/mesalib/src/mesa/main/lines.h
+++ b/mesalib/src/mesa/main/lines.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h
index f6d38fb64..ac2467209 100644
--- a/mesalib/src/mesa/main/macros.h
+++ b/mesalib/src/mesa/main/macros.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -656,6 +657,12 @@ INTERP_4F(GLfloat t, GLfloat dst[4], const GLfloat out[4], const GLfloat in[4])
#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C))
#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
+static inline unsigned
+minify(unsigned value, unsigned levels)
+{
+ return MAX2(1, value >> levels);
+}
+
/**
* Align a value up to an alignment value
*
diff --git a/mesalib/src/mesa/main/matrix.c b/mesalib/src/mesa/main/matrix.c
index f2fd56787..0ba7e9357 100644
--- a/mesalib/src/mesa/main/matrix.c
+++ b/mesalib/src/mesa/main/matrix.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -40,7 +41,6 @@
#include "context.h"
#include "enums.h"
#include "macros.h"
-#include "mfeatures.h"
#include "matrix.h"
#include "mtypes.h"
#include "math/m_matrix.h"
diff --git a/mesalib/src/mesa/main/matrix.h b/mesalib/src/mesa/main/matrix.h
index 185a5c04b..74e7d6183 100644
--- a/mesalib/src/mesa/main/matrix.h
+++ b/mesalib/src/mesa/main/matrix.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/mfeatures.h b/mesalib/src/mesa/main/mfeatures.h
deleted file mode 100644
index 55e9cf9c4..000000000
--- a/mesalib/src/mesa/main/mfeatures.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.1
- *
- * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/**
- * \file mfeatures.h
- * Flags to enable/disable specific parts of the API.
- */
-
-#ifndef FEATURES_H
-#define FEATURES_H
-
-#ifndef FEATURE_ES1
-#define FEATURE_ES1 0
-#endif
-#ifndef FEATURE_ES2
-#define FEATURE_ES2 0
-#endif
-
-#define FEATURE_ES (FEATURE_ES1 || FEATURE_ES2)
-
-#ifndef FEATURE_GL
-#define FEATURE_GL !FEATURE_ES
-#endif
-
-#if defined(IN_DRI_DRIVER) || (FEATURE_GL + FEATURE_ES1 + FEATURE_ES2 > 1)
-#define FEATURE_remap_table 1
-#else
-#define FEATURE_remap_table 0
-#endif
-
-#endif /* FEATURES_H */
diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c
index a2f3767a3..e9741f3e0 100644
--- a/mesalib/src/mesa/main/mipmap.c
+++ b/mesalib/src/mesa/main/mipmap.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/mipmap.h b/mesalib/src/mesa/main/mipmap.h
index 072794cb6..6e26d5ba0 100644
--- a/mesalib/src/mesa/main/mipmap.h
+++ b/mesalib/src/mesa/main/mipmap.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 008f68bda..186f8a03b 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -36,7 +37,6 @@
#include "main/glheader.h"
#include "main/config.h"
-#include "main/mfeatures.h"
#include "glapi/glapi.h"
#include "math/m_matrix.h" /* GLmatrix */
#include "main/simple_list.h" /* struct simple_node */
@@ -85,9 +85,9 @@ struct set_entry;
/** Extra draw modes beyond GL_POINTS, GL_TRIANGLE_FAN, etc */
-#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
-#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
-#define PRIM_UNKNOWN (GL_POLYGON+3)
+#define PRIM_MAX GL_TRIANGLE_STRIP_ADJACENCY
+#define PRIM_OUTSIDE_BEGIN_END (PRIM_MAX + 1)
+#define PRIM_UNKNOWN (PRIM_MAX + 2)
@@ -231,7 +231,7 @@ typedef enum
VARYING_SLOT_CLIP_DIST0,
VARYING_SLOT_CLIP_DIST1,
VARYING_SLOT_PRIMITIVE_ID, /* Does not appear in VS */
- VARYING_SLOT_LAYER, /* Appears only as GS output */
+ VARYING_SLOT_LAYER, /* Appears as VS or GS output */
VARYING_SLOT_FACE, /* FS only */
VARYING_SLOT_PNTC, /* FS only */
VARYING_SLOT_VAR0, /* First generic varying slot */
@@ -1502,9 +1502,6 @@ struct gl_array_object
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
GLbitfield64 _Enabled;
- /** Mask of VERT_BIT_* values indicating changed/dirty arrays */
- GLbitfield64 NewArrays;
-
/**
* Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
* we can determine the max legal (in bounds) glDrawElements array index.
@@ -1537,15 +1534,13 @@ struct gl_array_attrib
* \name Primitive restart controls
*
* Primitive restart is enabled if either \c PrimitiveRestart or
- * \c PrimitiveRestart is set. If \c PrimitiveRestart is set, then
- * \c RestartIndex is used as the cut vertex. Otherwise ~0 is used.
+ * \c PrimitiveRestartFixedIndex is set.
*/
/*@{*/
GLboolean PrimitiveRestart;
GLboolean PrimitiveRestartFixedIndex;
GLboolean _PrimitiveRestart;
GLuint RestartIndex;
- GLuint _RestartIndex;
/*@}*/
/* GL_ARB_vertex_buffer_object */
@@ -1829,7 +1824,8 @@ enum glsl_interp_qualifier
INTERP_QUALIFIER_NONE = 0,
INTERP_QUALIFIER_SMOOTH,
INTERP_QUALIFIER_FLAT,
- INTERP_QUALIFIER_NOPERSPECTIVE
+ INTERP_QUALIFIER_NOPERSPECTIVE,
+ INTERP_QUALIFIER_COUNT /**< Number of interpolation qualifiers */
};
@@ -2134,6 +2130,17 @@ struct gl_shader
/*@}*/
/**
+ * Map from sampler unit to texture unit (set by glUniform1i())
+ *
+ * A sampler unit is associated with each sampler uniform by the linker.
+ * The sampler unit associated with each uniform is stored in the
+ * \c gl_uniform_storage::sampler field.
+ */
+ GLubyte SamplerUnits[MAX_SAMPLERS];
+ /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
+ gl_texture_index SamplerTargets[MAX_SAMPLERS];
+
+ /**
* Number of uniform components used by this shader.
*
* This field is only set post-linking.
@@ -2337,17 +2344,6 @@ struct gl_shader_program
*/
struct string_to_uint_map *UniformHash;
- /**
- * Map from sampler unit to texture unit (set by glUniform1i())
- *
- * A sampler unit is associated with each sampler uniform by the linker.
- * The sampler unit associated with each uniform is stored in the
- * \c gl_uniform_storage::sampler field.
- */
- GLubyte SamplerUnits[MAX_SAMPLERS];
- /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
- gl_texture_index SamplerTargets[MAX_SAMPLERS];
-
GLboolean LinkStatus; /**< GL_LINK_STATUS */
GLboolean Validated;
GLboolean _Used; /**< Ever used for drawing? */
@@ -2435,6 +2431,12 @@ struct gl_shader_compiler_options
GLuint MaxIfDepth; /**< Maximum nested IF blocks */
GLuint MaxUnrollIterations;
+ /**
+ * Prefer DP4 instructions (rather than MUL/MAD) for matrix * vector
+ * operations, such as position transformation.
+ */
+ GLboolean PreferDP4;
+
struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
};
@@ -2565,13 +2567,31 @@ struct gl_renderbuffer
GLuint Name;
GLint RefCount;
GLuint Width, Height;
+ GLuint Depth;
GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
+ /**
+ * True for renderbuffers that wrap textures, giving the driver a chance to
+ * flush render caches through the FinishRenderTexture hook.
+ *
+ * Drivers may also set this on renderbuffers other than those generated by
+ * glFramebufferTexture(), though it means FinishRenderTexture() would be
+ * called without a rb->TexImage.
+ */
+ GLboolean NeedsFinishRenderTexture;
GLubyte NumSamples;
GLenum InternalFormat; /**< The user-specified format */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
GL_STENCIL_INDEX. */
gl_format Format; /**< The actual renderbuffer memory format */
+ /**
+ * Pointer to the texture image if this renderbuffer wraps a texture,
+ * otherwise NULL.
+ *
+ * Note that the reference on the gl_texture_object containing this
+ * TexImage is held by the gl_renderbuffer_attachment.
+ */
+ struct gl_texture_image *TexImage;
/** Delete this renderbuffer */
void (*Delete)(struct gl_context *ctx, struct gl_renderbuffer *rb);
@@ -2608,6 +2628,7 @@ struct gl_renderbuffer_attachment
GLuint CubeMapFace; /**< 0 .. 5, for cube map textures. */
GLuint Zoffset; /**< Slice for 3D textures, or layer for both 1D
* and 2D array textures */
+ GLboolean Layered;
};
@@ -2680,6 +2701,8 @@ struct gl_framebuffer
struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS];
struct gl_renderbuffer *_ColorReadBuffer;
+ GLboolean Layered;
+
/** Delete this framebuffer */
void (*Delete)(struct gl_framebuffer *fb);
};
@@ -2730,6 +2753,7 @@ struct gl_program_constants
/* GL_ARB_uniform_buffer_object */
GLuint MaxUniformBlocks;
GLuint MaxCombinedUniformComponents;
+ GLuint MaxTextureImageUnits;
};
@@ -2746,11 +2770,8 @@ struct gl_constants
GLuint MaxArrayTextureLayers; /**< Max layers in array textures */
GLuint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */
GLuint MaxTextureCoordUnits;
- GLuint MaxTextureImageUnits;
- GLuint MaxVertexTextureImageUnits;
GLuint MaxCombinedTextureImageUnits;
- GLuint MaxGeometryTextureImageUnits;
- GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
+ GLuint MaxTextureUnits; /**< = MIN(CoordUnits, FragmentProgram.ImageUnits) */
GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
GLuint MaxTextureBufferSize; /**< GL_ARB_texture_buffer_object */
@@ -2768,8 +2789,6 @@ struct gl_constants
GLfloat MinLineWidthAA, MaxLineWidthAA; /**< antialiased */
GLfloat LineWidthGranularity;
- GLuint MaxColorTableSize;
-
GLuint MaxClipPlanes;
GLuint MaxLights;
GLfloat MaxShininess; /**< GL_NV_light_max_exponent */
@@ -2800,10 +2819,9 @@ struct gl_constants
GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */
GLuint MaxSamples; /**< GL_ARB_framebuffer_object */
- /** Number of varying vectors between vertex and fragment shaders */
+ /** Number of varying vectors between any two shader stages. */
GLuint MaxVarying;
- GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */
- GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */
+ GLuint MaxVaryingComponents;
/** @{
* GL_ARB_uniform_buffer_object
@@ -2965,6 +2983,7 @@ struct gl_extensions
GLboolean ARB_framebuffer_object;
GLboolean ARB_explicit_attrib_location;
GLboolean ARB_geometry_shader4;
+ GLboolean ARB_gpu_shader5;
GLboolean ARB_half_float_pixel;
GLboolean ARB_half_float_vertex;
GLboolean ARB_instanced_arrays;
@@ -3019,6 +3038,7 @@ struct gl_extensions
GLboolean EXT_fog_coord;
GLboolean EXT_framebuffer_blit;
GLboolean EXT_framebuffer_multisample;
+ GLboolean EXT_framebuffer_multisample_blit_scaled;
GLboolean EXT_framebuffer_object;
GLboolean EXT_framebuffer_sRGB;
GLboolean EXT_gpu_program_parameters;
@@ -3051,6 +3071,7 @@ struct gl_extensions
GLboolean OES_standard_derivatives;
/* vendor extensions */
GLboolean AMD_seamless_cubemap_per_texture;
+ GLboolean AMD_vertex_shader_layer;
GLboolean APPLE_object_purgeable;
GLboolean ATI_envmap_bumpmap;
GLboolean ATI_texture_compression_3dc;
@@ -3137,7 +3158,7 @@ struct gl_matrix_stack
#define _NEW_TEXTURE (1 << 16) /**< gl_context::Texture */
#define _NEW_TRANSFORM (1 << 17) /**< gl_context::Transform */
#define _NEW_VIEWPORT (1 << 18) /**< gl_context::Viewport */
-#define _NEW_PACKUNPACK (1 << 19) /**< gl_context::Pack, Unpack */
+/* gap, re-use for core Mesa state only; use ctx->DriverFlags otherwise */
#define _NEW_ARRAY (1 << 20) /**< gl_context::Array */
#define _NEW_RENDERMODE (1 << 21) /**< gl_context::RenderMode, etc */
#define _NEW_BUFFERS (1 << 22) /**< gl_context::Visual, DrawBuffer, */
@@ -3148,34 +3169,9 @@ struct gl_matrix_stack
#define _NEW_PROGRAM_CONSTANTS (1 << 27)
#define _NEW_BUFFER_OBJECT (1 << 28)
#define _NEW_FRAG_CLAMP (1 << 29)
-#define _NEW_TRANSFORM_FEEDBACK (1 << 30) /**< gl_context::TransformFeedback */
+/* gap, re-use for core Mesa state only; use ctx->DriverFlags otherwise */
#define _NEW_VARYING_VP_INPUTS (1 << 31) /**< gl_context::varying_vp_inputs */
#define _NEW_ALL ~0
-
-/**
- * We use _NEW_TRANSFORM for GL_RASTERIZER_DISCARD. This #define is for
- * clarity.
- */
-#define _NEW_RASTERIZER_DISCARD _NEW_TRANSFORM
-/*@}*/
-
-
-/**
- * \name A bunch of flags that we think might be useful to drivers.
- *
- * Set in the __struct gl_contextRec::_TriangleCaps bitfield.
- */
-/*@{*/
-#define DD_SEPARATE_SPECULAR (1 << 0)
-#define DD_TRI_LIGHT_TWOSIDE (1 << 1)
-#define DD_TRI_UNFILLED (1 << 2)
-#define DD_TRI_SMOOTH (1 << 3)
-#define DD_TRI_STIPPLE (1 << 4)
-#define DD_TRI_OFFSET (1 << 5)
-#define DD_LINE_SMOOTH (1 << 6)
-#define DD_LINE_STIPPLE (1 << 7)
-#define DD_POINT_SMOOTH (1 << 8)
-#define DD_POINT_ATTEN (1 << 9)
/*@}*/
@@ -3352,7 +3348,20 @@ typedef enum
*/
struct gl_driver_flags
{
- GLbitfield NewArray; /**< Vertex array state */
+ /** gl_context::Array::_DrawArrays (vertex array state) */
+ GLbitfield NewArray;
+
+ /** gl_context::TransformFeedback::CurrentObject */
+ GLbitfield NewTransformFeedback;
+
+ /** gl_context::RasterDiscard */
+ GLbitfield NewRasterizerDiscard;
+
+ /**
+ * gl_context::UniformBufferBindings
+ * gl_shader_program::UniformBlocks
+ */
+ GLbitfield NewUniformBuffer;
};
struct gl_uniform_buffer_binding
@@ -3534,7 +3543,8 @@ struct gl_context
* associated with uniform blocks by glUniformBlockBinding()'s state in the
* shader program.
*/
- struct gl_uniform_buffer_binding *UniformBufferBindings;
+ struct gl_uniform_buffer_binding
+ UniformBufferBindings[MAX_COMBINED_UNIFORM_BUFFERS];
/*@}*/
@@ -3568,11 +3578,6 @@ struct gl_context
GLbitfield64 varying_vp_inputs; /**< mask of VERT_BIT_* flags */
/** \name Derived state */
- /*@{*/
- /** Bitwise-or of DD_* flags. Note that this bitfield may be used before
- * state validation so they need to always be current.
- */
- GLbitfield _TriangleCaps;
GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */
GLfloat _EyeZDir[3];
GLfloat _ModelViewInvScale;
@@ -3593,12 +3598,6 @@ struct gl_context
GLboolean TextureFormatSupported[MESA_FORMAT_COUNT];
- /**
- * Use dp4 (rather than mul/mad) instructions for position
- * transformation?
- */
- GLboolean mvp_with_dp4;
-
GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */
/**
diff --git a/mesalib/src/mesa/main/multisample.c b/mesalib/src/mesa/main/multisample.c
index b0f45d933..02d6ca453 100644
--- a/mesalib/src/mesa/main/multisample.c
+++ b/mesalib/src/mesa/main/multisample.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -30,6 +31,7 @@
#include "main/mtypes.h"
#include "main/fbobject.h"
#include "main/glformats.h"
+#include "main/state.h"
/**
@@ -73,6 +75,10 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
{
GET_CURRENT_CONTEXT(ctx);
+ if (ctx->NewState & _NEW_BUFFERS) {
+ _mesa_update_state(ctx);
+ }
+
switch (pname) {
case GL_SAMPLE_POSITION: {
if (index >= ctx->DrawBuffer->Visual.samples) {
diff --git a/mesalib/src/mesa/main/multisample.h b/mesalib/src/mesa/main/multisample.h
index f2f01de5c..d6995d8fb 100644
--- a/mesalib/src/mesa/main/multisample.h
+++ b/mesalib/src/mesa/main/multisample.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/pack.h b/mesalib/src/mesa/main/pack.h
index 2fbdf9115..ad357bae1 100644
--- a/mesalib/src/mesa/main/pack.h
+++ b/mesalib/src/mesa/main/pack.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/pbo.c b/mesalib/src/mesa/main/pbo.c
index 0dc4c04eb..400cec3f0 100644
--- a/mesalib/src/mesa/main/pbo.c
+++ b/mesalib/src/mesa/main/pbo.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/pbo.h b/mesalib/src/mesa/main/pbo.h
index 9eba33514..9851ef1a1 100644
--- a/mesalib/src/mesa/main/pbo.h
+++ b/mesalib/src/mesa/main/pbo.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/pixel.c b/mesalib/src/mesa/main/pixel.c
index e9f75a7df..0552de666 100644
--- a/mesalib/src/mesa/main/pixel.c
+++ b/mesalib/src/mesa/main/pixel.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,7 +34,6 @@
#include "colormac.h"
#include "context.h"
#include "macros.h"
-#include "mfeatures.h"
#include "pixel.h"
#include "pbo.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/pixel.h b/mesalib/src/mesa/main/pixel.h
index 433208cb6..88fc0cf99 100644
--- a/mesalib/src/mesa/main/pixel.h
+++ b/mesalib/src/mesa/main/pixel.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -35,7 +36,6 @@
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
struct _glapi_table;
struct gl_context;
diff --git a/mesalib/src/mesa/main/pixelstore.c b/mesalib/src/mesa/main/pixelstore.c
index 01068e8ea..cf871dc5c 100644
--- a/mesalib/src/mesa/main/pixelstore.c
+++ b/mesalib/src/mesa/main/pixelstore.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -32,7 +33,6 @@
#include "bufferobj.h"
#include "context.h"
#include "pixelstore.h"
-#include "mfeatures.h"
#include "mtypes.h"
@@ -48,7 +48,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
goto invalid_enum_error;
if (param == (GLint)ctx->Pack.SwapBytes)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.SwapBytes = param ? GL_TRUE : GL_FALSE;
break;
case GL_PACK_LSB_FIRST:
@@ -56,7 +55,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
goto invalid_enum_error;
if (param == (GLint)ctx->Pack.LsbFirst)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.LsbFirst = param ? GL_TRUE : GL_FALSE;
break;
case GL_PACK_ROW_LENGTH:
@@ -68,7 +66,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.RowLength == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.RowLength = param;
break;
case GL_PACK_IMAGE_HEIGHT:
@@ -80,7 +77,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.ImageHeight == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.ImageHeight = param;
break;
case GL_PACK_SKIP_PIXELS:
@@ -92,7 +88,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.SkipPixels == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.SkipPixels = param;
break;
case GL_PACK_SKIP_ROWS:
@@ -104,7 +99,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.SkipRows == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.SkipRows = param;
break;
case GL_PACK_SKIP_IMAGES:
@@ -116,7 +110,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.SkipImages == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.SkipImages = param;
break;
case GL_PACK_ALIGNMENT:
@@ -126,7 +119,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.Alignment == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.Alignment = param;
break;
case GL_PACK_INVERT_MESA:
@@ -138,7 +130,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Pack.Invert == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.Invert = param;
break;
@@ -149,7 +140,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
return;
if ((GLint)ctx->Unpack.SwapBytes == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.SwapBytes = param ? GL_TRUE : GL_FALSE;
break;
case GL_UNPACK_LSB_FIRST:
@@ -159,7 +149,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
return;
if ((GLint)ctx->Unpack.LsbFirst == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.LsbFirst = param ? GL_TRUE : GL_FALSE;
break;
case GL_UNPACK_ROW_LENGTH:
@@ -171,7 +160,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Unpack.RowLength == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.RowLength = param;
break;
case GL_UNPACK_IMAGE_HEIGHT:
@@ -184,7 +172,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
if (ctx->Unpack.ImageHeight == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.ImageHeight = param;
break;
case GL_UNPACK_SKIP_PIXELS:
@@ -196,7 +183,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Unpack.SkipPixels == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.SkipPixels = param;
break;
case GL_UNPACK_SKIP_ROWS:
@@ -208,7 +194,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Unpack.SkipRows == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.SkipRows = param;
break;
case GL_UNPACK_SKIP_IMAGES:
@@ -220,7 +205,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Unpack.SkipImages == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.SkipImages = param;
break;
case GL_UNPACK_ALIGNMENT:
@@ -230,7 +214,6 @@ _mesa_PixelStorei( GLenum pname, GLint param )
}
if (ctx->Unpack.Alignment == param)
return;
- FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Unpack.Alignment = param;
break;
default:
diff --git a/mesalib/src/mesa/main/pixelstore.h b/mesalib/src/mesa/main/pixelstore.h
index eb5081974..1ffc8f8b8 100644
--- a/mesalib/src/mesa/main/pixelstore.h
+++ b/mesalib/src/mesa/main/pixelstore.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/main/pixeltransfer.c b/mesalib/src/mesa/main/pixeltransfer.c
index fa355eb4a..8bbeeb853 100644
--- a/mesalib/src/mesa/main/pixeltransfer.c
+++ b/mesalib/src/mesa/main/pixeltransfer.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/pixeltransfer.h b/mesalib/src/mesa/main/pixeltransfer.h
index 3cd7ebe77..b0a301f26 100644
--- a/mesalib/src/mesa/main/pixeltransfer.h
+++ b/mesalib/src/mesa/main/pixeltransfer.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/points.c b/mesalib/src/mesa/main/points.c
index c925d4cfd..71b1a4166 100644
--- a/mesalib/src/mesa/main/points.c
+++ b/mesalib/src/mesa/main/points.c
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -122,11 +123,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
ctx->Point.Params[1] != 0.0 ||
ctx->Point.Params[2] != 0.0);
-
- if (ctx->Point._Attenuated)
- ctx->_TriangleCaps |= DD_POINT_ATTEN;
- else
- ctx->_TriangleCaps &= ~DD_POINT_ATTEN;
break;
case GL_POINT_SIZE_MIN_EXT:
if (params[0] < 0.0F) {
diff --git a/mesalib/src/mesa/main/points.h b/mesalib/src/mesa/main/points.h
index 306a8a572..797f83158 100644
--- a/mesalib/src/mesa/main/points.h
+++ b/mesalib/src/mesa/main/points.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/polygon.c b/mesalib/src/mesa/main/polygon.c
index cdef01a2f..0ded7434c 100644
--- a/mesalib/src/mesa/main/polygon.c
+++ b/mesalib/src/mesa/main/polygon.c
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -172,11 +173,6 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
return;
}
- if (ctx->Polygon.FrontMode == GL_FILL && ctx->Polygon.BackMode == GL_FILL)
- ctx->_TriangleCaps &= ~DD_TRI_UNFILLED;
- else
- ctx->_TriangleCaps |= DD_TRI_UNFILLED;
-
if (ctx->Driver.PolygonMode)
ctx->Driver.PolygonMode(ctx, face, mode);
}
diff --git a/mesalib/src/mesa/main/polygon.h b/mesalib/src/mesa/main/polygon.h
index 35f222f26..651c3356c 100644
--- a/mesalib/src/mesa/main/polygon.h
+++ b/mesalib/src/mesa/main/polygon.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/querymatrix.h b/mesalib/src/mesa/main/querymatrix.h
index 187b5f486..e08d843a9 100644
--- a/mesalib/src/mesa/main/querymatrix.h
+++ b/mesalib/src/mesa/main/querymatrix.h
@@ -25,7 +25,6 @@
#define QUERYMATRIX_H
-#include "mfeatures.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c
index 3de736828..2204f2d37 100644
--- a/mesalib/src/mesa/main/queryobj.c
+++ b/mesalib/src/mesa/main/queryobj.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "hash.h"
#include "imports.h"
#include "queryobj.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
@@ -76,7 +76,7 @@ _mesa_new_query_object(struct gl_context *ctx, GLuint id)
void
_mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q)
{
- /* no-op */
+ ctx->NewState |= _NEW_DEPTH; /* for swrast */
}
@@ -87,6 +87,7 @@ _mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q)
void
_mesa_end_query(struct gl_context *ctx, struct gl_query_object *q)
{
+ ctx->NewState |= _NEW_DEPTH; /* for swrast */
q->Ready = GL_TRUE;
}
@@ -315,7 +316,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
if (!query_error_check_index(ctx, target, index))
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, 0);
bindpt = get_query_binding_point(ctx, target);
if (!bindpt) {
@@ -392,7 +393,7 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index)
if (!query_error_check_index(ctx, target, index))
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, 0);
bindpt = get_query_binding_point(ctx, target);
if (!bindpt) {
diff --git a/mesalib/src/mesa/main/queryobj.h b/mesalib/src/mesa/main/queryobj.h
index 0616c943e..5b9ff5820 100644
--- a/mesalib/src/mesa/main/queryobj.h
+++ b/mesalib/src/mesa/main/queryobj.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -27,7 +28,6 @@
#define QUERYOBJ_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/hash.h"
diff --git a/mesalib/src/mesa/main/rastpos.c b/mesalib/src/mesa/main/rastpos.c
index 5a030be44..e578c6cc8 100644
--- a/mesalib/src/mesa/main/rastpos.c
+++ b/mesalib/src/mesa/main/rastpos.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -32,7 +33,6 @@
#include "context.h"
#include "feedback.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "rastpos.h"
#include "state.h"
diff --git a/mesalib/src/mesa/main/rastpos.h b/mesalib/src/mesa/main/rastpos.h
index bbd32abd3..45968f304 100644
--- a/mesalib/src/mesa/main/rastpos.h
+++ b/mesalib/src/mesa/main/rastpos.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,7 +34,6 @@
#include "compiler.h"
-#include "mfeatures.h"
struct _glapi_table;
struct gl_context;
diff --git a/mesalib/src/mesa/main/readpix.c b/mesalib/src/mesa/main/readpix.c
index 0dee38063..85952d671 100644
--- a/mesalib/src/mesa/main/readpix.c
+++ b/mesalib/src/mesa/main/readpix.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
diff --git a/mesalib/src/mesa/main/readpix.h b/mesalib/src/mesa/main/readpix.h
index 7491c22ff..9e2d58ae9 100644
--- a/mesalib/src/mesa/main/readpix.h
+++ b/mesalib/src/mesa/main/readpix.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/remap.c b/mesalib/src/mesa/main/remap.c
index a09870561..44ec96498 100644
--- a/mesalib/src/mesa/main/remap.c
+++ b/mesalib/src/mesa/main/remap.c
@@ -36,10 +36,6 @@
* a dynamic entry, or the corresponding static entry, in glapi.
*/
-#include "mfeatures.h"
-
-#if FEATURE_remap_table
-
#include "remap.h"
#include "imports.h"
#include "glapi/glapi.h"
@@ -223,6 +219,3 @@ _mesa_init_remap_table(void)
driDispatchRemapTable_size,
MESA_remap_table_functions);
}
-
-
-#endif /* FEATURE_remap_table */
diff --git a/mesalib/src/mesa/main/remap.h b/mesalib/src/mesa/main/remap.h
index fa3172487..bfef6ac4e 100644
--- a/mesalib/src/mesa/main/remap.h
+++ b/mesalib/src/mesa/main/remap.h
@@ -29,7 +29,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct gl_function_pool_remap {
int pool_index;
@@ -42,8 +41,6 @@ struct gl_function_remap {
};
-#if FEATURE_remap_table
-
extern int
driDispatchRemapTable[];
@@ -62,37 +59,5 @@ _mesa_map_static_functions(void);
extern void
_mesa_init_remap_table(void);
-#else /* FEATURE_remap_table */
-
-static inline const char *
-_mesa_get_function_spec(int func_index)
-{
- return NULL;
-}
-
-static inline int
-_mesa_map_function_spec(const char *spec)
-{
- return -1;
-}
-
-static inline void
-_mesa_map_function_array(const struct gl_function_remap *func_array)
-{
-}
-
-static inline void
-_mesa_map_static_functions(void)
-{
-}
-
-
-static inline void
-_mesa_init_remap_table(void)
-{
-}
-
-#endif /* FEATURE_remap_table */
-
#endif /* REMAP_H */
diff --git a/mesalib/src/mesa/main/renderbuffer.c b/mesalib/src/mesa/main/renderbuffer.c
index b42616226..c82b5cd85 100644
--- a/mesalib/src/mesa/main/renderbuffer.c
+++ b/mesalib/src/mesa/main/renderbuffer.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -52,6 +53,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
rb->Width = 0;
rb->Height = 0;
+ rb->Depth = 0;
rb->InternalFormat = GL_RGBA;
rb->Format = MESA_FORMAT_NONE;
}
diff --git a/mesalib/src/mesa/main/renderbuffer.h b/mesalib/src/mesa/main/renderbuffer.h
index c450b33cb..e3e56d29e 100644
--- a/mesalib/src/mesa/main/renderbuffer.h
+++ b/mesalib/src/mesa/main/renderbuffer.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/samplerobj.c b/mesalib/src/mesa/main/samplerobj.c
index 5cff32936..91b17ab5e 100644
--- a/mesalib/src/mesa/main/samplerobj.c
+++ b/mesalib/src/mesa/main/samplerobj.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -35,7 +36,6 @@
#include "main/enums.h"
#include "main/hash.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/samplerobj.h"
diff --git a/mesalib/src/mesa/main/samplerobj.h b/mesalib/src/mesa/main/samplerobj.h
index 69e389949..c72b1cd8d 100644
--- a/mesalib/src/mesa/main/samplerobj.h
+++ b/mesalib/src/mesa/main/samplerobj.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/scissor.c b/mesalib/src/mesa/main/scissor.c
index 0c2a91f5c..538ed595e 100644
--- a/mesalib/src/mesa/main/scissor.c
+++ b/mesalib/src/mesa/main/scissor.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/scissor.h b/mesalib/src/mesa/main/scissor.h
index da9385e2b..2ac0c88da 100644
--- a/mesalib/src/mesa/main/scissor.h
+++ b/mesalib/src/mesa/main/scissor.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 2c307e79c..8cb02760b 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -41,7 +42,6 @@
#include "main/dispatch.h"
#include "main/enums.h"
#include "main/hash.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
@@ -1453,8 +1453,10 @@ _mesa_ValidateProgram(GLhandleARB program)
validate_program(ctx, program);
}
-#ifdef FEATURE_ES2
+/**
+ * For OpenGL ES 2.0, GL_ARB_ES2_compatibility
+ */
void GLAPIENTRY
_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
GLint* range, GLint* precision)
@@ -1507,6 +1509,9 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
}
+/**
+ * For OpenGL ES 2.0, GL_ARB_ES2_compatibility
+ */
void GLAPIENTRY
_mesa_ReleaseShaderCompiler(void)
{
@@ -1514,6 +1519,9 @@ _mesa_ReleaseShaderCompiler(void)
}
+/**
+ * For OpenGL ES 2.0, GL_ARB_ES2_compatibility
+ */
void GLAPIENTRY
_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
const void* binary, GLint length)
@@ -1527,7 +1535,6 @@ _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
_mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
}
-#endif /* FEATURE_ES2 */
void GLAPIENTRY
_mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
diff --git a/mesalib/src/mesa/main/shaderapi.h b/mesalib/src/mesa/main/shaderapi.h
index 342b58905..1cd4ffcea 100644
--- a/mesalib/src/mesa/main/shaderapi.h
+++ b/mesalib/src/mesa/main/shaderapi.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c
index 59daff5bf..a60d8f38a 100644
--- a/mesalib/src/mesa/main/shaderobj.c
+++ b/mesalib/src/mesa/main/shaderobj.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -32,7 +33,6 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/shaderobj.h"
#include "main/uniforms.h"
diff --git a/mesalib/src/mesa/main/shaderobj.h b/mesalib/src/mesa/main/shaderobj.h
index 5470b51d7..a0dac5ec9 100644
--- a/mesalib/src/mesa/main/shaderobj.h
+++ b/mesalib/src/mesa/main/shaderobj.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c
index 408125998..9f5624def 100644
--- a/mesalib/src/mesa/main/shared.c
+++ b/mesalib/src/mesa/main/shared.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -28,7 +29,6 @@
*/
#include "imports.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "hash.h"
#include "hash_table.h"
diff --git a/mesalib/src/mesa/main/shared.h b/mesalib/src/mesa/main/shared.h
index 3fe4578cf..3bec08765 100644
--- a/mesalib/src/mesa/main/shared.h
+++ b/mesalib/src/mesa/main/shared.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SHARED_H
diff --git a/mesalib/src/mesa/main/simple_list.h b/mesalib/src/mesa/main/simple_list.h
index 9417108a0..0ade52d71 100644
--- a/mesalib/src/mesa/main/simple_list.h
+++ b/mesalib/src/mesa/main/simple_list.h
@@ -28,9 +28,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index 251c1aea9..1b927ca65 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/src/mesa/main/state.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -54,16 +55,6 @@
#include "blend.h"
-static void
-update_separate_specular(struct gl_context *ctx)
-{
- if (_mesa_need_secondary_color(ctx))
- ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
- else
- ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
-}
-
-
/**
* Update the following fields:
* ctx->VertexProgram._Enabled
@@ -324,82 +315,6 @@ update_twoside(struct gl_context *ctx)
}
-/*
- * Check polygon state and set DD_TRI_OFFSET
- * in ctx->_TriangleCaps if needed.
- */
-static void
-update_polygon(struct gl_context *ctx)
-{
- ctx->_TriangleCaps &= ~DD_TRI_OFFSET;
-
- if ( ctx->Polygon.OffsetPoint
- || ctx->Polygon.OffsetLine
- || ctx->Polygon.OffsetFill)
- ctx->_TriangleCaps |= DD_TRI_OFFSET;
-}
-
-
-/**
- * Update the ctx->_TriangleCaps bitfield.
- * XXX that bitfield should really go away someday!
- * This function must be called after other update_*() functions since
- * there are dependencies on some other derived values.
- */
-#if 0
-static void
-update_tricaps(struct gl_context *ctx, GLbitfield new_state)
-{
- ctx->_TriangleCaps = 0;
-
- /*
- * Points
- */
- if (1/*new_state & _NEW_POINT*/) {
- if (ctx->Point.SmoothFlag)
- ctx->_TriangleCaps |= DD_POINT_SMOOTH;
- if (ctx->Point._Attenuated)
- ctx->_TriangleCaps |= DD_POINT_ATTEN;
- }
-
- /*
- * Lines
- */
- if (1/*new_state & _NEW_LINE*/) {
- if (ctx->Line.SmoothFlag)
- ctx->_TriangleCaps |= DD_LINE_SMOOTH;
- if (ctx->Line.StippleFlag)
- ctx->_TriangleCaps |= DD_LINE_STIPPLE;
- }
-
- /*
- * Polygons
- */
- if (1/*new_state & _NEW_POLYGON*/) {
- if (ctx->Polygon.SmoothFlag)
- ctx->_TriangleCaps |= DD_TRI_SMOOTH;
- if (ctx->Polygon.StippleFlag)
- ctx->_TriangleCaps |= DD_TRI_STIPPLE;
- if (ctx->Polygon.FrontMode != GL_FILL
- || ctx->Polygon.BackMode != GL_FILL)
- ctx->_TriangleCaps |= DD_TRI_UNFILLED;
- if (ctx->Polygon.OffsetPoint ||
- ctx->Polygon.OffsetLine ||
- ctx->Polygon.OffsetFill)
- ctx->_TriangleCaps |= DD_TRI_OFFSET;
- }
-
- /*
- * Lighting and shading
- */
- if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
- ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
- if (_mesa_need_secondary_color(ctx))
- ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
-}
-#endif
-
-
/**
* Compute derived GL state.
* If __struct gl_contextRec::NewState is non-zero then this function \b must
@@ -458,9 +373,6 @@ _mesa_update_state_locked( struct gl_context *ctx )
if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
_mesa_update_draw_buffer_bounds( ctx );
- if (new_state & _NEW_POLYGON)
- update_polygon( ctx );
-
if (new_state & _NEW_LIGHT)
_mesa_update_lighting( ctx );
@@ -473,21 +385,12 @@ _mesa_update_state_locked( struct gl_context *ctx )
if (new_state & _NEW_PIXEL)
_mesa_update_pixel( ctx, new_state );
- if (new_state & _MESA_NEW_SEPARATE_SPECULAR)
- update_separate_specular( ctx );
-
if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT))
update_viewport_matrix(ctx);
if (new_state & (_NEW_MULTISAMPLE | _NEW_BUFFERS))
update_multisample( ctx );
-#if 0
- if (new_state & (_NEW_POINT | _NEW_LINE | _NEW_POLYGON | _NEW_LIGHT
- | _NEW_STENCIL | _MESA_NEW_SEPARATE_SPECULAR))
- update_tricaps( ctx, new_state );
-#endif
-
/* ctx->_NeedEyeCoords is now up to date.
*
* If the truth value of this variable has changed, update for the
@@ -508,8 +411,10 @@ _mesa_update_state_locked( struct gl_context *ctx )
new_prog_state |= update_program( ctx );
}
- if (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT))
+ if (ctx->Const.CheckArrayBounds &&
+ new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) {
_mesa_update_array_object_max_element(ctx, ctx->Array.ArrayObj);
+ }
out:
new_prog_state |= update_program_constants(ctx);
@@ -526,7 +431,6 @@ _mesa_update_state_locked( struct gl_context *ctx )
new_state = ctx->NewState | new_prog_state;
ctx->NewState = 0;
ctx->Driver.UpdateState(ctx, new_state);
- ctx->Array.ArrayObj->NewArrays = 0x0;
}
diff --git a/mesalib/src/mesa/main/state.h b/mesalib/src/mesa/main/state.h
index 7b3121b4e..bc2406b4d 100644
--- a/mesalib/src/mesa/main/state.h
+++ b/mesalib/src/mesa/main/state.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/stencil.c b/mesalib/src/mesa/main/stencil.c
index 330841731..505703a3d 100644
--- a/mesalib/src/mesa/main/stencil.c
+++ b/mesalib/src/mesa/main/stencil.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -109,10 +110,6 @@ _mesa_ClearStencil( GLint s )
{
GET_CURRENT_CONTEXT(ctx);
- if (ctx->Stencil.Clear == (GLuint) s)
- return;
-
- FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.Clear = (GLuint) s;
}
@@ -135,7 +132,6 @@ void GLAPIENTRY
_mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask )
{
GET_CURRENT_CONTEXT(ctx);
- const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilFuncSeparateATI()\n");
@@ -151,8 +147,6 @@ _mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLui
return;
}
- ref = CLAMP( ref, 0, stencilMax );
-
/* set both front and back state */
if (ctx->Stencil.Function[0] == frontfunc &&
ctx->Stencil.Function[1] == backfunc &&
@@ -192,7 +186,6 @@ void GLAPIENTRY
_mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
{
GET_CURRENT_CONTEXT(ctx);
- const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
const GLint face = ctx->Stencil.ActiveFace;
if (MESA_VERBOSE & VERBOSE_API)
@@ -203,8 +196,6 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
return;
}
- ref = CLAMP( ref, 0, stencilMax );
-
if (face != 0) {
if (ctx->Stencil.Function[face] == func &&
ctx->Stencil.ValueMask[face] == mask &&
@@ -390,7 +381,6 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
}
if (face == GL_FRONT || face == GL_BACK) {
- FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 2;
}
else {
@@ -467,7 +457,6 @@ void GLAPIENTRY
_mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
GET_CURRENT_CONTEXT(ctx);
- const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilFuncSeparate()\n");
@@ -481,8 +470,6 @@ _mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
return;
}
- ref = CLAMP(ref, 0, stencilMax);
-
FLUSH_VERTICES(ctx, _NEW_STENCIL);
if (face != GL_BACK) {
diff --git a/mesalib/src/mesa/main/stencil.h b/mesalib/src/mesa/main/stencil.h
index b772bfd6e..f2f7d37c6 100644
--- a/mesalib/src/mesa/main/stencil.h
+++ b/mesalib/src/mesa/main/stencil.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -78,4 +79,18 @@ _mesa_update_stencil(struct gl_context *ctx);
extern void
_mesa_init_stencil( struct gl_context * ctx );
+/* From the GL 4.3 spec, 17.3.5:
+ * "Stencil comparison operations and queries of <ref> clamp its value
+ * to the range [0, 2^s-1], where <s> is the number of bits in the
+ * stencil buffer attached to the draw framebuffer."
+ */
+
+static inline GLint
+_mesa_get_stencil_ref(struct gl_context const *ctx, int face)
+{
+ GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
+ GLint ref = ctx->Stencil.Ref[face];
+ return CLAMP(ref, 0, stencilMax);
+}
+
#endif
diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c
index 67eb2d357..5fa548d0d 100644
--- a/mesalib/src/mesa/main/syncobj.c
+++ b/mesalib/src/mesa/main/syncobj.c
@@ -60,7 +60,6 @@
#include "imports.h"
#include "context.h"
#include "macros.h"
-#include "mfeatures.h"
#include "get.h"
#include "dispatch.h"
#include "mtypes.h"
diff --git a/mesalib/src/mesa/main/syncobj.h b/mesalib/src/mesa/main/syncobj.h
index 5be2ba10d..adb5060b1 100644
--- a/mesalib/src/mesa/main/syncobj.h
+++ b/mesalib/src/mesa/main/syncobj.h
@@ -32,7 +32,6 @@
#define SYNCOBJ_H
#include "glheader.h"
-#include "mfeatures.h"
struct _glapi_table;
struct dd_function_table;
diff --git a/mesalib/src/mesa/main/texcompress.c b/mesalib/src/mesa/main/texcompress.c
index 734294e45..2391868a4 100644
--- a/mesalib/src/mesa/main/texcompress.c
+++ b/mesalib/src/mesa/main/texcompress.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -35,7 +36,6 @@
#include "colormac.h"
#include "context.h"
#include "formats.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "context.h"
#include "texcompress.h"
@@ -588,7 +588,7 @@ _mesa_decompress_image(gl_format format, GLuint width, GLuint height,
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++) {
- fetch(src, NULL, stride, i, j, 0, dest);
+ fetch(src, stride, i, j, dest);
dest += 4;
}
}
diff --git a/mesalib/src/mesa/main/texcompress.h b/mesalib/src/mesa/main/texcompress.h
index b45e7cf1b..c27fc26c9 100644
--- a/mesalib/src/mesa/main/texcompress.h
+++ b/mesalib/src/mesa/main/texcompress.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef TEXCOMPRESS_H
@@ -27,7 +28,6 @@
#include "formats.h"
#include "glheader.h"
-#include "mfeatures.h"
struct gl_context;
@@ -51,9 +51,8 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img,
/** A function to fetch one texel from a compressed texture */
typedef void (*compressed_fetch_func)(const GLubyte *map,
- const GLuint imageOffsets[],
GLint rowStride,
- GLint i, GLint j, GLint k,
+ GLint i, GLint j,
GLfloat *texel);
extern compressed_fetch_func
diff --git a/mesalib/src/mesa/main/texcompress_cpal.c b/mesalib/src/mesa/main/texcompress_cpal.c
index 75389a437..2838a6a4e 100644
--- a/mesalib/src/mesa/main/texcompress_cpal.c
+++ b/mesalib/src/mesa/main/texcompress_cpal.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
/**
@@ -33,7 +34,6 @@
#include "glheader.h"
#include "compiler.h" /* for ASSERT */
#include "context.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "imports.h"
#include "pixelstore.h"
diff --git a/mesalib/src/mesa/main/texcompress_cpal.h b/mesalib/src/mesa/main/texcompress_cpal.h
index 7d28fd866..8a8eac292 100644
--- a/mesalib/src/mesa/main/texcompress_cpal.h
+++ b/mesalib/src/mesa/main/texcompress_cpal.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texcompress_etc.c b/mesalib/src/mesa/main/texcompress_etc.c
index 7ad4ddeb6..a06d29f19 100644
--- a/mesalib/src/mesa/main/texcompress_etc.c
+++ b/mesalib/src/mesa/main/texcompress_etc.c
@@ -38,7 +38,6 @@
*/
#include <stdbool.h>
-#include "mfeatures.h"
#include "texcompress.h"
#include "texcompress_etc.h"
#include "texstore.h"
@@ -1223,8 +1222,8 @@ _mesa_unpack_etc2_format(uint8_t *dst_row,
static void
-fetch_etc1_rgb8(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
+fetch_etc1_rgb8(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j,
GLfloat *texel)
{
struct etc1_block block;
@@ -1244,9 +1243,8 @@ fetch_etc1_rgb8(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_etc2_rgb8(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_rgb8(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[3];
@@ -1266,9 +1264,8 @@ fetch_etc2_rgb8(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_srgb8(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_srgb8(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[3];
@@ -1288,9 +1285,8 @@ fetch_etc2_srgb8(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_rgba8_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_rgba8_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[4];
@@ -1308,9 +1304,8 @@ fetch_etc2_rgba8_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_srgb8_alpha8_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_srgb8_alpha8_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[4];
@@ -1328,9 +1323,8 @@ fetch_etc2_srgb8_alpha8_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_r11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst;
@@ -1348,9 +1342,8 @@ fetch_etc2_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_rg11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst[2];
@@ -1373,9 +1366,8 @@ fetch_etc2_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_signed_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_signed_r11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst;
@@ -1393,9 +1385,8 @@ fetch_etc2_signed_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_signed_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_signed_rg11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst[2];
@@ -1419,8 +1410,7 @@ fetch_etc2_signed_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
static void
fetch_etc2_rgb8_punchthrough_alpha1(const GLubyte *map,
- const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
+ GLint rowStride, GLint i, GLint j,
GLfloat *texel)
{
struct etc2_block block;
@@ -1441,10 +1431,8 @@ fetch_etc2_rgb8_punchthrough_alpha1(const GLubyte *map,
static void
fetch_etc2_srgb8_punchthrough_alpha1(const GLubyte *map,
- const GLuint imageOffsets[],
GLint rowStride,
- GLint i, GLint j, GLint k,
- GLfloat *texel)
+ GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[4];
diff --git a/mesalib/src/mesa/main/texcompress_etc.h b/mesalib/src/mesa/main/texcompress_etc.h
index 503d0388a..9da0fb337 100644
--- a/mesalib/src/mesa/main/texcompress_etc.h
+++ b/mesalib/src/mesa/main/texcompress_etc.h
@@ -26,7 +26,6 @@
#include <inttypes.h>
#include "glheader.h"
-#include "mfeatures.h"
#include "texcompress.h"
#include "texstore.h"
diff --git a/mesalib/src/mesa/main/texcompress_fxt1.c b/mesalib/src/mesa/main/texcompress_fxt1.c
index f7254f92e..93bd19a9a 100644
--- a/mesalib/src/mesa/main/texcompress_fxt1.c
+++ b/mesalib/src/mesa/main/texcompress_fxt1.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -34,7 +35,6 @@
#include "colormac.h"
#include "image.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mipmap.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
@@ -1616,8 +1616,8 @@ fxt1_decode_1 (const void *texture, GLint stride, /* in pixels */
static void
-fetch_rgb_fxt1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_rgb_fxt1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte rgba[4];
fxt1_decode_1(map, rowStride, i, j, rgba);
@@ -1629,8 +1629,8 @@ fetch_rgb_fxt1(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_rgba_fxt1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_rgba_fxt1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte rgba[4];
fxt1_decode_1(map, rowStride, i, j, rgba);
diff --git a/mesalib/src/mesa/main/texcompress_fxt1.h b/mesalib/src/mesa/main/texcompress_fxt1.h
index 5949df90f..3a00de5ac 100644
--- a/mesalib/src/mesa/main/texcompress_fxt1.h
+++ b/mesalib/src/mesa/main/texcompress_fxt1.h
@@ -17,16 +17,16 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef TEXCOMPRESS_FXT1_H
#define TEXCOMPRESS_FXT1_H
#include "glheader.h"
-#include "mfeatures.h"
#include "texstore.h"
diff --git a/mesalib/src/mesa/main/texcompress_rgtc.c b/mesalib/src/mesa/main/texcompress_rgtc.c
index 1f8de25ec..7afd8ffa7 100644
--- a/mesalib/src/mesa/main/texcompress_rgtc.c
+++ b/mesalib/src/mesa/main/texcompress_rgtc.c
@@ -38,7 +38,6 @@
#include "colormac.h"
#include "image.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mipmap.h"
#include "texcompress.h"
#include "texcompress_rgtc.h"
@@ -319,12 +318,11 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
static void
-fetch_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_red_rgtc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- unsigned_fetch_texel_rgtc(rowStride, map + sliceOffset, i, j, &red, 1);
+ unsigned_fetch_texel_rgtc(rowStride, map, i, j, &red, 1);
texel[RCOMP] = UBYTE_TO_FLOAT(red);
texel[GCOMP] = 0.0;
texel[BCOMP] = 0.0;
@@ -332,12 +330,11 @@ fetch_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_l_latc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- unsigned_fetch_texel_rgtc(rowStride, map + sliceOffset, i, j, &red, 1);
+ unsigned_fetch_texel_rgtc(rowStride, map, i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = UBYTE_TO_FLOAT(red);
@@ -345,13 +342,11 @@ fetch_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_signed_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_red_rgtc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- signed_fetch_texel_rgtc(rowStride, (const GLbyte *) map + sliceOffset,
+ signed_fetch_texel_rgtc(rowStride, (const GLbyte *) map,
i, j, &red, 1);
texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
texel[GCOMP] = 0.0;
@@ -360,13 +355,11 @@ fetch_signed_red_rgtc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_signed_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_l_latc1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red;
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
- signed_fetch_texel_rgtc(rowStride, (GLbyte *) map + sliceOffset,
+ signed_fetch_texel_rgtc(rowStride, (GLbyte *) map,
i, j, &red, 1);
texel[RCOMP] =
texel[GCOMP] =
@@ -375,17 +368,15 @@ fetch_signed_l_latc1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_rg_rgtc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset,
+ map,
i, j, &red, 2);
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset + 8,
+ map + 8,
i, j, &green, 2);
texel[RCOMP] = UBYTE_TO_FLOAT(red);
texel[GCOMP] = UBYTE_TO_FLOAT(green);
@@ -394,17 +385,15 @@ fetch_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_la_latc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_la_latc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLubyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset,
+ map,
i, j, &red, 2);
unsigned_fetch_texel_rgtc(rowStride,
- map + sliceOffset + 8,
+ map + 8,
i, j, &green, 2);
texel[RCOMP] =
texel[GCOMP] =
@@ -414,17 +403,15 @@ fetch_la_latc2(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_signed_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_rg_rgtc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset,
+ (GLbyte *) map,
i, j, &red, 2);
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset + 8,
+ (GLbyte *) map + 8,
i, j, &green, 2);
texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
texel[GCOMP] = BYTE_TO_FLOAT_TEX(green);
@@ -434,17 +421,15 @@ fetch_signed_rg_rgtc2(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_signed_la_latc2(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_signed_la_latc2(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
GLbyte red, green;
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset,
+ (GLbyte *) map,
i, j, &red, 2);
signed_fetch_texel_rgtc(rowStride,
- (GLbyte *) map + sliceOffset + 8,
+ (GLbyte *) map + 8,
i, j, &green, 2);
texel[RCOMP] =
texel[GCOMP] =
diff --git a/mesalib/src/mesa/main/texcompress_rgtc.h b/mesalib/src/mesa/main/texcompress_rgtc.h
index 9e1cce438..98638f022 100644
--- a/mesalib/src/mesa/main/texcompress_rgtc.h
+++ b/mesalib/src/mesa/main/texcompress_rgtc.h
@@ -25,7 +25,6 @@
#define TEXCOMPRESS_RGTC_H
#include "glheader.h"
-#include "mfeatures.h"
#include "texstore.h"
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c
index 4a81ad803..41ea33613 100644
--- a/mesalib/src/mesa/main/texcompress_s3tc.c
+++ b/mesalib/src/mesa/main/texcompress_s3tc.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -39,7 +40,6 @@
#include "dlopen.h"
#include "image.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "texcompress.h"
#include "texcompress_s3tc.h"
@@ -345,13 +345,12 @@ problem(const char *func)
static void
-fetch_rgb_dxt1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_rgb_dxt1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgb_dxt1) {
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
GLubyte tex[4];
- fetch_ext_rgb_dxt1(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgb_dxt1(rowStride, map, i, j, tex);
texel[RCOMP] = UBYTE_TO_FLOAT(tex[RCOMP]);
texel[GCOMP] = UBYTE_TO_FLOAT(tex[GCOMP]);
texel[BCOMP] = UBYTE_TO_FLOAT(tex[BCOMP]);
@@ -363,13 +362,12 @@ fetch_rgb_dxt1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_rgba_dxt1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_rgba_dxt1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgba_dxt1) {
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
GLubyte tex[4];
- fetch_ext_rgba_dxt1(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgba_dxt1(rowStride, map, i, j, tex);
texel[RCOMP] = UBYTE_TO_FLOAT(tex[RCOMP]);
texel[GCOMP] = UBYTE_TO_FLOAT(tex[GCOMP]);
texel[BCOMP] = UBYTE_TO_FLOAT(tex[BCOMP]);
@@ -381,13 +379,12 @@ fetch_rgba_dxt1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_rgba_dxt3(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_rgba_dxt3(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgba_dxt3) {
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
GLubyte tex[4];
- fetch_ext_rgba_dxt3(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgba_dxt3(rowStride, map, i, j, tex);
texel[RCOMP] = UBYTE_TO_FLOAT(tex[RCOMP]);
texel[GCOMP] = UBYTE_TO_FLOAT(tex[GCOMP]);
texel[BCOMP] = UBYTE_TO_FLOAT(tex[BCOMP]);
@@ -399,13 +396,12 @@ fetch_rgba_dxt3(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_rgba_dxt5(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_rgba_dxt5(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgba_dxt5) {
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
GLubyte tex[4];
- fetch_ext_rgba_dxt5(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgba_dxt5(rowStride, map, i, j, tex);
texel[RCOMP] = UBYTE_TO_FLOAT(tex[RCOMP]);
texel[GCOMP] = UBYTE_TO_FLOAT(tex[GCOMP]);
texel[BCOMP] = UBYTE_TO_FLOAT(tex[BCOMP]);
@@ -418,13 +414,12 @@ fetch_rgba_dxt5(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_srgb_dxt1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_srgb_dxt1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgb_dxt1) {
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
GLubyte tex[4];
- fetch_ext_rgb_dxt1(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgb_dxt1(rowStride, map, i, j, tex);
texel[RCOMP] = _mesa_nonlinear_to_linear(tex[RCOMP]);
texel[GCOMP] = _mesa_nonlinear_to_linear(tex[GCOMP]);
texel[BCOMP] = _mesa_nonlinear_to_linear(tex[BCOMP]);
@@ -436,13 +431,12 @@ fetch_srgb_dxt1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_srgba_dxt1(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_srgba_dxt1(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgba_dxt1) {
- GLuint sliceOffset = k ? imageOffsets[k] / 2 : 0;
GLubyte tex[4];
- fetch_ext_rgba_dxt1(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgba_dxt1(rowStride, map, i, j, tex);
texel[RCOMP] = _mesa_nonlinear_to_linear(tex[RCOMP]);
texel[GCOMP] = _mesa_nonlinear_to_linear(tex[GCOMP]);
texel[BCOMP] = _mesa_nonlinear_to_linear(tex[BCOMP]);
@@ -454,13 +448,12 @@ fetch_srgba_dxt1(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_srgba_dxt3(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_srgba_dxt3(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgba_dxt3) {
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
GLubyte tex[4];
- fetch_ext_rgba_dxt3(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgba_dxt3(rowStride, map, i, j, tex);
texel[RCOMP] = _mesa_nonlinear_to_linear(tex[RCOMP]);
texel[GCOMP] = _mesa_nonlinear_to_linear(tex[GCOMP]);
texel[BCOMP] = _mesa_nonlinear_to_linear(tex[BCOMP]);
@@ -472,13 +465,12 @@ fetch_srgba_dxt3(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_srgba_dxt5(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k, GLfloat *texel)
+fetch_srgba_dxt5(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
if (fetch_ext_rgba_dxt5) {
- GLuint sliceOffset = k ? imageOffsets[k] : 0;
GLubyte tex[4];
- fetch_ext_rgba_dxt5(rowStride, map + sliceOffset, i, j, tex);
+ fetch_ext_rgba_dxt5(rowStride, map, i, j, tex);
texel[RCOMP] = _mesa_nonlinear_to_linear(tex[RCOMP]);
texel[GCOMP] = _mesa_nonlinear_to_linear(tex[GCOMP]);
texel[BCOMP] = _mesa_nonlinear_to_linear(tex[BCOMP]);
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.h b/mesalib/src/mesa/main/texcompress_s3tc.h
index d9ef68992..fbc04c234 100644
--- a/mesalib/src/mesa/main/texcompress_s3tc.h
+++ b/mesalib/src/mesa/main/texcompress_s3tc.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef TEXCOMPRESS_S3TC_H
@@ -27,7 +28,6 @@
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
#include "texstore.h"
#include "texcompress.h"
diff --git a/mesalib/src/mesa/main/texenv.c b/mesalib/src/mesa/main/texenv.c
index 2979e6706..84731ddda 100644
--- a/mesalib/src/mesa/main/texenv.c
+++ b/mesalib/src/mesa/main/texenv.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -879,7 +880,7 @@ _mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param )
}
else if (pname == GL_BUMP_NUM_TEX_UNITS_ATI) {
GLint count = 0;
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+ for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) {
if (ctx->Const.SupportedBumpUnits & (1 << i)) {
count++;
}
@@ -887,7 +888,7 @@ _mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param )
*param = count;
}
else if (pname == GL_BUMP_TEX_UNITS_ATI) {
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+ for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) {
if (ctx->Const.SupportedBumpUnits & (1 << i)) {
*param++ = i + GL_TEXTURE0;
}
@@ -928,7 +929,7 @@ _mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param )
}
else if (pname == GL_BUMP_NUM_TEX_UNITS_ATI) {
GLint count = 0;
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+ for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) {
if (ctx->Const.SupportedBumpUnits & (1 << i)) {
count++;
}
@@ -936,7 +937,7 @@ _mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param )
*param = (GLfloat) count;
}
else if (pname == GL_BUMP_TEX_UNITS_ATI) {
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+ for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) {
if (ctx->Const.SupportedBumpUnits & (1 << i)) {
*param++ = (GLfloat) (i + GL_TEXTURE0);
}
diff --git a/mesalib/src/mesa/main/texenv.h b/mesalib/src/mesa/main/texenv.h
index 1e9c5faed..5f71e276d 100644
--- a/mesalib/src/mesa/main/texenv.h
+++ b/mesalib/src/mesa/main/texenv.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texenvprogram.h b/mesalib/src/mesa/main/texenvprogram.h
index 3d9cb8546..aff404be0 100644
--- a/mesalib/src/mesa/main/texenvprogram.h
+++ b/mesalib/src/mesa/main/texenvprogram.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c
index 6f22a4f5f..495a2048d 100644
--- a/mesalib/src/mesa/main/texformat.c
+++ b/mesalib/src/mesa/main/texformat.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -35,7 +36,6 @@
#include "context.h"
#include "enums.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "texcompress.h"
#include "texformat.h"
@@ -50,250 +50,229 @@
* internalFormat parameters passed to glTexImage().
*
* \param ctx the GL context.
+ * \param target a texture target (GL_TEXTURE_x)
* \param internalFormat user's prefered internal texture format.
* \param format incoming image pixel format.
* \param type incoming image data type.
*
- * \return a pointer to a gl_texture_format object which describes the
- * choosen texture format, or NULL on failure.
- *
- * This is called via dd_function_table::ChooseTextureFormat. Hardware drivers
- * will typically override this function with a specialized version.
+ * \return the closest gl_format for the given format/type arguments
+ *
+ * This is called via dd_function_table::ChooseTextureFormat. Hardware
+ * drivers may override this function with a specialized version.
*/
gl_format
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
GLint internalFormat, GLenum format, GLenum type)
{
(void) format;
- (void) type;
switch (internalFormat) {
- /* shallow RGBA formats */
- case 4:
- case GL_RGBA:
- if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
- } else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
- } else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
- }
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
-
- case GL_RGBA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
- case GL_RGB5_A1:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
- break;
- case GL_RGBA2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
- break;
- case GL_RGBA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
- break;
-
- /* deep RGBA formats */
- case GL_RGB10_A2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
- case GL_RGBA12:
- case GL_RGBA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
-
- /* shallow RGB formats */
- case 3:
- case GL_RGB:
- if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
- }
- /* fallthrough */
- case GL_RGB8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
- case GL_R3_G3_B2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
- case GL_RGB4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
- break;
- case GL_RGB5:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
- break;
-
- /* deep RGB formats */
- case GL_RGB10:
- case GL_RGB12:
- case GL_RGB16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
-
- /* Alpha formats */
- case GL_ALPHA:
- case GL_ALPHA4:
- case GL_ALPHA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
- break;
-
- case GL_ALPHA12:
- case GL_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_A16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
- break;
-
- /* Luminance formats */
- case 1:
- case GL_LUMINANCE:
- case GL_LUMINANCE4:
- case GL_LUMINANCE8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
- break;
-
- case GL_LUMINANCE12:
- case GL_LUMINANCE16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
- break;
+ /* shallow RGBA formats */
+ case 4:
+ case GL_RGBA:
+ if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ } else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ } else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ }
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+
+ case GL_RGBA8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+ case GL_RGB5_A1:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ break;
+ case GL_RGBA2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ break;
+ case GL_RGBA4:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ break;
+
+ /* deep RGBA formats */
+ case GL_RGB10_A2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+ case GL_RGBA12:
+ case GL_RGBA16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+
+ /* shallow RGB formats */
+ case 3:
+ case GL_RGB:
+ if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ }
+ /* fallthrough */
+ case GL_RGB8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+ case GL_R3_G3_B2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+ case GL_RGB4:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ break;
+ case GL_RGB5:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ break;
+
+ /* deep RGB formats */
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+
+ /* Alpha formats */
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ break;
+
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ break;
+
+ /* Luminance formats */
+ case 1:
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ break;
+
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ break;
/* Luminance/Alpha formats */
- case GL_LUMINANCE4_ALPHA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL44);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
- break;
-
- case 2:
- case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE6_ALPHA2:
- case GL_LUMINANCE8_ALPHA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
- break;
-
- case GL_LUMINANCE12_ALPHA4:
- case GL_LUMINANCE12_ALPHA12:
- case GL_LUMINANCE16_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
- break;
-
- case GL_INTENSITY:
- case GL_INTENSITY4:
- case GL_INTENSITY8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
- break;
-
- case GL_INTENSITY12:
- case GL_INTENSITY16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_I16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
- break;
-
- default:
- ; /* fallthrough */
- }
-
- if (ctx->Extensions.ARB_depth_texture) {
- switch (internalFormat) {
- case GL_DEPTH_COMPONENT:
- case GL_DEPTH_COMPONENT24:
- case GL_DEPTH_COMPONENT32:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
- break;
- case GL_DEPTH_COMPONENT16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
- default:
- ; /* fallthrough */
+ case GL_LUMINANCE4_ALPHA4:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL44);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
+
+ case 2:
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
+
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
+
+ case GL_INTENSITY:
+ case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ break;
+
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ break;
+
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ break;
+ case GL_DEPTH_COMPONENT16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ break;
+
+ case GL_COMPRESSED_ALPHA_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ break;
+ case GL_COMPRESSED_LUMINANCE_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ break;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
+ case GL_COMPRESSED_INTENSITY_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ break;
+ case GL_COMPRESSED_RGB_ARB:
+ /* We don't use texture compression for 1D and 1D array textures.
+ * For 1D textures, compressions doesn't buy us much.
+ * For 1D ARRAY textures, there's complicated issues with updating
+ * sub-regions on non-block boundaries with glCopyTexSubImage, among
+ * other issues. FWIW, the GL_EXT_texture_array extension prohibits
+ * 1D ARRAY textures in S3TC format.
+ */
+ if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ ctx->Extensions.ANGLE_texture_compression_dxt)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
+ if (ctx->Extensions.TDFX_texture_compression_FXT1)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
}
- }
-
- switch (internalFormat) {
- case GL_COMPRESSED_ALPHA_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
- break;
- case GL_COMPRESSED_LUMINANCE_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
- break;
- case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
- break;
- case GL_COMPRESSED_INTENSITY_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
- break;
- case GL_COMPRESSED_RGB_ARB:
- /* We don't use texture compression for 1D and 1D array textures.
- * For 1D textures, compressions doesn't buy us much.
- * For 1D ARRAY textures, there's complicated issues with updating
- * sub-regions on non-block boundaries with glCopyTexSubImage, among
- * other issues. FWIW, the GL_EXT_texture_array extension prohibits
- * 1D ARRAY textures in S3TC format.
- */
- if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
- if (ctx->Extensions.EXT_texture_compression_s3tc ||
- ctx->Extensions.ANGLE_texture_compression_dxt)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
- if (ctx->Extensions.TDFX_texture_compression_FXT1)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
- }
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
- case GL_COMPRESSED_RGBA_ARB:
- /* We don't use texture compression for 1D and 1D array textures. */
- if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
- if (ctx->Extensions.EXT_texture_compression_s3tc ||
- ctx->Extensions.ANGLE_texture_compression_dxt)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
- if (ctx->Extensions.TDFX_texture_compression_FXT1)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
- }
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
- default:
- ; /* fallthrough */
- }
-
- if (ctx->Extensions.ARB_ES2_compatibility) {
- switch (internalFormat) {
- case GL_RGB565:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
- break;
- default:
- ; /* fallthrough */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+ case GL_COMPRESSED_RGBA_ARB:
+ /* We don't use texture compression for 1D and 1D array textures. */
+ if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ ctx->Extensions.ANGLE_texture_compression_dxt)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
+ if (ctx->Extensions.TDFX_texture_compression_FXT1)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
}
- }
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
- if (ctx->Extensions.MESA_ycbcr_texture) {
- if (internalFormat == GL_YCBCR_MESA) {
- if (type == GL_UNSIGNED_SHORT_8_8_MESA)
- RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR);
- else
- RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR_REV);
- }
- }
+ case GL_RGB565:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ break;
+
+ case GL_YCBCR_MESA:
+ if (type == GL_UNSIGNED_SHORT_8_8_MESA)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR);
+ else
+ RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR_REV);
+ break;
/* For non-generic compressed format we assert two things:
*
@@ -303,7 +282,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
* 2. The driver only enables the extension if it supports all of the
* formats that are part of that extension.
*/
- switch (internalFormat) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
return MESA_FORMAT_RGB_FXT1;
case GL_COMPRESSED_RGBA_FXT1_3DFX:
@@ -368,560 +346,474 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
return MESA_FORMAT_SRGBA_DXT3;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
return MESA_FORMAT_SRGBA_DXT5;
- default:
- ; /* fallthrough */
- }
-
- if (ctx->Extensions.ARB_texture_float) {
- switch (internalFormat) {
- case GL_ALPHA16F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_ALPHA32F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- case GL_LUMINANCE16F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_LUMINANCE32F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- case GL_LUMINANCE_ALPHA16F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_LUMINANCE_ALPHA32F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- case GL_INTENSITY16F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_INTENSITY32F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- case GL_RGB16F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_RGB32F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- case GL_RGBA16F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_RGBA32F_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.EXT_texture_shared_exponent) {
- switch (internalFormat) {
- case GL_RGB9_E5:
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT]);
- return MESA_FORMAT_RGB9_E5_FLOAT;
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.EXT_packed_float) {
- switch (internalFormat) {
- case GL_R11F_G11F_B10F:
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11_G11_B10_FLOAT]);
- return MESA_FORMAT_R11_G11_B10_FLOAT;
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.EXT_packed_depth_stencil) {
- switch (internalFormat) {
- case GL_DEPTH_STENCIL_EXT:
- case GL_DEPTH24_STENCIL8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_S8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
- break;
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.ARB_depth_buffer_float) {
- switch (internalFormat) {
- case GL_DEPTH_COMPONENT32F:
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT]);
- return MESA_FORMAT_Z32_FLOAT;
- case GL_DEPTH32F_STENCIL8:
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8]);
- return MESA_FORMAT_Z32_FLOAT_X24S8;
- default:
- ; /* fallthrough */
- }
- }
- if (ctx->Extensions.ATI_envmap_bumpmap) {
- switch (internalFormat) {
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_DUDV8);
- break;
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.EXT_texture_snorm) {
- switch (internalFormat) {
- case GL_RED_SNORM:
- case GL_R8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R8);
- break;
- case GL_RG_SNORM:
- case GL_RG8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RG88_REV);
- break;
- case GL_RGB_SNORM:
- case GL_RGB8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
- /* FALLTHROUGH */
- case GL_RGBA_SNORM:
- case GL_RGBA8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_ALPHA_SNORM:
- case GL_ALPHA8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_A8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_LUMINANCE_SNORM:
- case GL_LUMINANCE8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_LUMINANCE_ALPHA_SNORM:
- case GL_LUMINANCE8_ALPHA8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_AL88);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_INTENSITY_SNORM:
- case GL_INTENSITY8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_I8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_R16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R16);
- break;
- case GL_RG16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_GR1616);
- break;
- case GL_RGB16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGB_16);
- /* FALLTHROUGH */
- case GL_RGBA16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_ALPHA16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_A16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_LUMINANCE16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L16);
- /* FALLTHROUGH */
- case GL_LUMINANCE16_ALPHA16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_AL1616);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- case GL_INTENSITY16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_I16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
- break;
- default:
- ; /* fall-through */
- }
- }
-
- if (ctx->Extensions.EXT_texture_sRGB) {
- switch (internalFormat) {
- case GL_SRGB_EXT:
- case GL_SRGB8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_SRGB_ALPHA_EXT:
- case GL_SRGB8_ALPHA8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_SLUMINANCE_EXT:
- case GL_SLUMINANCE8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SL8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_SLUMINANCE_ALPHA_EXT:
- case GL_SLUMINANCE8_ALPHA8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_COMPRESSED_SLUMINANCE_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SL8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_COMPRESSED_SRGB_EXT:
- if (ctx->Extensions.EXT_texture_compression_s3tc)
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- case GL_COMPRESSED_SRGB_ALPHA_EXT:
- if (ctx->Extensions.EXT_texture_compression_s3tc)
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
- break;
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.EXT_texture_integer) {
- switch (internalFormat) {
- case GL_ALPHA8UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
- break;
- case GL_ALPHA16UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
- break;
- case GL_ALPHA32UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
- break;
- case GL_ALPHA8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
- break;
- case GL_ALPHA16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
- break;
- case GL_ALPHA32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
- break;
- case GL_LUMINANCE8UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
- break;
- case GL_LUMINANCE16UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
- break;
- case GL_LUMINANCE32UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
- break;
- case GL_LUMINANCE8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
- break;
- case GL_LUMINANCE16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
- break;
- case GL_LUMINANCE32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
- break;
- case GL_LUMINANCE_ALPHA8UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
- break;
- case GL_LUMINANCE_ALPHA16UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
- break;
- case GL_LUMINANCE_ALPHA32UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
- break;
- case GL_LUMINANCE_ALPHA8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
- break;
- case GL_LUMINANCE_ALPHA16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
- break;
- case GL_LUMINANCE_ALPHA32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
- break;
- case GL_INTENSITY8UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
- break;
- case GL_INTENSITY16UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
- break;
- case GL_INTENSITY32UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
- break;
- case GL_INTENSITY8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
- break;
- case GL_INTENSITY16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
- break;
- case GL_INTENSITY32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
- break;
- }
- }
-
- if (ctx->Version >= 30 ||
- ctx->Extensions.EXT_texture_integer) {
- switch (internalFormat) {
- case GL_RGB8UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
- break;
- case GL_RGB16UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
- break;
- case GL_RGB32UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
- break;
- case GL_RGB8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
- break;
- case GL_RGB16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
- break;
- case GL_RGB32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
- break;
- case GL_RGBA8UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
- break;
- case GL_RGBA16UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
- break;
- case GL_RGBA32UI_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
- break;
- case GL_RGBA8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
- break;
- case GL_RGBA16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
- break;
- case GL_RGBA32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
- break;
- }
- }
-
- if (ctx->Extensions.ARB_texture_rg) {
- switch (internalFormat) {
- case GL_R8:
- case GL_RED:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
- break;
-
- case GL_COMPRESSED_RED:
- if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RED_RGTC1);
- RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
- break;
-
- case GL_R16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R16);
- break;
-
- case GL_RG:
- case GL_RG8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
- break;
-
- case GL_COMPRESSED_RG:
- if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
- break;
-
- case GL_RG16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616);
- break;
-
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.ARB_texture_float) {
- switch (internalFormat) {
- case GL_R16F:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_R32F:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
- case GL_RG16F:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- break;
- case GL_RG32F:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
- break;
-
- default:
- ; /* fallthrough */
- }
- }
-
- if (ctx->Version >= 30 ||
- (ctx->Extensions.ARB_texture_rg &&
- ctx->Extensions.EXT_texture_integer)) {
- switch (internalFormat) {
- case GL_R8UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT8);
- break;
- case GL_RG8UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT8);
- break;
- case GL_R16UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT16);
- break;
- case GL_RG16UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT16);
- break;
- case GL_R32UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT32);
- break;
- case GL_RG32UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT32);
- break;
- case GL_R8I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT8);
- break;
- case GL_RG8I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT8);
- break;
- case GL_R16I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT16);
- break;
- case GL_RG16I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT16);
- break;
- case GL_R32I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT32);
- break;
- case GL_RG32I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT32);
- break;
- default:
- break;
- }
- }
-
- if (ctx->Extensions.ARB_texture_rgb10_a2ui) {
- switch (internalFormat) {
- case GL_RGB10_A2UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UINT);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ABGR2101010_UINT);
- break;
- default:
- break;
- }
- }
- /* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0).
- */
- if (_mesa_is_gles(ctx)) {
- switch (internalFormat) {
- case GL_BGRA:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
- break;
-
- default:
- ; /* fallthrough */
- }
+ case GL_ALPHA16F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_ALPHA32F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+ case GL_LUMINANCE16F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_LUMINANCE32F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+ case GL_LUMINANCE_ALPHA16F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_LUMINANCE_ALPHA32F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+ case GL_INTENSITY16F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_INTENSITY32F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+ case GL_RGB16F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_FLOAT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_RGB32F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_FLOAT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+ case GL_RGBA16F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_RGBA32F_ARB:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+
+ case GL_RGB9_E5:
+ /* GL_EXT_texture_shared_exponent -- just one format to support */
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT]);
+ return MESA_FORMAT_RGB9_E5_FLOAT;
+
+ case GL_R11F_G11F_B10F:
+ /* GL_EXT_texture_packed_float -- just one format to support */
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11_G11_B10_FLOAT]);
+ return MESA_FORMAT_R11_G11_B10_FLOAT;
+
+ case GL_DEPTH_STENCIL_EXT:
+ case GL_DEPTH24_STENCIL8_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_S8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ break;
+
+ case GL_DEPTH_COMPONENT32F:
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT]);
+ return MESA_FORMAT_Z32_FLOAT;
+ case GL_DEPTH32F_STENCIL8:
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8]);
+ return MESA_FORMAT_Z32_FLOAT_X24S8;
+
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_DUDV8);
+ break;
+
+ case GL_RED_SNORM:
+ case GL_R8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R8);
+ break;
+ case GL_RG_SNORM:
+ case GL_RG8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RG88_REV);
+ break;
+ case GL_RGB_SNORM:
+ case GL_RGB8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
+ /* FALLTHROUGH */
+ case GL_RGBA_SNORM:
+ case GL_RGBA8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_ALPHA_SNORM:
+ case GL_ALPHA8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_A8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_LUMINANCE_SNORM:
+ case GL_LUMINANCE8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_LUMINANCE_ALPHA_SNORM:
+ case GL_LUMINANCE8_ALPHA8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_INTENSITY_SNORM:
+ case GL_INTENSITY8_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_I8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_R16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R16);
+ break;
+ case GL_RG16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_GR1616);
+ break;
+ case GL_RGB16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGB_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SNORM);
+ /* FALLTHROUGH */
+ case GL_RGBA16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_ALPHA16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_A16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_LUMINANCE16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L16);
+ /* FALLTHROUGH */
+ case GL_LUMINANCE16_ALPHA16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_AL1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+ case GL_INTENSITY16_SNORM:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_I16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
+
+ case GL_SRGB_EXT:
+ case GL_SRGB8_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_SRGB_ALPHA_EXT:
+ case GL_SRGB8_ALPHA8_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_SLUMINANCE_EXT:
+ case GL_SLUMINANCE8_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SL8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_SLUMINANCE_ALPHA_EXT:
+ case GL_SLUMINANCE8_ALPHA8_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_COMPRESSED_SLUMINANCE_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SL8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_COMPRESSED_SRGB_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+ case GL_COMPRESSED_SRGB_ALPHA_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
+
+ case GL_ALPHA8UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
+ case GL_ALPHA16UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
+ case GL_ALPHA32UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
+ case GL_ALPHA8I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
+ case GL_ALPHA16I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
+ case GL_ALPHA32I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
+ case GL_LUMINANCE8UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
+ case GL_LUMINANCE16UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
+ case GL_LUMINANCE32UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
+ case GL_LUMINANCE8I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
+ case GL_LUMINANCE16I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
+ case GL_LUMINANCE32I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
+ case GL_INTENSITY8UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
+ case GL_INTENSITY16UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
+ case GL_INTENSITY32UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
+ case GL_INTENSITY8I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
+ case GL_INTENSITY16I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
+ case GL_INTENSITY32I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
+
+ case GL_RGB8UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
+ case GL_RGB16UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
+ case GL_RGB32UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
+ case GL_RGB8I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_SINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
+ case GL_RGB16I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
+ case GL_RGB32I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_SINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
+ case GL_RGBA8UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
+ case GL_RGBA16UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
+ case GL_RGBA32UI_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
+ case GL_RGBA8I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
+ case GL_RGBA16I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
+ case GL_RGBA32I_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
+
+ case GL_R8:
+ case GL_RED:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
+ break;
+
+ case GL_COMPRESSED_RED:
+ if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RED_RGTC1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
+ break;
+
+ case GL_R16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R16);
+ break;
+
+ case GL_RG:
+ case GL_RG8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ break;
+
+ case GL_COMPRESSED_RG:
+ if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ break;
+
+ case GL_RG16:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616);
+ break;
+
+ case GL_R16F:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_R32F:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+ case GL_RG16F:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
+ case GL_RG32F:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
+
+ case GL_R8UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT8);
+ break;
+ case GL_RG8UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT8);
+ break;
+ case GL_R16UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT16);
+ break;
+ case GL_RG16UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT16);
+ break;
+ case GL_R32UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT32);
+ break;
+ case GL_RG32UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT32);
+ break;
+ case GL_R8I:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT8);
+ break;
+ case GL_RG8I:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT8);
+ break;
+ case GL_R16I:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT16);
+ break;
+ case GL_RG16I:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT16);
+ break;
+ case GL_R32I:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT32);
+ break;
+ case GL_RG32I:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT32);
+ break;
+
+ case GL_RGB10_A2UI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ABGR2101010_UINT);
+ break;
+
+ case GL_BGRA:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
}
_mesa_problem(ctx, "unexpected format %s in _mesa_choose_tex_format()",
@@ -929,3 +821,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
return MESA_FORMAT_NONE;
}
+GLboolean
+_mesa_tex_target_is_array(GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
diff --git a/mesalib/src/mesa/main/texformat.h b/mesalib/src/mesa/main/texformat.h
index 71af9ca22..d6ff54173 100644
--- a/mesalib/src/mesa/main/texformat.h
+++ b/mesalib/src/mesa/main/texformat.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef TEXFORMAT_H
@@ -35,5 +36,7 @@ extern gl_format
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
GLint internalFormat, GLenum format, GLenum type);
+extern GLboolean
+_mesa_tex_target_is_array(GLenum target);
#endif
diff --git a/mesalib/src/mesa/main/texgen.c b/mesalib/src/mesa/main/texgen.c
index e45cfe176..81ad224a0 100644
--- a/mesalib/src/mesa/main/texgen.c
+++ b/mesalib/src/mesa/main/texgen.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -34,7 +35,6 @@
#include "main/context.h"
#include "main/enums.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/texgen.h"
#include "main/texstate.h"
#include "math/m_matrix.h"
diff --git a/mesalib/src/mesa/main/texgen.h b/mesalib/src/mesa/main/texgen.h
index 97563a0f0..3292258dc 100644
--- a/mesalib/src/mesa/main/texgen.h
+++ b/mesalib/src/mesa/main/texgen.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c
index 74b09ef2c..70319c52b 100644
--- a/mesalib/src/mesa/main/texgetimage.c
+++ b/mesalib/src/mesa/main/texgetimage.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -37,7 +38,6 @@
#include "format_unpack.h"
#include "glformats.h"
#include "image.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "pack.h"
#include "pbo.h"
diff --git a/mesalib/src/mesa/main/texgetimage.h b/mesalib/src/mesa/main/texgetimage.h
index c9277fc91..32c33fed4 100644
--- a/mesalib/src/mesa/main/texgetimage.h
+++ b/mesalib/src/mesa/main/texgetimage.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 784b389a7..9aaa63f13 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -39,7 +40,6 @@
#include "image.h"
#include "imports.h"
#include "macros.h"
-#include "mfeatures.h"
#include "multisample.h"
#include "state.h"
#include "texcompress.h"
@@ -180,7 +180,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
default:
; /* fallthrough */
}
-
+
if (ctx->Extensions.TDFX_texture_compression_FXT1) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
@@ -315,15 +315,17 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
case GL_COMPRESSED_SRGB_EXT:
- case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
return GL_RGB;
+ case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
+ return ctx->Extensions.EXT_texture_compression_s3tc ? GL_RGB : -1;
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
case GL_COMPRESSED_SRGB_ALPHA_EXT:
+ return GL_RGBA;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- return GL_RGBA;
+ return ctx->Extensions.EXT_texture_compression_s3tc ? GL_RGBA : -1;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
@@ -613,7 +615,7 @@ set_tex_image(struct gl_texture_object *tObj,
/**
* Allocate a texture image structure.
- *
+ *
* Called via ctx->Driver.NewTextureImage() unless overriden by a device
* driver.
*
@@ -868,7 +870,7 @@ _mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
if (!texObj)
return NULL;
-
+
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (!texImage) {
texImage = ctx->Driver.NewTextureImage(ctx);
@@ -974,7 +976,7 @@ get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level)
*
* \param ctx GL context.
* \param target texture target.
- *
+ *
* \return the maximum number of allowed mipmap levels for the given
* texture target, or zero if passed a bad target.
*
@@ -1536,13 +1538,13 @@ error_check_subtexture_dimensions(struct gl_context *ctx,
}
/* check xoffset and width */
- if (xoffset < -destImage->Border) {
+ if (xoffset < - (GLint) destImage->Border) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s%dD(xoffset)",
function, dims);
return GL_TRUE;
}
- if (xoffset + subWidth > destImage->Width) {
+ if (xoffset + subWidth > (GLint) destImage->Width) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s%dD(xoffset+width)",
function, dims);
return GL_TRUE;
@@ -1556,7 +1558,7 @@ error_check_subtexture_dimensions(struct gl_context *ctx,
function, dims);
return GL_TRUE;
}
- if (yoffset + subHeight > destImage->Height) {
+ if (yoffset + subHeight > (GLint) destImage->Height) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s%dD(yoffset+height)",
function, dims);
return GL_TRUE;
@@ -1594,18 +1596,24 @@ error_check_subtexture_dimensions(struct gl_context *ctx,
return GL_TRUE;
}
- /* size must be multiple of bw by bh or equal to whole texture size */
- if ((subWidth % bw != 0) && subWidth != destImage->Width) {
+ /* The size must be a multiple of bw x bh, or we must be using a
+ * offset+size that exactly hits the edge of the image. This
+ * is important for small mipmap levels (1x1, 2x1, etc) and for
+ * NPOT textures.
+ */
+ if ((subWidth % bw != 0) &&
+ (xoffset + subWidth != (GLint) destImage->Width)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s%dD(width = %d)", function, dims, subWidth);
return GL_TRUE;
}
- if ((subHeight % bh != 0) && subHeight != destImage->Height) {
+ if ((subHeight % bh != 0) &&
+ (yoffset + subHeight != (GLint) destImage->Height)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s%dD(height = %d)", function, dims, subHeight);
return GL_TRUE;
- }
+ }
}
return GL_FALSE;
@@ -1705,7 +1713,7 @@ target_can_be_compressed(const struct gl_context *ctx, GLenum target,
return ctx->Extensions.ARB_texture_cube_map_array;
default:
return GL_FALSE;
- }
+ }
}
@@ -1867,7 +1875,7 @@ compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth,
/**
* Test the glTexImage[123]D() parameters for errors.
- *
+ *
* \param ctx GL context.
* \param dimensions texture image dimensions (must be 1, 2 or 3).
* \param target texture target given by the user (already validated).
@@ -1879,7 +1887,7 @@ compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth,
* \param height image height given by the user.
* \param depth image depth given by the user.
* \param border image border given by the user.
- *
+ *
* \return GL_TRUE if a error is found, GL_FALSE otherwise
*
* Verifies each of the parameters against the constants specified in
@@ -1949,12 +1957,12 @@ texture_error_check( struct gl_context *ctx,
internalFormat);
} else {
if (format != internalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexImage%dD(format = %s, internalFormat = %s)",
- dimensions,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(internalFormat));
- return GL_TRUE;
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexImage%dD(format = %s, internalFormat = %s)",
+ dimensions,
+ _mesa_lookup_enum_by_nr(format),
+ _mesa_lookup_enum_by_nr(internalFormat));
+ return GL_TRUE;
}
err = _mesa_es_error_check_format_and_type(format, type, dimensions);
@@ -2258,7 +2266,7 @@ error:
/**
* Test glTexSubImage[123]D() parameters for errors.
- *
+ *
* \param ctx GL context.
* \param dimensions texture image dimensions (must be 1, 2 or 3).
* \param target texture target given by the user (already validated)
@@ -2271,7 +2279,7 @@ error:
* \param width image width given by the user.
* \param height image height given by the user.
* \param depth image depth given by the user.
- *
+ *
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
@@ -2376,7 +2384,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
/**
* Test glCopyTexImage[12]D() parameters for errors.
- *
+ *
* \param ctx GL context.
* \param dimensions texture image dimensions (must be 1, 2 or 3).
* \param target texture target given by the user.
@@ -2385,9 +2393,9 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
* \param width image width given by the user.
* \param height image height given by the user.
* \param border texture border.
- *
+ *
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
- *
+ *
* Verifies each of the parameters against the constants specified in
* __struct gl_contextRec::Const and the supported extensions, and according
* to the OpenGL specification.
@@ -2407,7 +2415,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%uD(target=%s)",
dimensions, _mesa_lookup_enum_by_nr(target));
return GL_TRUE;
- }
+ }
/* level check */
if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) {
@@ -2753,9 +2761,8 @@ check_rtt_cb(GLuint key, void *data, void *userData)
att->Texture == texObj &&
att->TextureLevel == level &&
att->CubeMapFace == face) {
- ASSERT(_mesa_get_attachment_teximage(att));
- /* Tell driver about the new renderbuffer texture */
- ctx->Driver.RenderTexture(ctx, ctx->DrawBuffer, att);
+ _mesa_update_texture_renderbuffer(ctx, ctx->DrawBuffer, att);
+ ASSERT(att->Renderbuffer->TexImage);
/* Mark fb status as indeterminate to force re-validation */
fb->_Status = 0;
}
@@ -2920,6 +2927,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
return f;
}
+
/**
* Adjust pixel unpack params and image dimensions to strip off the
* one-pixel texture border.
@@ -2957,7 +2965,9 @@ strip_texture_border(GLenum target,
*height = *height - 2; /* reduce the height by two border pixels */
}
- if (*depth >= 3 && target != GL_TEXTURE_2D_ARRAY && target != GL_TEXTURE_CUBE_MAP_ARRAY) {
+ if (*depth >= 3 &&
+ target != GL_TEXTURE_2D_ARRAY &&
+ target != GL_TEXTURE_CUBE_MAP_ARRAY) {
unpackNew->SkipImages++; /* skip the border */
*depth = *depth - 2; /* reduce the depth by two border pixels */
}
@@ -3309,7 +3319,7 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
_mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",
dims, _mesa_lookup_enum_by_nr(target));
return;
- }
+ }
if (ctx->NewState & _NEW_PIXEL)
_mesa_update_state(ctx);
@@ -3694,7 +3704,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
targetOK = GL_FALSE;
break;
}
-
+
if (!targetOK) {
_mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage%uD(target)",
dims);
@@ -4027,6 +4037,7 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
}
}
+
static gl_format
validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
{
@@ -4098,6 +4109,7 @@ texbufferrange(struct gl_context *ctx, GLenum target, GLenum internalFormat,
_mesa_unlock_texture(ctx, texObj);
}
+
/** GL_ARB_texture_buffer_object */
void GLAPIENTRY
_mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
@@ -4124,6 +4136,7 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
texbufferrange(ctx, target, internalFormat, bufObj, 0, buffer ? -1 : 0);
}
+
/** GL_ARB_texture_buffer_range */
void GLAPIENTRY
_mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
@@ -4164,6 +4177,7 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
texbufferrange(ctx, target, internalFormat, bufObj, offset, size);
}
+
static GLboolean
is_renderable_texture_format(struct gl_context *ctx, GLenum internalformat)
{
@@ -4174,6 +4188,7 @@ is_renderable_texture_format(struct gl_context *ctx, GLenum internalformat)
return baseFormat != 0 && baseFormat != GL_STENCIL_INDEX;
}
+
/** GL_ARB_texture_multisample */
static GLboolean
check_multisample_target(GLuint dims, GLenum target)
@@ -4192,6 +4207,7 @@ check_multisample_target(GLuint dims, GLenum target)
}
}
+
static void
teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
GLint internalformat, GLsizei width, GLsizei height,
@@ -4309,7 +4325,6 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
texImage->FixedSampleLocations = fixedsamplelocations;
if (width > 0 && height > 0 && depth > 0) {
-
if (!ctx->Driver.AllocTextureStorage(ctx, texObj, 1,
width, height, depth)) {
/* tidy up the texture image state. strictly speaking,
@@ -4326,15 +4341,18 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
}
}
+
void GLAPIENTRY
_mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
GLint internalformat, GLsizei width,
GLsizei height, GLboolean fixedsamplelocations)
{
teximagemultisample(2, target, samples, internalformat,
- width, height, 1, fixedsamplelocations, GL_FALSE, "glTexImage2DMultisample");
+ width, height, 1, fixedsamplelocations, GL_FALSE,
+ "glTexImage2DMultisample");
}
+
void GLAPIENTRY
_mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
GLint internalformat, GLsizei width,
@@ -4342,7 +4360,8 @@ _mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
GLboolean fixedsamplelocations)
{
teximagemultisample(3, target, samples, internalformat,
- width, height, depth, fixedsamplelocations, GL_FALSE, "glTexImage3DMultisample");
+ width, height, depth, fixedsamplelocations, GL_FALSE,
+ "glTexImage3DMultisample");
}
@@ -4352,9 +4371,11 @@ _mesa_TexStorage2DMultisample(GLenum target, GLsizei samples,
GLsizei height, GLboolean fixedsamplelocations)
{
teximagemultisample(2, target, samples, internalformat,
- width, height, 1, fixedsamplelocations, GL_TRUE, "glTexStorage2DMultisample");
+ width, height, 1, fixedsamplelocations, GL_TRUE,
+ "glTexStorage2DMultisample");
}
+
void GLAPIENTRY
_mesa_TexStorage3DMultisample(GLenum target, GLsizei samples,
GLenum internalformat, GLsizei width,
@@ -4362,5 +4383,6 @@ _mesa_TexStorage3DMultisample(GLenum target, GLsizei samples,
GLboolean fixedsamplelocations)
{
teximagemultisample(3, target, samples, internalformat,
- width, height, depth, fixedsamplelocations, GL_TRUE, "glTexStorage3DMultisample");
+ width, height, depth, fixedsamplelocations, GL_TRUE,
+ "glTexStorage3DMultisample");
}
diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h
index bb295c7a7..a0d71c9f8 100644
--- a/mesalib/src/mesa/main/teximage.h
+++ b/mesalib/src/mesa/main/teximage.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 66377c8c0..27c040301 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -22,13 +22,13 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "mfeatures.h"
#include "bufferobj.h"
#include "colortab.h"
#include "context.h"
diff --git a/mesalib/src/mesa/main/texobj.h b/mesalib/src/mesa/main/texobj.h
index f86b4ebcd..622defa71 100644
--- a/mesalib/src/mesa/main/texobj.h
+++ b/mesalib/src/mesa/main/texobj.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c
index f60eb204e..b5a1e58e2 100644
--- a/mesalib/src/mesa/main/texparam.c
+++ b/mesalib/src/mesa/main/texparam.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -38,7 +39,6 @@
#include "main/formats.h"
#include "main/glformats.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/state.h"
#include "main/texcompress.h"
diff --git a/mesalib/src/mesa/main/texparam.h b/mesalib/src/mesa/main/texparam.h
index 19b4116c0..32cefad22 100644
--- a/mesalib/src/mesa/main/texparam.h
+++ b/mesalib/src/mesa/main/texparam.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index d44cd7cf9..afc9337ff 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -29,7 +30,6 @@
*/
#include "glheader.h"
-#include "mfeatures.h"
#include "bufferobj.h"
#include "colormac.h"
#include "colortab.h"
diff --git a/mesalib/src/mesa/main/texstate.h b/mesalib/src/mesa/main/texstate.h
index 7abf9101e..5c7fa8a31 100644
--- a/mesalib/src/mesa/main/texstate.h
+++ b/mesalib/src/mesa/main/texstate.h
@@ -22,9 +22,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/texstorage.c b/mesalib/src/mesa/main/texstorage.c
index 6309b5716..0a53726fe 100644
--- a/mesalib/src/mesa/main/texstorage.c
+++ b/mesalib/src/mesa/main/texstorage.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -34,7 +35,6 @@
#include "enums.h"
#include "imports.h"
#include "macros.h"
-#include "mfeatures.h"
#include "teximage.h"
#include "texobj.h"
#include "texstorage.h"
@@ -245,6 +245,36 @@ _mesa_is_legal_tex_storage_format(struct gl_context *ctx, GLenum internalformat)
}
}
+/**
+ * Default ctx->Driver.AllocTextureStorage() handler.
+ *
+ * The driver can override this with a more specific implementation if it
+ * desires, but this can be used to get the texture images allocated using the
+ * usual texture image handling code. The immutability of
+ * GL_ARB_texture_storage texture layouts is handled by texObj->Immutable
+ * checks at glTexImage* time.
+ */
+GLboolean
+_mesa_alloc_texture_storage(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLsizei levels, GLsizei width,
+ GLsizei height, GLsizei depth)
+{
+ const int numFaces = _mesa_num_tex_faces(texObj->Target);
+ int face;
+ int level;
+
+ for (face = 0; face < numFaces; face++) {
+ for (level = 0; level < levels; level++) {
+ struct gl_texture_image *const texImage = texObj->Image[face][level];
+ if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage))
+ return GL_FALSE;
+ }
+ }
+
+ return GL_TRUE;
+}
+
/**
* Do error checking for calls to glTexStorage1/2/3D().
diff --git a/mesalib/src/mesa/main/texstorage.h b/mesalib/src/mesa/main/texstorage.h
index 9f172e1ca..ec4f71374 100644
--- a/mesalib/src/mesa/main/texstorage.h
+++ b/mesalib/src/mesa/main/texstorage.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -60,5 +61,10 @@ _mesa_TextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels,
extern GLboolean
_mesa_is_legal_tex_storage_format(struct gl_context *ctx, GLenum internalformat);
+extern GLboolean
+_mesa_alloc_texture_storage(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLsizei levels, GLsizei width,
+ GLsizei height, GLsizei depth);
#endif /* TEXSTORAGE_H */
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c
index 0e13d8903..daa024c80 100644
--- a/mesalib/src/mesa/main/texstore.c
+++ b/mesalib/src/mesa/main/texstore.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
@@ -58,7 +59,6 @@
#include "image.h"
#include "macros.h"
#include "mipmap.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "pack.h"
#include "pbo.h"
diff --git a/mesalib/src/mesa/main/texstore.h b/mesalib/src/mesa/main/texstore.h
index 75f24bd45..f3d4a7d05 100644
--- a/mesalib/src/mesa/main/texstore.h
+++ b/mesalib/src/mesa/main/texstore.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c
index fd4718d87..03f188300 100644
--- a/mesalib/src/mesa/main/transformfeedback.c
+++ b/mesalib/src/mesa/main/transformfeedback.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -35,7 +36,6 @@
#include "context.h"
#include "hash.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "transformfeedback.h"
#include "shaderapi.h"
@@ -385,7 +385,9 @@ _mesa_BeginTransformFeedback(GLenum mode)
}
}
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback;
+
obj->Active = GL_TRUE;
ctx->TransformFeedback.Mode = mode;
@@ -422,7 +424,9 @@ _mesa_EndTransformFeedback(void)
return;
}
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback;
+
ctx->TransformFeedback.CurrentObject->Active = GL_FALSE;
ctx->TransformFeedback.CurrentObject->Paused = GL_FALSE;
ctx->TransformFeedback.CurrentObject->EndedAnytime = GL_TRUE;
@@ -443,7 +447,7 @@ bind_buffer_range(struct gl_context *ctx, GLuint index,
struct gl_transform_feedback_object *obj =
ctx->TransformFeedback.CurrentObject;
- /* Note: no need to FLUSH_VERTICES or flag _NEW_TRANSFORM_FEEDBACK, because
+ /* Note: no need to FLUSH_VERTICES or flag NewTransformFeedback, because
* transform feedback buffers can't be changed while transform feedback is
* active.
*/
@@ -687,7 +691,7 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
shProg->TransformFeedback.BufferMode = bufferMode;
- /* No need to set _NEW_TRANSFORM_FEEDBACK (or invoke FLUSH_VERTICES) since
+ /* No need to invoke FLUSH_VERTICES or flag NewTransformFeedback since
* the varyings won't be used until shader link time.
*/
}
@@ -898,7 +902,9 @@ _mesa_PauseTransformFeedback(void)
return;
}
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback;
+
obj->Paused = GL_TRUE;
assert(ctx->Driver.PauseTransformFeedback);
@@ -924,7 +930,9 @@ _mesa_ResumeTransformFeedback(void)
return;
}
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback;
+
obj->Paused = GL_FALSE;
assert(ctx->Driver.ResumeTransformFeedback);
diff --git a/mesalib/src/mesa/main/transformfeedback.h b/mesalib/src/mesa/main/transformfeedback.h
index c128746b3..f6dc2a7b3 100644
--- a/mesalib/src/mesa/main/transformfeedback.h
+++ b/mesalib/src/mesa/main/transformfeedback.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -28,7 +29,6 @@
#include <stdbool.h>
#include "compiler.h"
#include "glheader.h"
-#include "mfeatures.h"
#include "mtypes.h"
struct _glapi_table;
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index b8335fe6b..ec3104936 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
@@ -777,24 +778,24 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
if (uni->type->is_sampler()) {
int i;
- for (i = 0; i < count; i++) {
- shProg->SamplerUnits[uni->sampler + offset + i] =
- ((unsigned *) values)[i];
- }
-
bool flushed = false;
for (i = 0; i < MESA_SHADER_TYPES; i++) {
struct gl_shader *const sh = shProg->_LinkedShaders[i];
+ int j;
- /* If the shader stage doesn't use any samplers, don't bother
- * checking if any samplers have changed.
+ /* If the shader stage doesn't use the sampler uniform, skip this.
*/
- if (sh == NULL || sh->active_samplers == 0)
+ if (sh == NULL || !uni->sampler[i].active)
continue;
+ for (j = 0; j < count; j++) {
+ sh->SamplerUnits[uni->sampler[i].index + offset + j] =
+ ((unsigned *) values)[j];
+ }
+
struct gl_program *const prog = sh->Program;
- assert(sizeof(prog->SamplerUnits) == sizeof(shProg->SamplerUnits));
+ assert(sizeof(prog->SamplerUnits) == sizeof(sh->SamplerUnits));
/* Determine if any of the samplers used by this shader stage have
* been modified.
@@ -802,7 +803,7 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
bool changed = false;
for (unsigned j = 0; j < Elements(prog->SamplerUnits); j++) {
if ((sh->active_samplers & (1U << j)) != 0
- && (prog->SamplerUnits[j] != shProg->SamplerUnits[j])) {
+ && (prog->SamplerUnits[j] != sh->SamplerUnits[j])) {
changed = true;
break;
}
@@ -815,8 +816,8 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
}
memcpy(prog->SamplerUnits,
- shProg->SamplerUnits,
- sizeof(shProg->SamplerUnits));
+ sh->SamplerUnits,
+ sizeof(sh->SamplerUnits));
_mesa_update_shader_textures_used(shProg, prog);
if (ctx->Driver.SamplerUniformChange)
diff --git a/mesalib/src/mesa/main/uniforms.c b/mesalib/src/mesa/main/uniforms.c
index d902407a0..6d79df683 100644
--- a/mesalib/src/mesa/main/uniforms.c
+++ b/mesalib/src/mesa/main/uniforms.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -44,6 +45,7 @@
#include "main/enums.h"
#include "ir_uniform.h"
#include "glsl_types.h"
+#include "program/program.h"
/**
* Update the vertex/fragment program's TexturesUsed array.
@@ -65,14 +67,18 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
struct gl_program *prog)
{
GLuint s;
+ struct gl_shader *shader =
+ shProg->_LinkedShaders[_mesa_program_target_to_index(prog->Target)];
- memcpy(prog->SamplerUnits, shProg->SamplerUnits, sizeof(prog->SamplerUnits));
+ assert(shader);
+
+ memcpy(prog->SamplerUnits, shader->SamplerUnits, sizeof(prog->SamplerUnits));
memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
for (s = 0; s < MAX_SAMPLERS; s++) {
if (prog->SamplersUsed & (1 << s)) {
- GLuint unit = shProg->SamplerUnits[s];
- GLuint tgt = shProg->SamplerTargets[s];
+ GLuint unit = shader->SamplerUnits[s];
+ GLuint tgt = shader->SamplerTargets[s];
assert(unit < Elements(prog->TexturesUsed));
assert(tgt < NUM_TEXTURE_TARGETS);
prog->TexturesUsed[unit] |= (1 << tgt);
@@ -630,7 +636,9 @@ _mesa_UniformBlockBinding(GLuint program,
uniformBlockBinding) {
int i;
- FLUSH_VERTICES(ctx, _NEW_BUFFER_OBJECT);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewUniformBuffer;
+
shProg->UniformBlocks[uniformBlockIndex].Binding = uniformBlockBinding;
for (i = 0; i < MESA_SHADER_TYPES; i++) {
diff --git a/mesalib/src/mesa/main/uniforms.h b/mesalib/src/mesa/main/uniforms.h
index a12ad9b36..5ebd5e49a 100644
--- a/mesalib/src/mesa/main/uniforms.h
+++ b/mesalib/src/mesa/main/uniforms.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index 213b845c9..db0945e30 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,7 +34,6 @@
#include "hash.h"
#include "image.h"
#include "macros.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "varray.h"
#include "arrayobj.h"
@@ -269,7 +269,6 @@ update_array(struct gl_context *ctx,
ctx->Array.ArrayBufferObj);
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.ArrayObj->NewArrays |= VERT_BIT(attrib);
}
@@ -521,7 +520,6 @@ _mesa_EnableVertexAttribArray(GLuint index)
FLUSH_VERTICES(ctx, _NEW_ARRAY);
arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_TRUE;
arrayObj->_Enabled |= VERT_BIT_GENERIC(index);
- arrayObj->NewArrays |= VERT_BIT_GENERIC(index);
}
}
@@ -547,7 +545,6 @@ _mesa_DisableVertexAttribArray(GLuint index)
FLUSH_VERTICES(ctx, _NEW_ARRAY);
arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_FALSE;
arrayObj->_Enabled &= ~VERT_BIT_GENERIC(index);
- arrayObj->NewArrays |= VERT_BIT_GENERIC(index);
}
}
@@ -1112,10 +1109,9 @@ _mesa_PrimitiveRestartIndex(GLuint index)
return;
}
- ctx->Array.RestartIndex = index;
- if (ctx->Array.PrimitiveRestart && ctx->Array._RestartIndex != index) {
+ if (ctx->Array.RestartIndex != index) {
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
- ctx->Array._RestartIndex = index;
+ ctx->Array.RestartIndex = index;
}
}
@@ -1148,11 +1144,34 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor)
if (array->InstanceDivisor != divisor) {
FLUSH_VERTICES(ctx, _NEW_ARRAY);
array->InstanceDivisor = divisor;
- ctx->Array.ArrayObj->NewArrays |= VERT_BIT(VERT_ATTRIB_GENERIC(index));
}
}
+unsigned
+_mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type)
+{
+ /* From the OpenGL 4.3 core specification, page 302:
+ * "If both PRIMITIVE_RESTART and PRIMITIVE_RESTART_FIXED_INDEX are
+ * enabled, the index value determined by PRIMITIVE_RESTART_FIXED_INDEX
+ * is used."
+ */
+ if (ctx->Array.PrimitiveRestartFixedIndex) {
+ switch (ib_type) {
+ case GL_UNSIGNED_BYTE:
+ return 0xff;
+ case GL_UNSIGNED_SHORT:
+ return 0xffff;
+ case GL_UNSIGNED_INT:
+ return 0xffffffff;
+ default:
+ assert(!"_mesa_primitive_restart_index: Invalid index buffer type.");
+ }
+ }
+
+ return ctx->Array.RestartIndex;
+}
+
/**
* Copy one client vertex array to another.
diff --git a/mesalib/src/mesa/main/varray.h b/mesalib/src/mesa/main/varray.h
index 904fa1bea..a178bc13c 100644
--- a/mesalib/src/mesa/main/varray.h
+++ b/mesalib/src/mesa/main/varray.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -29,7 +30,6 @@
#include "glheader.h"
-#include "mfeatures.h"
struct gl_client_array;
struct gl_context;
@@ -248,6 +248,8 @@ _mesa_PrimitiveRestartIndex(GLuint index);
extern void GLAPIENTRY
_mesa_VertexAttribDivisor(GLuint index, GLuint divisor);
+extern unsigned
+_mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type);
extern void
_mesa_copy_client_array(struct gl_context *ctx,
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c
index c4ae2a6ce..d954fb3cc 100644
--- a/mesalib/src/mesa/main/version.c
+++ b/mesalib/src/mesa/main/version.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -259,7 +260,7 @@ compute_version(struct gl_context *ctx)
ctx->Extensions.EXT_texture_snorm &&
ctx->Extensions.NV_primitive_restart &&
ctx->Extensions.NV_texture_rectangle &&
- ctx->Const.MaxVertexTextureImageUnits >= 16);
+ ctx->Const.VertexProgram.MaxTextureImageUnits >= 16);
const GLboolean ver_3_2 = (ver_3_1 &&
ctx->Const.GLSLVersion >= 150 &&
ctx->Extensions.ARB_depth_clamp &&
diff --git a/mesalib/src/mesa/main/version.h b/mesalib/src/mesa/main/version.h
index b4f8d8590..19d321d9a 100644
--- a/mesalib/src/mesa/main/version.h
+++ b/mesalib/src/mesa/main/version.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/viewport.c b/mesalib/src/mesa/main/viewport.c
index 92f04cdf1..c4d7f1e07 100644
--- a/mesalib/src/mesa/main/viewport.c
+++ b/mesalib/src/mesa/main/viewport.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/viewport.h b/mesalib/src/mesa/main/viewport.h
index db4507bea..77d8cbbfd 100644
--- a/mesalib/src/mesa/main/viewport.h
+++ b/mesalib/src/mesa/main/viewport.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c
index 8669c4007..8864b8cf5 100644
--- a/mesalib/src/mesa/main/vtxfmt.c
+++ b/mesalib/src/mesa/main/vtxfmt.c
@@ -17,20 +17,19 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
- * Gareth Hughes
+ * Keith Whitwell <keith@tungstengraphics.com> Gareth Hughes
*/
#include "glheader.h"
#include "api_arrayelt.h"
#include "context.h"
#include "imports.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "vtxfmt.h"
#include "eval.h"
@@ -40,12 +39,12 @@
/**
- * Use the per-vertex functions found in <vfmt> to initialize the given
- * API dispatch table.
+ * Copy the functions found in the GLvertexformat object into the
+ * dispatch table.
*/
static void
install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
- const GLvertexformat *vfmt, bool beginend)
+ const GLvertexformat *vfmt)
{
assert(ctx->Version > 0);
@@ -62,7 +61,7 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
}
if (ctx->API == API_OPENGL_COMPAT) {
- _mesa_install_eval_vtxfmt(tab, vfmt, beginend);
+ _mesa_install_eval_vtxfmt(tab, vfmt);
}
if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
@@ -111,40 +110,6 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
SET_Begin(tab, vfmt->Begin);
SET_End(tab, vfmt->End);
SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV);
-
- SET_Rectf(tab, vfmt->Rectf);
- }
-
- SET_DrawArrays(tab, vfmt->DrawArrays);
- SET_DrawElements(tab, vfmt->DrawElements);
- if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
- SET_DrawRangeElements(tab, vfmt->DrawRangeElements);
- }
-
- SET_MultiDrawElementsEXT(tab, vfmt->MultiDrawElementsEXT);
-
- if (_mesa_is_desktop_gl(ctx)) {
- SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex);
- SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex);
- SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex);
- SET_DrawArraysInstancedBaseInstance(tab, vfmt->DrawArraysInstancedBaseInstance);
- SET_DrawElementsInstancedBaseInstance(tab, vfmt->DrawElementsInstancedBaseInstance);
- SET_DrawElementsInstancedBaseVertex(tab, vfmt->DrawElementsInstancedBaseVertex);
- SET_DrawElementsInstancedBaseVertexBaseInstance(tab, vfmt->DrawElementsInstancedBaseVertexBaseInstance);
- }
-
- if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
- SET_DrawArraysInstancedARB(tab, vfmt->DrawArraysInstanced);
- SET_DrawElementsInstancedARB(tab, vfmt->DrawElementsInstanced);
- }
-
- if (_mesa_is_desktop_gl(ctx)) {
- SET_DrawTransformFeedback(tab, vfmt->DrawTransformFeedback);
- SET_DrawTransformFeedbackStream(tab, vfmt->DrawTransformFeedbackStream);
- SET_DrawTransformFeedbackInstanced(tab,
- vfmt->DrawTransformFeedbackInstanced);
- SET_DrawTransformFeedbackStreamInstanced(tab,
- vfmt->DrawTransformFeedbackStreamInstanced);
}
/* Originally for GL_NV_vertex_program, this is also used by dlist.c */
@@ -251,9 +216,9 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
void
_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
- install_vtxfmt(ctx, ctx->Exec, vfmt, false);
+ install_vtxfmt(ctx, ctx->Exec, vfmt);
if (ctx->BeginEnd)
- install_vtxfmt(ctx, ctx->BeginEnd, vfmt, true);
+ install_vtxfmt(ctx, ctx->BeginEnd, vfmt);
}
@@ -265,7 +230,7 @@ void
_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
if (_mesa_is_desktop_gl(ctx))
- install_vtxfmt(ctx, ctx->Save, vfmt, false);
+ install_vtxfmt(ctx, ctx->Save, vfmt);
}
diff --git a/mesalib/src/mesa/main/vtxfmt.h b/mesalib/src/mesa/main/vtxfmt.h
index 16ffb6ffd..4301c4277 100644
--- a/mesalib/src/mesa/main/vtxfmt.h
+++ b/mesalib/src/mesa/main/vtxfmt.h
@@ -24,9 +24,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -34,7 +35,6 @@
#define _VTXFMT_H_
#include "compiler.h"
-#include "mfeatures.h"
#include "mtypes.h"
extern void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
diff --git a/mesalib/src/mesa/math/m_clip_tmp.h b/mesalib/src/mesa/math/m_clip_tmp.h
index 2e3096405..c6b8bd83d 100644
--- a/mesalib/src/mesa/math/m_clip_tmp.h
+++ b/mesalib/src/mesa/math/m_clip_tmp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_copy_tmp.h b/mesalib/src/mesa/math/m_copy_tmp.h
index 07ab1f7b2..98fbd0730 100644
--- a/mesalib/src/mesa/math/m_copy_tmp.h
+++ b/mesalib/src/mesa/math/m_copy_tmp.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_debug.h b/mesalib/src/mesa/math/m_debug.h
index 6476b6de2..a1e8cee9d 100644
--- a/mesalib/src/mesa/math/m_debug.h
+++ b/mesalib/src/mesa/math/m_debug.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
diff --git a/mesalib/src/mesa/math/m_debug_clip.c b/mesalib/src/mesa/math/m_debug_clip.c
index bbad6ef02..08b9eff06 100644
--- a/mesalib/src/mesa/math/m_debug_clip.c
+++ b/mesalib/src/mesa/math/m_debug_clip.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
diff --git a/mesalib/src/mesa/math/m_debug_norm.c b/mesalib/src/mesa/math/m_debug_norm.c
index 00efa336d..588cd90a3 100644
--- a/mesalib/src/mesa/math/m_debug_norm.c
+++ b/mesalib/src/mesa/math/m_debug_norm.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
diff --git a/mesalib/src/mesa/math/m_debug_util.h b/mesalib/src/mesa/math/m_debug_util.h
index ed11c849e..f356588ae 100644
--- a/mesalib/src/mesa/math/m_debug_util.h
+++ b/mesalib/src/mesa/math/m_debug_util.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
diff --git a/mesalib/src/mesa/math/m_debug_xform.c b/mesalib/src/mesa/math/m_debug_xform.c
index 2cceaa2f8..cea382da6 100644
--- a/mesalib/src/mesa/math/m_debug_xform.c
+++ b/mesalib/src/mesa/math/m_debug_xform.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_dotprod_tmp.h b/mesalib/src/mesa/math/m_dotprod_tmp.h
index 03e65af6c..6f530cfc4 100644
--- a/mesalib/src/mesa/math/m_dotprod_tmp.h
+++ b/mesalib/src/mesa/math/m_dotprod_tmp.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_eval.c b/mesalib/src/mesa/math/m_eval.c
index d324673c5..7e8a81d13 100644
--- a/mesalib/src/mesa/math/m_eval.c
+++ b/mesalib/src/mesa/math/m_eval.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/math/m_eval.h b/mesalib/src/mesa/math/m_eval.h
index d73ecaafb..cc1d1894c 100644
--- a/mesalib/src/mesa/math/m_eval.h
+++ b/mesalib/src/mesa/math/m_eval.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _M_EVAL_H
diff --git a/mesalib/src/mesa/math/m_matrix.c b/mesalib/src/mesa/math/m_matrix.c
index bcd2cae4a..4f64bd226 100644
--- a/mesalib/src/mesa/math/m_matrix.c
+++ b/mesalib/src/mesa/math/m_matrix.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/math/m_matrix.h b/mesalib/src/mesa/math/m_matrix.h
index 9f4ea2586..fabe15a94 100644
--- a/mesalib/src/mesa/math/m_matrix.h
+++ b/mesalib/src/mesa/math/m_matrix.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/math/m_norm_tmp.h b/mesalib/src/mesa/math/m_norm_tmp.h
index a20cb0501..24839e2b5 100644
--- a/mesalib/src/mesa/math/m_norm_tmp.h
+++ b/mesalib/src/mesa/math/m_norm_tmp.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_trans_tmp.h b/mesalib/src/mesa/math/m_trans_tmp.h
index 76ed83209..867384b78 100644
--- a/mesalib/src/mesa/math/m_trans_tmp.h
+++ b/mesalib/src/mesa/math/m_trans_tmp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/math/m_translate.c b/mesalib/src/mesa/math/m_translate.c
index 1da4de372..40c817463 100644
--- a/mesalib/src/mesa/math/m_translate.c
+++ b/mesalib/src/mesa/math/m_translate.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/math/m_translate.h b/mesalib/src/mesa/math/m_translate.h
index 8fec6f14b..eeb947f29 100644
--- a/mesalib/src/mesa/math/m_translate.h
+++ b/mesalib/src/mesa/math/m_translate.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/math/m_vector.c b/mesalib/src/mesa/math/m_vector.c
index 4bded31e0..0d38117e9 100644
--- a/mesalib/src/mesa/math/m_vector.c
+++ b/mesalib/src/mesa/math/m_vector.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_vector.h b/mesalib/src/mesa/math/m_vector.h
index 71281d575..143a30282 100644
--- a/mesalib/src/mesa/math/m_vector.h
+++ b/mesalib/src/mesa/math/m_vector.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/math/m_xform.c b/mesalib/src/mesa/math/m_xform.c
index 61ad3c753..f8c0993d4 100644
--- a/mesalib/src/mesa/math/m_xform.c
+++ b/mesalib/src/mesa/math/m_xform.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/math/m_xform.h b/mesalib/src/mesa/math/m_xform.h
index 280248883..7cec7f0ad 100644
--- a/mesalib/src/mesa/math/m_xform.h
+++ b/mesalib/src/mesa/math/m_xform.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/math/m_xform_tmp.h b/mesalib/src/mesa/math/m_xform_tmp.h
index e93837725..1f984887d 100644
--- a/mesalib/src/mesa/math/m_xform_tmp.h
+++ b/mesalib/src/mesa/math/m_xform_tmp.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/program/Android.mk b/mesalib/src/mesa/program/Android.mk
index 51362e0eb..3f974ea27 100644
--- a/mesalib/src/mesa/program/Android.mk
+++ b/mesalib/src/mesa/program/Android.mk
@@ -38,7 +38,7 @@ endef
# Import the following variables:
# PROGRAM_FILES
-include $(MESA_TOP)/src/mesa/sources.mak
+include $(MESA_TOP)/src/mesa/Makefile.sources
include $(CLEAR_VARS)
@@ -49,7 +49,7 @@ intermediates := $(call local-intermediates-dir)
MESA_ENABLED_APIS := ES1 ES2
-# TODO(chadv): In sources.mak, move these vars to a different list so we can
+# TODO(chadv): In Makefile.sources, move these vars to a different list so we can
# remove this kludge.
generated_sources_basenames := \
lex.yy.c \
diff --git a/mesalib/src/mesa/program/Makefile.am b/mesalib/src/mesa/program/Makefile.am
index 1b8204658..ab565e251 100644
--- a/mesalib/src/mesa/program/Makefile.am
+++ b/mesalib/src/mesa/program/Makefile.am
@@ -19,9 +19,9 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-include ../sources.mak
+include ../Makefile.sources
-AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
+AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
AM_CFLAGS = $(VISIBILITY_CFLAGS)
AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
libdricore_program_la_CFLAGS = $(NOVISIBILITY_CFLAGS)
diff --git a/mesalib/src/mesa/program/arbprogparse.c b/mesalib/src/mesa/program/arbprogparse.c
index 527bb936e..0ec87e356 100644
--- a/mesalib/src/mesa/program/arbprogparse.c
+++ b/mesalib/src/mesa/program/arbprogparse.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#define DEBUG_PARSING 0
diff --git a/mesalib/src/mesa/program/arbprogparse.h b/mesalib/src/mesa/program/arbprogparse.h
index 4c0c30072..04d304bc0 100644
--- a/mesalib/src/mesa/program/arbprogparse.h
+++ b/mesalib/src/mesa/program/arbprogparse.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index 14cf5baa7..a5b6699c2 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -1444,6 +1444,10 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_unop_unpack_half_2x16_split_x:
case ir_unop_unpack_half_2x16_split_y:
case ir_binop_pack_half_2x16_split:
+ case ir_unop_bitfield_reverse:
+ case ir_unop_bit_count:
+ case ir_unop_find_msb:
+ case ir_unop_find_lsb:
assert(!"not supported");
break;
case ir_binop_min:
@@ -1485,6 +1489,15 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
emit(ir, OPCODE_LRP, result_dst, op[2], op[1], op[0]);
break;
+ case ir_binop_vector_extract:
+ case ir_binop_bfm:
+ case ir_triop_bfi:
+ case ir_triop_bitfield_extract:
+ case ir_triop_vector_insert:
+ case ir_quadop_bitfield_insert:
+ assert(!"not supported");
+ break;
+
case ir_quadop_vector:
/* This operation should have already been handled.
*/
@@ -2391,8 +2404,10 @@ print_program(struct prog_instruction *mesa_instructions,
class add_uniform_to_shader : public program_resource_visitor {
public:
add_uniform_to_shader(struct gl_shader_program *shader_program,
- struct gl_program_parameter_list *params)
- : shader_program(shader_program), params(params), idx(-1)
+ struct gl_program_parameter_list *params,
+ gl_shader_type shader_type)
+ : shader_program(shader_program), params(params), idx(-1),
+ shader_type(shader_type)
{
/* empty */
}
@@ -2412,6 +2427,7 @@ private:
struct gl_shader_program *shader_program;
struct gl_program_parameter_list *params;
int idx;
+ gl_shader_type shader_type;
};
void
@@ -2458,8 +2474,11 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
struct gl_uniform_storage *storage =
&this->shader_program->UniformStorage[location];
+ assert(storage->sampler[shader_type].active);
+
for (unsigned int j = 0; j < size / 4; j++)
- params->ParameterValues[index + j][0].f = storage->sampler + j;
+ params->ParameterValues[index + j][0].f =
+ storage->sampler[shader_type].index + j;
}
}
@@ -2485,7 +2504,8 @@ _mesa_generate_parameters_list_for_uniforms(struct gl_shader_program
struct gl_program_parameter_list
*params)
{
- add_uniform_to_shader add(shader_program, params);
+ add_uniform_to_shader add(shader_program, params,
+ _mesa_shader_type_to_index(sh->Type));
foreach_list(node, sh->ir) {
ir_variable *var = ((ir_instruction *) node)->as_variable();
@@ -2757,6 +2777,8 @@ ir_to_mesa_visitor::copy_propagate(void)
/* If this is a copy, add it to the ACP. */
if (inst->op == OPCODE_MOV &&
inst->dst.file == PROGRAM_TEMPORARY &&
+ !(inst->dst.file == inst->src[0].file &&
+ inst->dst.index == inst->src[0].index) &&
!inst->dst.reladdr &&
!inst->saturate &&
!inst->src[0].reladdr &&
@@ -3012,7 +3034,8 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress;
progress = do_common_optimization(ir, true, true,
- options->MaxUnrollIterations)
+ options->MaxUnrollIterations,
+ options)
|| progress;
progress = lower_quadop_vector(ir, true) || progress;
@@ -3039,6 +3062,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|| progress;
progress = do_vec_index_to_cond_assign(ir) || progress;
+ progress = lower_vector_insert(ir, true) || progress;
} while (progress);
validate_ir_tree(ir);
@@ -3118,11 +3142,13 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
if (!state->error && !shader->ir->is_empty()) {
validate_ir_tree(shader->ir);
+ struct gl_shader_compiler_options *options =
+ &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)];
/* Do some optimization at compile time to reduce shader IR size
* and reduce later work if the same shader is linked multiple times
*/
- while (do_common_optimization(shader->ir, false, false, 32))
+ while (do_common_optimization(shader->ir, false, false, 32, options))
;
validate_ir_tree(shader->ir);
diff --git a/mesalib/src/mesa/program/prog_execute.c b/mesalib/src/mesa/program/prog_execute.c
index d205cdbbe..548077d39 100644
--- a/mesalib/src/mesa/program/prog_execute.c
+++ b/mesalib/src/mesa/program/prog_execute.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -240,37 +241,6 @@ fetch_vector4(const struct prog_src_register *source,
/**
- * Fetch a 4-element uint vector from the given source register.
- * Apply swizzling but not negation/abs.
- */
-static void
-fetch_vector4ui(const struct prog_src_register *source,
- const struct gl_program_machine *machine, GLuint result[4])
-{
- const GLuint *src = (GLuint *) get_src_register_pointer(source, machine);
- ASSERT(src);
-
- if (source->Swizzle == SWIZZLE_NOOP) {
- /* no swizzling */
- COPY_4V(result, src);
- }
- else {
- ASSERT(GET_SWZ(source->Swizzle, 0) <= 3);
- ASSERT(GET_SWZ(source->Swizzle, 1) <= 3);
- ASSERT(GET_SWZ(source->Swizzle, 2) <= 3);
- ASSERT(GET_SWZ(source->Swizzle, 3) <= 3);
- result[0] = src[GET_SWZ(source->Swizzle, 0)];
- result[1] = src[GET_SWZ(source->Swizzle, 1)];
- result[2] = src[GET_SWZ(source->Swizzle, 2)];
- result[3] = src[GET_SWZ(source->Swizzle, 3)];
- }
-
- /* Note: no Negate or Abs here */
-}
-
-
-
-/**
* Fetch the derivative with respect to X or Y for the given register.
* XXX this currently only works for fragment program input attribs.
*/
@@ -666,18 +636,6 @@ _mesa_execute_program(struct gl_context * ctx,
}
}
break;
- case OPCODE_AND: /* bitwise AND */
- {
- GLuint a[4], b[4], result[4];
- fetch_vector4ui(&inst->SrcReg[0], machine, a);
- fetch_vector4ui(&inst->SrcReg[1], machine, b);
- result[0] = a[0] & b[0];
- result[1] = a[1] & b[1];
- result[2] = a[2] & b[2];
- result[3] = a[3] & b[3];
- store_vector4ui(inst, machine, result);
- }
- break;
case OPCODE_ARL:
{
GLfloat t[4];
@@ -790,20 +748,6 @@ _mesa_execute_program(struct gl_context * ctx,
}
}
break;
- case OPCODE_DP2A:
- {
- GLfloat a[4], b[4], c, result[4];
- fetch_vector4(&inst->SrcReg[0], machine, a);
- fetch_vector4(&inst->SrcReg[1], machine, b);
- fetch_vector1(&inst->SrcReg[1], machine, &c);
- result[0] = result[1] = result[2] = result[3] = DOT2(a, b) + c;
- store_vector4(inst, machine, result);
- if (DEBUG_PROG) {
- printf("DP2A %g = (%g %g) . (%g %g) + %g\n",
- result[0], a[0], a[1], b[0], b[1], c);
- }
- }
- break;
case OPCODE_DP3:
{
GLfloat a[4], b[4], result[4];
@@ -1193,59 +1137,6 @@ _mesa_execute_program(struct gl_context * ctx,
break;
case OPCODE_NOP:
break;
- case OPCODE_NOT: /* bitwise NOT */
- {
- GLuint a[4], result[4];
- fetch_vector4ui(&inst->SrcReg[0], machine, a);
- result[0] = ~a[0];
- result[1] = ~a[1];
- result[2] = ~a[2];
- result[3] = ~a[3];
- store_vector4ui(inst, machine, result);
- }
- break;
- case OPCODE_NRM3: /* 3-component normalization */
- {
- GLfloat a[4], result[4];
- GLfloat tmp;
- fetch_vector4(&inst->SrcReg[0], machine, a);
- tmp = a[0] * a[0] + a[1] * a[1] + a[2] * a[2];
- if (tmp != 0.0F)
- tmp = INV_SQRTF(tmp);
- result[0] = tmp * a[0];
- result[1] = tmp * a[1];
- result[2] = tmp * a[2];
- result[3] = 0.0; /* undefined, but prevent valgrind warnings */
- store_vector4(inst, machine, result);
- }
- break;
- case OPCODE_NRM4: /* 4-component normalization */
- {
- GLfloat a[4], result[4];
- GLfloat tmp;
- fetch_vector4(&inst->SrcReg[0], machine, a);
- tmp = a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3];
- if (tmp != 0.0F)
- tmp = INV_SQRTF(tmp);
- result[0] = tmp * a[0];
- result[1] = tmp * a[1];
- result[2] = tmp * a[2];
- result[3] = tmp * a[3];
- store_vector4(inst, machine, result);
- }
- break;
- case OPCODE_OR: /* bitwise OR */
- {
- GLuint a[4], b[4], result[4];
- fetch_vector4ui(&inst->SrcReg[0], machine, a);
- fetch_vector4ui(&inst->SrcReg[1], machine, b);
- result[0] = a[0] | b[0];
- result[1] = a[1] | b[1];
- result[2] = a[2] | b[2];
- result[3] = a[3] | b[3];
- store_vector4ui(inst, machine, result);
- }
- break;
case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */
{
GLfloat a[4];
@@ -1747,18 +1638,6 @@ _mesa_execute_program(struct gl_context * ctx,
store_vector4(inst, machine, result);
}
break;
- case OPCODE_XOR: /* bitwise XOR */
- {
- GLuint a[4], b[4], result[4];
- fetch_vector4ui(&inst->SrcReg[0], machine, a);
- fetch_vector4ui(&inst->SrcReg[1], machine, b);
- result[0] = a[0] ^ b[0];
- result[1] = a[1] ^ b[1];
- result[2] = a[2] ^ b[2];
- result[3] = a[3] ^ b[3];
- store_vector4ui(inst, machine, result);
- }
- break;
case OPCODE_XPD: /* cross product */
{
GLfloat a[4], b[4], result[4];
@@ -1789,19 +1668,6 @@ _mesa_execute_program(struct gl_context * ctx,
store_vector4(inst, machine, result);
}
break;
- case OPCODE_PRINT:
- {
- if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) {
- GLfloat a[4];
- fetch_vector4(&inst->SrcReg[0], machine, a);
- printf("%s%g, %g, %g, %g\n", (const char *) inst->Data,
- a[0], a[1], a[2], a[3]);
- }
- else {
- printf("%s\n", (const char *) inst->Data);
- }
- }
- break;
case OPCODE_END:
return GL_TRUE;
default:
diff --git a/mesalib/src/mesa/program/prog_execute.h b/mesalib/src/mesa/program/prog_execute.h
index 1ae302c32..346b7b6b3 100644
--- a/mesalib/src/mesa/program/prog_execute.h
+++ b/mesalib/src/mesa/program/prog_execute.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef PROG_EXECUTE_H
diff --git a/mesalib/src/mesa/program/prog_instruction.c b/mesalib/src/mesa/program/prog_instruction.c
index ab93932ef..4329e6544 100644
--- a/mesalib/src/mesa/program/prog_instruction.c
+++ b/mesalib/src/mesa/program/prog_instruction.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -127,7 +128,6 @@ _mesa_free_instructions(struct prog_instruction *inst, GLuint count)
{
GLuint i;
for (i = 0; i < count; i++) {
- free(inst[i].Data);
free((char *)inst[i].Comment);
}
free(inst);
@@ -153,7 +153,6 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_NOP, "NOP", 0, 0 },
{ OPCODE_ABS, "ABS", 1, 1 },
{ OPCODE_ADD, "ADD", 2, 1 },
- { OPCODE_AND, "AND", 2, 1 },
{ OPCODE_ARL, "ARL", 1, 1 },
{ OPCODE_BGNLOOP,"BGNLOOP", 0, 0 },
{ OPCODE_BGNSUB, "BGNSUB", 0, 0 },
@@ -165,7 +164,6 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_DDX, "DDX", 1, 1 },
{ OPCODE_DDY, "DDY", 1, 1 },
{ OPCODE_DP2, "DP2", 2, 1 },
- { OPCODE_DP2A, "DP2A", 3, 1 },
{ OPCODE_DP3, "DP3", 2, 1 },
{ OPCODE_DP4, "DP4", 2, 1 },
{ OPCODE_DPH, "DPH", 2, 1 },
@@ -195,16 +193,11 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_NOISE2, "NOISE2", 1, 1 },
{ OPCODE_NOISE3, "NOISE3", 1, 1 },
{ OPCODE_NOISE4, "NOISE4", 1, 1 },
- { OPCODE_NOT, "NOT", 1, 1 },
- { OPCODE_NRM3, "NRM3", 1, 1 },
- { OPCODE_NRM4, "NRM4", 1, 1 },
- { OPCODE_OR, "OR", 2, 1 },
{ OPCODE_PK2H, "PK2H", 1, 1 },
{ OPCODE_PK2US, "PK2US", 1, 1 },
{ OPCODE_PK4B, "PK4B", 1, 1 },
{ OPCODE_PK4UB, "PK4UB", 1, 1 },
{ OPCODE_POW, "POW", 2, 1 },
- { OPCODE_PRINT, "PRINT", 1, 0 },
{ OPCODE_RCP, "RCP", 1, 1 },
{ OPCODE_RET, "RET", 0, 0 },
{ OPCODE_RFL, "RFL", 1, 1 },
@@ -234,7 +227,6 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_UP4B, "UP4B", 1, 1 },
{ OPCODE_UP4UB, "UP4UB", 1, 1 },
{ OPCODE_X2D, "X2D", 3, 1 },
- { OPCODE_XOR, "XOR", 2, 1 },
{ OPCODE_XPD, "XPD", 2, 1 }
};
diff --git a/mesalib/src/mesa/program/prog_instruction.h b/mesalib/src/mesa/program/prog_instruction.h
index a7bba75f1..160b1d079 100644
--- a/mesalib/src/mesa/program/prog_instruction.h
+++ b/mesalib/src/mesa/program/prog_instruction.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -147,7 +148,6 @@ typedef enum prog_opcode {
OPCODE_NOP = 0, /* X */
OPCODE_ABS, /* X X 1.1 X */
OPCODE_ADD, /* X X X X X */
- OPCODE_AND, /* */
OPCODE_ARL, /* X X X */
OPCODE_BGNLOOP, /* opt */
OPCODE_BGNSUB, /* opt */
@@ -159,7 +159,6 @@ typedef enum prog_opcode {
OPCODE_DDX, /* X X */
OPCODE_DDY, /* X X */
OPCODE_DP2, /* 2 X */
- OPCODE_DP2A, /* 2 */
OPCODE_DP3, /* X X X X X */
OPCODE_DP4, /* X X X X X */
OPCODE_DPH, /* X X 1.1 */
@@ -189,16 +188,11 @@ typedef enum prog_opcode {
OPCODE_NOISE2, /* X */
OPCODE_NOISE3, /* X */
OPCODE_NOISE4, /* X */
- OPCODE_NOT, /* */
- OPCODE_NRM3, /* */
- OPCODE_NRM4, /* */
- OPCODE_OR, /* */
OPCODE_PK2H, /* X */
OPCODE_PK2US, /* X */
OPCODE_PK4B, /* X */
OPCODE_PK4UB, /* X */
OPCODE_POW, /* X X X X */
- OPCODE_PRINT, /* X X */
OPCODE_RCP, /* X X X X X */
OPCODE_RET, /* 2 2 opt */
OPCODE_RFL, /* X */
@@ -228,7 +222,6 @@ typedef enum prog_opcode {
OPCODE_UP4B, /* X */
OPCODE_UP4UB, /* X */
OPCODE_X2D, /* X */
- OPCODE_XOR, /* */
OPCODE_XPD, /* X X */
MAX_OPCODE
} gl_inst_opcode;
@@ -389,9 +382,6 @@ struct prog_instruction
/** for debugging purposes */
const char *Comment;
- /** Arbitrary data. Used for OPCODE_PRINT and some drivers */
- void *Data;
-
/** for driver use (try to remove someday) */
GLint Aux;
};
diff --git a/mesalib/src/mesa/program/prog_noise.c b/mesalib/src/mesa/program/prog_noise.c
index 75cd8c659..63590c60c 100644
--- a/mesalib/src/mesa/program/prog_noise.c
+++ b/mesalib/src/mesa/program/prog_noise.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/program/prog_noise.h b/mesalib/src/mesa/program/prog_noise.h
index dd7986efc..9828343a6 100644
--- a/mesalib/src/mesa/program/prog_noise.h
+++ b/mesalib/src/mesa/program/prog_noise.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef PROG_NOISE
diff --git a/mesalib/src/mesa/program/prog_opt_constant_fold.c b/mesalib/src/mesa/program/prog_opt_constant_fold.c
index e2418b554..3811c0d8a 100644
--- a/mesalib/src/mesa/program/prog_opt_constant_fold.c
+++ b/mesalib/src/mesa/program/prog_opt_constant_fold.c
@@ -204,10 +204,6 @@ _mesa_constant_fold(struct gl_program *prog)
get_value(prog, &inst->SrcReg[0], a);
get_value(prog, &inst->SrcReg[1], b);
- /* It seems like a loop could be used here, but we cleverly put
- * DP2A between DP2 and DP3. Subtracting DP2 (or similar) from
- * the opcode results in various failures of the loop control.
- */
result = (a[0] * b[0]) + (a[1] * b[1]);
if (inst->Opcode >= OPCODE_DP3)
diff --git a/mesalib/src/mesa/program/prog_parameter.c b/mesalib/src/mesa/program/prog_parameter.c
index 8713d57b5..0b134f7da 100644
--- a/mesalib/src/mesa/program/prog_parameter.c
+++ b/mesalib/src/mesa/program/prog_parameter.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/program/prog_parameter.h b/mesalib/src/mesa/program/prog_parameter.h
index 7b6b4b80e..bb2aa973b 100644
--- a/mesalib/src/mesa/program/prog_parameter.h
+++ b/mesalib/src/mesa/program/prog_parameter.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/program/prog_print.c b/mesalib/src/mesa/program/prog_print.c
index c73f10df5..c8351e3b5 100644
--- a/mesalib/src/mesa/program/prog_print.c
+++ b/mesalib/src/mesa/program/prog_print.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -663,20 +664,6 @@ _mesa_fprint_instruction_opt(FILE *f,
}
switch (inst->Opcode) {
- case OPCODE_PRINT:
- fprintf(f, "PRINT '%s'", (char *) inst->Data);
- if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) {
- fprintf(f, ", ");
- fprintf(f, "%s[%d]%s",
- _mesa_register_file_name((gl_register_file) inst->SrcReg[0].File),
- inst->SrcReg[0].Index,
- _mesa_swizzle_string(inst->SrcReg[0].Swizzle,
- inst->SrcReg[0].Negate, GL_FALSE));
- }
- if (inst->Comment)
- fprintf(f, " # %s", inst->Comment);
- fprint_comment(f, inst);
- break;
case OPCODE_SWZ:
fprintf(f, "SWZ");
if (inst->SaturateMode == SATURATE_ZERO_ONE)
diff --git a/mesalib/src/mesa/program/prog_print.h b/mesalib/src/mesa/program/prog_print.h
index 3e400eb46..82195cbbc 100644
--- a/mesalib/src/mesa/program/prog_print.h
+++ b/mesalib/src/mesa/program/prog_print.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/program/prog_statevars.c b/mesalib/src/mesa/program/prog_statevars.c
index 09d2a568a..19a948237 100644
--- a/mesalib/src/mesa/program/prog_statevars.c
+++ b/mesalib/src/mesa/program/prog_statevars.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/program/prog_statevars.h b/mesalib/src/mesa/program/prog_statevars.h
index af2c89792..e26ded9e0 100644
--- a/mesalib/src/mesa/program/prog_statevars.h
+++ b/mesalib/src/mesa/program/prog_statevars.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef PROG_STATEVARS_H
diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c
index 2ef969ff7..37bb7b7eb 100644
--- a/mesalib/src/mesa/program/program.c
+++ b/mesalib/src/mesa/program/program.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -32,7 +33,6 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
-#include "main/mfeatures.h"
#include "program.h"
#include "prog_cache.h"
#include "prog_parameter.h"
diff --git a/mesalib/src/mesa/program/program.h b/mesalib/src/mesa/program/program.h
index c5650c519..8f88b3913 100644
--- a/mesalib/src/mesa/program/program.h
+++ b/mesalib/src/mesa/program/program.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/program/program_parse.y b/mesalib/src/mesa/program/program_parse.y
index 81d85f9fb..cbf3fe6ca 100644
--- a/mesalib/src/mesa/program/program_parse.y
+++ b/mesalib/src/mesa/program/program_parse.y
@@ -709,6 +709,7 @@ extSwizSel: INTEGER
}
$$.swz = ($1 == 0) ? SWIZZLE_ZERO : SWIZZLE_ONE;
+ $$.negate = 0;
/* 0 and 1 are valid for both RGBA swizzle names and XYZW
* swizzle names.
@@ -728,6 +729,10 @@ extSwizSel: INTEGER
s = $1[0];
free($1);
+ $$.rgba_valid = 0;
+ $$.xyzw_valid = 0;
+ $$.negate = 0;
+
switch (s) {
case 'x':
$$.swz = SWIZZLE_X;
@@ -2709,7 +2714,7 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st
? & ctx->Const.VertexProgram
: & ctx->Const.FragmentProgram;
- state->MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits;
+ state->MaxTextureImageUnits = ctx->Const.FragmentProgram.MaxTextureImageUnits;
state->MaxTextureCoordUnits = ctx->Const.MaxTextureCoordUnits;
state->MaxTextureUnits = ctx->Const.MaxTextureUnits;
state->MaxClipPlanes = ctx->Const.MaxClipPlanes;
diff --git a/mesalib/src/mesa/program/program_parse_extra.c b/mesalib/src/mesa/program/program_parse_extra.c
index 4d928483e..e8e1912eb 100644
--- a/mesalib/src/mesa/program/program_parse_extra.c
+++ b/mesalib/src/mesa/program/program_parse_extra.c
@@ -194,15 +194,21 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option)
} else if (strncmp(option, "precision_hint_", 15) == 0) {
option += 15;
- if (state->option.PrecisionHint == OPTION_NONE) {
- if (strcmp(option, "nicest") == 0) {
- state->option.PrecisionHint = OPTION_NICEST;
- return 1;
- } else if (strcmp(option, "fastest") == 0) {
- state->option.PrecisionHint = OPTION_FASTEST;
- return 1;
- }
- }
+ /* The ARB_fragment_program spec, 3.11.4.5.2 says:
+ *
+ * "Only one precision control option may be specified by any given
+ * fragment program. A fragment program that specifies both the
+ * "ARB_precision_hint_fastest" and "ARB_precision_hint_nicest"
+ * program options will fail to load.
+ */
+
+ if (strcmp(option, "nicest") == 0 && state->option.PrecisionHint != OPTION_FASTEST) {
+ state->option.PrecisionHint = OPTION_NICEST;
+ return 1;
+ } else if (strcmp(option, "fastest") == 0 && state->option.PrecisionHint != OPTION_NICEST) {
+ state->option.PrecisionHint = OPTION_FASTEST;
+ return 1;
+ }
return 0;
} else if (strcmp(option, "draw_buffers") == 0) {
diff --git a/mesalib/src/mesa/program/programopt.c b/mesalib/src/mesa/program/programopt.c
index d40ffd543..6a62e1f58 100644
--- a/mesalib/src/mesa/program/programopt.c
+++ b/mesalib/src/mesa/program/programopt.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -218,7 +219,7 @@ _mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_vertex_program *vpro
void
_mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog)
{
- if (ctx->mvp_with_dp4)
+ if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4)
_mesa_insert_mvp_dp4_code( ctx, vprog );
else
_mesa_insert_mvp_mad_code( ctx, vprog );
diff --git a/mesalib/src/mesa/program/programopt.h b/mesalib/src/mesa/program/programopt.h
index b9205823c..3a274417f 100644
--- a/mesalib/src/mesa/program/programopt.h
+++ b/mesalib/src/mesa/program/programopt.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c
index 2c826fc66..16739fd39 100644
--- a/mesalib/src/mesa/program/register_allocate.c
+++ b/mesalib/src/mesa/program/register_allocate.c
@@ -355,7 +355,7 @@ ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count)
g->stack = rzalloc_array(g, unsigned int, count);
for (i = 0; i < count; i++) {
- int bitset_count = ALIGN(count, BITSET_WORDBITS) / BITSET_WORDBITS;
+ int bitset_count = BITSET_WORDS(count);
g->nodes[i].adjacency = rzalloc_array(g, BITSET_WORD, bitset_count);
g->nodes[i].adjacency_list_size = 4;
@@ -437,7 +437,7 @@ ra_simplify(struct ra_graph *g)
}
for (i = 0; i < g->count; i++) {
- if (!g->nodes[i].in_stack)
+ if (!g->nodes[i].in_stack && g->nodes[i].reg == -1)
return GL_FALSE;
}
@@ -586,7 +586,7 @@ int
ra_get_best_spill_node(struct ra_graph *g)
{
unsigned int best_node = -1;
- unsigned int best_benefit = 0.0;
+ float best_benefit = 0.0;
unsigned int n;
for (n = 0; n < g->count; n++) {
diff --git a/mesalib/src/mesa/program/sampler.cpp b/mesalib/src/mesa/program/sampler.cpp
index e3641aaa9..9b9412730 100644
--- a/mesalib/src/mesa/program/sampler.cpp
+++ b/mesalib/src/mesa/program/sampler.cpp
@@ -34,6 +34,7 @@ extern "C" {
#include "main/compiler.h"
#include "main/mtypes.h"
#include "program/prog_parameter.h"
+#include "program/program.h"
}
class get_sampler_name : public ir_hierarchical_visitor
@@ -102,14 +103,16 @@ public:
ir_dereference *last;
};
-extern "C" {
-int
+
+extern "C" int
_mesa_get_sampler_uniform_value(class ir_dereference *sampler,
struct gl_shader_program *shader_program,
const struct gl_program *prog)
{
get_sampler_name getname(sampler, shader_program);
+ GLuint shader = _mesa_program_target_to_index(prog->Target);
+
sampler->accept(&getname);
unsigned location;
@@ -119,6 +122,15 @@ _mesa_get_sampler_uniform_value(class ir_dereference *sampler,
return 0;
}
- return shader_program->UniformStorage[location].sampler + getname.offset;
-}
+ if (!shader_program->UniformStorage[location].sampler[shader].active) {
+ assert(0 && "cannot return a sampler");
+ linker_error(shader_program,
+ "cannot return a sampler named %s, because it is not "
+ "used in this shader stage. This is a driver bug.\n",
+ getname.name);
+ return 0;
+ }
+
+ return shader_program->UniformStorage[location].sampler[shader].index +
+ getname.offset;
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom.c b/mesalib/src/mesa/state_tracker/st_atom.c
index 32bcc266a..1abaf8f3e 100644
--- a/mesalib/src/mesa/state_tracker/st_atom.c
+++ b/mesalib/src/mesa/state_tracker/st_atom.c
@@ -55,10 +55,10 @@ static const struct st_tracked_state *atoms[] =
&st_update_viewport,
&st_update_scissor,
&st_update_blend,
- &st_update_sampler,
&st_update_vertex_texture,
&st_update_fragment_texture,
&st_update_geometry_texture,
+ &st_update_sampler, /* depends on update_*_texture for swizzle */
&st_update_framebuffer,
&st_update_msaa,
&st_update_vs_constants,
@@ -160,11 +160,7 @@ void st_validate_state( struct st_context *st )
check_attrib_edgeflag(st);
- /* The bitmap cache is immune to pixel unpack changes.
- * Note that GLUT makes several calls to glPixelStore for each
- * bitmap char it draws so this is an important check.
- */
- if (state->mesa & ~_NEW_PACKUNPACK)
+ if (state->mesa)
st_flush_bitmap_cache(st);
check_program_state( st );
diff --git a/mesalib/src/mesa/state_tracker/st_atom_array.c b/mesalib/src/mesa/state_tracker/st_atom_array.c
index 2437245bd..87a0a17f1 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_array.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_array.c
@@ -589,7 +589,7 @@ static void update_array(struct st_context *st)
const struct st_tracked_state st_update_array = {
"st_update_array", /* name */
{ /* dirty */
- _NEW_BUFFER_OBJECT, /* mesa */
+ 0, /* mesa */
ST_NEW_VERTEX_ARRAYS | ST_NEW_VERTEX_PROGRAM, /* st */
},
update_array /* update */
diff --git a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
index 56ba96fe3..27a910b5f 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
@@ -194,12 +194,25 @@ static void st_bind_ubos(struct st_context *st,
binding = &st->ctx->UniformBufferBindings[shader->UniformBlocks[i].Binding];
st_obj = st_buffer_object(binding->BufferObject);
- pipe_resource_reference(&cb.buffer, st_obj->buffer);
- cb.buffer_size = st_obj->buffer->width0 - binding->Offset;
+ cb.buffer = st_obj->buffer;
+
+ if (cb.buffer) {
+ cb.buffer_offset = binding->Offset;
+ cb.buffer_size = cb.buffer->width0 - binding->Offset;
+
+ /* AutomaticSize is FALSE if the buffer was set with BindBufferRange.
+ * Take the minimum just to be sure.
+ */
+ if (!binding->AutomaticSize)
+ cb.buffer_size = MIN2(cb.buffer_size, binding->Size);
+ }
+ else {
+ cb.buffer_offset = 0;
+ cb.buffer_size = 0;
+ }
cso_set_constant_buffer(st->cso_context, shader_type, 1 + i, &cb);
- pipe_resource_reference(&cb.buffer, NULL);
}
}
@@ -216,8 +229,8 @@ static void bind_vs_ubos(struct st_context *st)
const struct st_tracked_state st_bind_vs_ubos = {
"st_bind_vs_ubos",
{
- (_NEW_PROGRAM | _NEW_BUFFER_OBJECT),
- ST_NEW_VERTEX_PROGRAM,
+ 0,
+ ST_NEW_VERTEX_PROGRAM | ST_NEW_UNIFORM_BUFFER,
},
bind_vs_ubos
};
@@ -230,14 +243,13 @@ static void bind_fs_ubos(struct st_context *st)
return;
st_bind_ubos(st, prog->_LinkedShaders[MESA_SHADER_FRAGMENT], PIPE_SHADER_FRAGMENT);
-
}
const struct st_tracked_state st_bind_fs_ubos = {
"st_bind_fs_ubos",
{
- (_NEW_PROGRAM | _NEW_BUFFER_OBJECT),
- ST_NEW_FRAGMENT_PROGRAM,
+ 0,
+ ST_NEW_FRAGMENT_PROGRAM | ST_NEW_UNIFORM_BUFFER,
},
bind_fs_ubos
};
diff --git a/mesalib/src/mesa/state_tracker/st_atom_depth.c b/mesalib/src/mesa/state_tracker/st_atom_depth.c
index c76a6d8c6..18a56a2e4 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_depth.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_depth.c
@@ -41,6 +41,9 @@
#include "pipe/p_defines.h"
#include "cso_cache/cso_context.h"
+#include "main/core.h"
+#include "main/stencil.h"
+
/**
* Convert an OpenGL compare mode to a pipe tokens.
@@ -116,7 +119,7 @@ update_depth_stencil_alpha(struct st_context *st)
dsa->stencil[0].zpass_op = gl_stencil_op_to_pipe(ctx->Stencil.ZPassFunc[0]);
dsa->stencil[0].valuemask = ctx->Stencil.ValueMask[0] & 0xff;
dsa->stencil[0].writemask = ctx->Stencil.WriteMask[0] & 0xff;
- sr.ref_value[0] = ctx->Stencil.Ref[0] & 0xff;
+ sr.ref_value[0] = _mesa_get_stencil_ref(ctx, 0);
if (ctx->Stencil._TestTwoSide) {
const GLuint back = ctx->Stencil._BackFace;
@@ -127,7 +130,7 @@ update_depth_stencil_alpha(struct st_context *st)
dsa->stencil[1].zpass_op = gl_stencil_op_to_pipe(ctx->Stencil.ZPassFunc[back]);
dsa->stencil[1].valuemask = ctx->Stencil.ValueMask[back] & 0xff;
dsa->stencil[1].writemask = ctx->Stencil.WriteMask[back] & 0xff;
- sr.ref_value[1] = ctx->Stencil.Ref[back] & 0xff;
+ sr.ref_value[1] = _mesa_get_stencil_ref(ctx, back);
}
else {
/* This should be unnecessary. Drivers must not expect this to
@@ -153,7 +156,7 @@ update_depth_stencil_alpha(struct st_context *st)
const struct st_tracked_state st_update_depth_stencil_alpha = {
"st_update_depth_stencil", /* name */
{ /* dirty */
- (_NEW_DEPTH|_NEW_STENCIL|_NEW_COLOR), /* mesa */
+ (_NEW_DEPTH|_NEW_STENCIL|_NEW_COLOR|_NEW_BUFFERS),/* mesa */
0, /* st */
},
update_depth_stencil_alpha /* update */
diff --git a/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c b/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c
index 3df8691f4..c752640f4 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -59,6 +59,7 @@ update_renderbuffer_surface(struct st_context *st,
enum pipe_format format = st->ctx->Color.sRGBEnabled ? resource->format : util_format_linear(resource->format);
if (!strb->surface ||
+ strb->surface->texture->nr_samples != strb->Base.NumSamples ||
strb->surface->format != format ||
strb->surface->texture != resource ||
strb->surface->width != rtt_width ||
diff --git a/mesalib/src/mesa/state_tracker/st_atom_msaa.c b/mesalib/src/mesa/state_tracker/st_atom_msaa.c
index 9baa4fcf2..fb760460c 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_msaa.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_msaa.c
@@ -62,7 +62,8 @@ static void update_sample_mask( struct st_context *st )
if (st->ctx->Multisample.SampleCoverageInvert)
sample_mask = ~sample_mask;
}
- /* TODO merge with app-supplied sample mask */
+ if (st->ctx->Multisample.SampleMask)
+ sample_mask &= st->ctx->Multisample.SampleMaskValue;
}
/* mask off unused bits or don't care? */
diff --git a/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c b/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c
index 62464b475..f4d0cab42 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -228,9 +228,12 @@ static void update_raster_state( struct st_context *st )
/* _NEW_FRAG_CLAMP */
raster->clamp_fragment_color = !st->clamp_frag_color_in_shader &&
ctx->Color._ClampFragmentColor;
- raster->gl_rasterization_rules = 1;
- /* _NEW_RASTERIZER_DISCARD */
+ raster->half_pixel_center = 1;
+ if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP)
+ raster->bottom_edge_rule = 1;
+
+ /* ST_NEW_RASTERIZER */
raster->rasterizer_discard = ctx->RasterDiscard;
/* _NEW_TRANSFORM */
@@ -252,9 +255,9 @@ const struct st_tracked_state st_update_rasterizer = {
_NEW_PROGRAM |
_NEW_SCISSOR |
_NEW_FRAG_CLAMP |
- _NEW_RASTERIZER_DISCARD |
_NEW_TRANSFORM), /* mesa state dependencies*/
- ST_NEW_VERTEX_PROGRAM, /* state tracker dependencies */
+ (ST_NEW_VERTEX_PROGRAM |
+ ST_NEW_RASTERIZER), /* state tracker dependencies */
},
update_raster_state /* update function */
};
diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
index 3eba5b13c..302e12981 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
@@ -48,6 +48,8 @@
#include "cso_cache/cso_context.h"
+#include "util/u_format.h"
+
/**
* Convert GLenum texcoord wrap tokens to pipe tokens.
@@ -172,8 +174,10 @@ convert_sampler(struct st_context *st,
msamp->BorderColor.ui[1] ||
msamp->BorderColor.ui[2] ||
msamp->BorderColor.ui[3]) {
+ struct st_texture_object *stobj = st_texture_object(texobj);
struct gl_texture_image *teximg;
GLboolean is_integer = GL_FALSE;
+ union pipe_color_union border_color;
teximg = texobj->Image[0][texobj->BaseLevel];
@@ -181,9 +185,26 @@ convert_sampler(struct st_context *st,
is_integer = _mesa_is_enum_format_integer(teximg->InternalFormat);
}
- st_translate_color(&msamp->BorderColor,
- &sampler->border_color,
- teximg ? teximg->_BaseFormat : GL_RGBA, is_integer);
+ if (st->apply_texture_swizzle_to_border_color && stobj->sampler_view) {
+ const unsigned char swz[4] =
+ {
+ stobj->sampler_view->swizzle_r,
+ stobj->sampler_view->swizzle_g,
+ stobj->sampler_view->swizzle_b,
+ stobj->sampler_view->swizzle_a,
+ };
+
+ st_translate_color(&msamp->BorderColor,
+ &border_color,
+ teximg ? teximg->_BaseFormat : GL_RGBA, is_integer);
+
+ util_format_apply_color_swizzle(&sampler->border_color,
+ &border_color, swz, is_integer);
+ } else {
+ st_translate_color(&msamp->BorderColor,
+ &sampler->border_color,
+ teximg ? teximg->_BaseFormat : GL_RGBA, is_integer);
+ }
}
sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ?
@@ -258,14 +279,14 @@ update_samplers(struct st_context *st)
update_shader_samplers(st,
PIPE_SHADER_FRAGMENT,
&ctx->FragmentProgram._Current->Base,
- ctx->Const.MaxTextureImageUnits,
+ ctx->Const.FragmentProgram.MaxTextureImageUnits,
st->state.samplers[PIPE_SHADER_FRAGMENT],
&st->state.num_samplers[PIPE_SHADER_FRAGMENT]);
update_shader_samplers(st,
PIPE_SHADER_VERTEX,
&ctx->VertexProgram._Current->Base,
- ctx->Const.MaxVertexTextureImageUnits,
+ ctx->Const.VertexProgram.MaxTextureImageUnits,
st->state.samplers[PIPE_SHADER_VERTEX],
&st->state.num_samplers[PIPE_SHADER_VERTEX]);
@@ -273,7 +294,7 @@ update_samplers(struct st_context *st)
update_shader_samplers(st,
PIPE_SHADER_GEOMETRY,
&ctx->GeometryProgram._Current->Base,
- ctx->Const.MaxGeometryTextureImageUnits,
+ ctx->Const.GeometryProgram.MaxTextureImageUnits,
st->state.samplers[PIPE_SHADER_GEOMETRY],
&st->state.num_samplers[PIPE_SHADER_GEOMETRY]);
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_scissor.c b/mesalib/src/mesa/state_tracker/st_atom_scissor.c
index eb1387778..19c2cd2fb 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_scissor.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_scissor.c
@@ -86,7 +86,7 @@ update_scissor( struct st_context *st )
if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) {
/* state has changed */
st->state.scissor = scissor; /* struct copy */
- st->pipe->set_scissor_state(st->pipe, &scissor); /* activate */
+ st->pipe->set_scissor_states(st->pipe, 0, 1, &scissor); /* activate */
}
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index fc2d69013..d79e04cf4 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -239,7 +239,8 @@ update_single_texture(struct st_context *st,
st_mesa_format_to_pipe_format(stObj->base._BufferObjectFormat);
}
else {
- view_format = stObj->pt->format;
+ view_format =
+ stObj->surface_based ? stObj->surface_format : stObj->pt->format;
/* If sRGB decoding is off, use the linear format */
if (samp->sRGBDecode == GL_SKIP_DECODE_EXT) {
@@ -325,11 +326,11 @@ update_vertex_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
- if (ctx->Const.MaxVertexTextureImageUnits > 0) {
+ if (ctx->Const.VertexProgram.MaxTextureImageUnits > 0) {
update_textures(st,
PIPE_SHADER_VERTEX,
&ctx->VertexProgram._Current->Base,
- ctx->Const.MaxVertexTextureImageUnits,
+ ctx->Const.VertexProgram.MaxTextureImageUnits,
st->state.sampler_views[PIPE_SHADER_VERTEX],
&st->state.num_sampler_views[PIPE_SHADER_VERTEX]);
}
@@ -344,7 +345,7 @@ update_fragment_textures(struct st_context *st)
update_textures(st,
PIPE_SHADER_FRAGMENT,
&ctx->FragmentProgram._Current->Base,
- ctx->Const.MaxTextureImageUnits,
+ ctx->Const.FragmentProgram.MaxTextureImageUnits,
st->state.sampler_views[PIPE_SHADER_FRAGMENT],
&st->state.num_sampler_views[PIPE_SHADER_FRAGMENT]);
}
@@ -359,7 +360,7 @@ update_geometry_textures(struct st_context *st)
update_textures(st,
PIPE_SHADER_GEOMETRY,
&ctx->GeometryProgram._Current->Base,
- ctx->Const.MaxTextureImageUnits,
+ ctx->Const.FragmentProgram.MaxTextureImageUnits,
st->state.sampler_views[PIPE_SHADER_GEOMETRY],
&st->state.num_sampler_views[PIPE_SHADER_GEOMETRY]);
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index b3ca40501..e96f4b36e 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -34,7 +34,6 @@
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/pbo.h"
#include "program/program.h"
#include "program/prog_print.h"
@@ -299,7 +298,7 @@ make_bitmap_texture(struct gl_context *ctx, GLsizei width, GLsizei height,
* Create texture to hold bitmap pattern.
*/
pt = st_texture_create(st, st->internal_target, st->bitmap.tex_format,
- 0, width, height, 1, 1,
+ 0, width, height, 1, 1, 0,
PIPE_BIND_SAMPLER_VIEW);
if (!pt) {
_mesa_unmap_pbo_source(ctx, unpack);
@@ -567,7 +566,7 @@ reset_cache(struct st_context *st)
cache->texture = st_texture_create(st, PIPE_TEXTURE_2D,
st->bitmap.tex_format, 0,
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
- 1, 1,
+ 1, 1, 0,
PIPE_BIND_SAMPLER_VIEW);
}
@@ -826,7 +825,8 @@ st_init_bitmap(struct st_context *st)
/* init baseline rasterizer state once */
memset(&st->bitmap.rasterizer, 0, sizeof(st->bitmap.rasterizer));
- st->bitmap.rasterizer.gl_rasterization_rules = 1;
+ st->bitmap.rasterizer.half_pixel_center = 1;
+ st->bitmap.rasterizer.bottom_edge_rule = 1;
st->bitmap.rasterizer.depth_clip = 1;
/* find a usable texture format */
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.h b/mesalib/src/mesa/state_tracker/st_cb_bitmap.h
index d1c18058b..cc9f5f574 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.h
@@ -31,7 +31,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_blit.c b/mesalib/src/mesa/state_tracker/st_cb_blit.c
index 50cab4294..a236a08e9 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_blit.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_blit.c
@@ -33,7 +33,6 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "st_context.h"
#include "st_texture.h"
diff --git a/mesalib/src/mesa/state_tracker/st_cb_blit.h b/mesalib/src/mesa/state_tracker/st_cb_blit.h
index 159c6ca8d..9e94e4439 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_blit.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_blit.h
@@ -30,7 +30,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
index 8ff32c842..2e5e253a4 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -182,6 +182,21 @@ st_bufferobj_data(struct gl_context *ctx,
struct st_buffer_object *st_obj = st_buffer_object(obj);
unsigned bind, pipe_usage;
+ if (size && data && st_obj->buffer &&
+ st_obj->Base.Size == size && st_obj->Base.Usage == usage) {
+ /* Just discard the old contents and write new data.
+ * This should be the same as creating a new buffer, but we avoid
+ * a lot of validation in Mesa.
+ */
+ struct pipe_box box;
+
+ u_box_1d(0, size, &box);
+ pipe->transfer_inline_write(pipe, st_obj->buffer, 0,
+ PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE,
+ &box, data, 0, 0);
+ return GL_TRUE;
+ }
+
st_obj->Base.Size = size;
st_obj->Base.Usage = usage;
@@ -247,9 +262,11 @@ st_bufferobj_data(struct gl_context *ctx,
if (data)
pipe_buffer_write(pipe, st_obj->buffer, 0, size, data);
- return GL_TRUE;
}
+ /* BufferData may change an array or uniform buffer, need to update it */
+ st->dirty.st |= ST_NEW_VERTEX_ARRAYS | ST_NEW_UNIFORM_BUFFER;
+
return GL_TRUE;
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c
index a5aa8f496..566f4a76e 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_clear.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c
@@ -67,7 +67,8 @@ st_init_clear(struct st_context *st)
{
memset(&st->clear, 0, sizeof(st->clear));
- st->clear.raster.gl_rasterization_rules = 1;
+ st->clear.raster.half_pixel_center = 1;
+ st->clear.raster.bottom_edge_rule = 1;
st->clear.raster.depth_clip = 1;
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index f5a1e27f7..68359e803 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -35,7 +35,6 @@
#include "main/bufferobj.h"
#include "main/format_pack.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/pack.h"
#include "main/pbo.h"
@@ -466,7 +465,7 @@ alloc_texture(struct st_context *st, GLsizei width, GLsizei height,
struct pipe_resource *pt;
pt = st_texture_create(st, st->internal_target, texFormat, 0,
- width, height, 1, 1, PIPE_BIND_SAMPLER_VIEW);
+ width, height, 1, 1, 0, PIPE_BIND_SAMPLER_VIEW);
return pt;
}
@@ -711,7 +710,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
memset(&rasterizer, 0, sizeof(rasterizer));
rasterizer.clamp_fragment_color = !st->clamp_frag_color_in_shader &&
ctx->Color._ClampFragmentColor;
- rasterizer.gl_rasterization_rules = 1;
+ rasterizer.half_pixel_center = 1;
+ rasterizer.bottom_edge_rule = 1;
rasterizer.depth_clip = !ctx->Transform.DepthClamp;
rasterizer.scissor = ctx->Scissor.Enabled;
cso_set_rasterizer(cso, &rasterizer);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.h b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.h
index 6209dcade..6cd6a4ed6 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.h
@@ -31,7 +31,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
index c4efce02f..2cc200e0c 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
@@ -15,7 +15,6 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "program/program.h"
#include "program/prog_print.h"
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawtex.h b/mesalib/src/mesa/state_tracker/st_cb_drawtex.h
index ccb615e98..9794ccc15 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawtex.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawtex.h
@@ -11,7 +11,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_eglimage.c b/mesalib/src/mesa/state_tracker/st_cb_eglimage.c
index 8c78e5ef4..a396b9e97 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_eglimage.c
@@ -26,7 +26,6 @@
* Chia-I Wu <olv@lunarg.com>
*/
-#include "main/mfeatures.h"
#include "main/texobj.h"
#include "main/teximage.h"
#include "util/u_inlines.h"
@@ -132,6 +131,7 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
stObj->width0 = ps->width;
stObj->height0 = ps->height;
stObj->depth0 = 1;
+ stObj->surface_format = ps->format;
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_eglimage.h b/mesalib/src/mesa/state_tracker/st_cb_eglimage.h
index 1750b9147..c6ddec6ae 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_eglimage.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_eglimage.h
@@ -30,7 +30,6 @@
#define ST_CB_EGLIMAGE_H
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
index 4452e523b..826722be8 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
@@ -38,7 +38,6 @@
#include "main/fbobject.h"
#include "main/framebuffer.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/renderbuffer.h"
#include "pipe/p_context.h"
@@ -391,11 +390,10 @@ st_render_texture(struct gl_context *ctx,
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
- struct st_renderbuffer *strb;
- struct gl_renderbuffer *rb;
+ struct gl_renderbuffer *rb = att->Renderbuffer;
+ struct st_renderbuffer *strb = st_renderbuffer(rb);
struct pipe_resource *pt;
struct st_texture_object *stObj;
- const struct gl_texture_image *texImage;
struct pipe_surface surf_tmpl;
if (!st_finalize_texture(ctx, pipe, att->Texture))
@@ -404,27 +402,6 @@ st_render_texture(struct gl_context *ctx,
pt = st_get_texobj_resource(att->Texture);
assert(pt);
- /* get pointer to texture image we're rendeing to */
- texImage = _mesa_get_attachment_teximage(att);
-
- /* create new renderbuffer which wraps the texture image.
- * Use the texture's name as the renderbuffer's name so that we have
- * something that's non-zero (to determine vertical orientation) and
- * possibly helpful for debugging.
- */
- rb = st_new_renderbuffer(ctx, att->Texture->Name);
- if (!rb) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glFramebufferTexture()");
- return;
- }
-
- _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
- assert(rb->RefCount == 1);
- rb->AllocStorage = NULL; /* should not get called */
- strb = st_renderbuffer(rb);
-
- assert(strb->Base.RefCount > 0);
-
/* get the texture for the texture object */
stObj = st_texture_object(att->Texture);
@@ -434,11 +411,6 @@ st_render_texture(struct gl_context *ctx,
strb->rtt_face = att->CubeMapFace;
strb->rtt_slice = att->Zoffset;
- rb->Width = texImage->Width2;
- rb->Height = texImage->Height2;
- rb->_BaseFormat = texImage->_BaseFormat;
- rb->InternalFormat = texImage->InternalFormat;
-
pipe_resource_reference( &strb->texture, pt );
pipe_surface_release(pipe, &strb->surface);
@@ -477,10 +449,9 @@ st_render_texture(struct gl_context *ctx,
* Called via ctx->Driver.FinishRenderTexture.
*/
static void
-st_finish_render_texture(struct gl_context *ctx,
- struct gl_renderbuffer_attachment *att)
+st_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
- struct st_renderbuffer *strb = st_renderbuffer(att->Renderbuffer);
+ struct st_renderbuffer *strb = st_renderbuffer(rb);
if (!strb)
return;
@@ -527,7 +498,7 @@ st_validate_attachment(struct gl_context *ctx,
return GL_FALSE;
format = stObj->pt->format;
- texFormat = _mesa_get_attachment_teximage_const(att)->TexFormat;
+ texFormat = att->Renderbuffer->TexImage->TexFormat;
/* If the encoding is sRGB and sRGB rendering cannot be enabled,
* check for linear format support instead.
diff --git a/mesalib/src/mesa/state_tracker/st_cb_feedback.c b/mesalib/src/mesa/state_tracker/st_cb_feedback.c
index 7a8fde465..d2e4346b7 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_feedback.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_feedback.c
@@ -40,7 +40,6 @@
#include "main/imports.h"
#include "main/context.h"
#include "main/feedback.h"
-#include "main/mfeatures.h"
#include "vbo/vbo.h"
diff --git a/mesalib/src/mesa/state_tracker/st_cb_feedback.h b/mesalib/src/mesa/state_tracker/st_cb_feedback.h
index 0163631e3..6350da4e4 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_feedback.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_feedback.h
@@ -31,7 +31,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_flush.c b/mesalib/src/mesa/state_tracker/st_cb_flush.c
index b11004718..f428e0af9 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_flush.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_flush.c
@@ -77,7 +77,7 @@ display_front_buffer(struct st_context *st)
void st_flush(struct st_context *st,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags)
+ unsigned flags)
{
FLUSH_VERTICES(st->ctx, 0);
FLUSH_CURRENT(st->ctx, 0);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_flush.h b/mesalib/src/mesa/state_tracker/st_cb_flush.h
index 003e2a2a9..cb5c62e87 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_flush.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_flush.h
@@ -42,7 +42,7 @@ st_init_flush_functions(struct dd_function_table *functions);
extern void
st_flush(struct st_context *st,
struct pipe_fence_handle **fence,
- enum pipe_flush_flags flags);
+ unsigned flags);
extern void
st_finish(struct st_context *st);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_msaa.c b/mesalib/src/mesa/state_tracker/st_cb_msaa.c
new file mode 100644
index 000000000..bbf2b2c5c
--- /dev/null
+++ b/mesalib/src/mesa/state_tracker/st_cb_msaa.c
@@ -0,0 +1,59 @@
+/**************************************************************************
+ *
+ * Copyright 2013 Red Hat
+ * 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.
+ *
+ **************************************************************************/
+
+#include "main/bufferobj.h"
+#include "main/imports.h"
+
+#include "state_tracker/st_cb_msaa.h"
+#include "state_tracker/st_context.h"
+#include "state_tracker/st_atom.h"
+#include "state_tracker/st_cb_fbo.h"
+
+#include "pipe/p_context.h"
+
+
+static void
+st_GetSamplePosition(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ GLuint index,
+ GLfloat *outValue)
+{
+ struct st_context *st = st_context(ctx);
+
+ st_validate_state(st);
+
+ if (st->pipe->get_sample_position)
+ st->pipe->get_sample_position(st->pipe, (unsigned) fb->Visual.samples,
+ index, outValue);
+}
+
+
+void
+st_init_msaa_functions(struct dd_function_table *functions)
+{
+ functions->GetSamplePosition = st_GetSamplePosition;
+}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_msaa.h b/mesalib/src/mesa/state_tracker/st_cb_msaa.h
new file mode 100644
index 000000000..ba4c06f6b
--- /dev/null
+++ b/mesalib/src/mesa/state_tracker/st_cb_msaa.h
@@ -0,0 +1,39 @@
+/**************************************************************************
+ *
+ * Copyright 2013 Red Hat
+ * 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_MSAA_H
+#define ST_CB_MSAA_H
+
+#include "main/glheader.h"
+
+struct dd_function_table;
+
+extern void
+st_init_msaa_functions(struct dd_function_table *functions);
+
+#endif
diff --git a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c
index 6a35c1b69..24ce6351d 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c
@@ -35,7 +35,6 @@
#include "main/imports.h"
#include "main/context.h"
-#include "main/mfeatures.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
diff --git a/mesalib/src/mesa/state_tracker/st_cb_queryobj.h b/mesalib/src/mesa/state_tracker/st_cb_queryobj.h
index d5b107532..e069b095c 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_queryobj.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_queryobj.h
@@ -29,7 +29,6 @@
#define ST_CB_QUERYOBJ_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
/**
diff --git a/mesalib/src/mesa/state_tracker/st_cb_rasterpos.c b/mesalib/src/mesa/state_tracker/st_cb_rasterpos.c
index 4731f2648..26a55909d 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -38,7 +38,6 @@
#include "main/imports.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/feedback.h"
#include "st_context.h"
diff --git a/mesalib/src/mesa/state_tracker/st_cb_rasterpos.h b/mesalib/src/mesa/state_tracker/st_cb_rasterpos.h
index bfd3e4138..99796f610 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_rasterpos.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_rasterpos.h
@@ -30,7 +30,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 0cd0d77af..56dbe85c0 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -25,7 +25,6 @@
*
**************************************************************************/
-#include "main/mfeatures.h"
#include "main/bufferobj.h"
#include "main/enums.h"
#include "main/fbobject.h"
@@ -78,6 +77,8 @@ gl_target_to_pipe(GLenum target)
case GL_TEXTURE_2D:
case GL_PROXY_TEXTURE_2D:
case GL_TEXTURE_EXTERNAL_OES:
+ case GL_TEXTURE_2D_MULTISAMPLE:
+ case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
return PIPE_TEXTURE_2D;
case GL_TEXTURE_RECTANGLE_NV:
case GL_PROXY_TEXTURE_RECTANGLE_NV:
@@ -99,6 +100,8 @@ gl_target_to_pipe(GLenum target)
return PIPE_TEXTURE_1D_ARRAY;
case GL_TEXTURE_2D_ARRAY_EXT:
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
+ case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:
return PIPE_TEXTURE_2D_ARRAY;
case GL_TEXTURE_BUFFER:
return PIPE_BUFFER;
@@ -408,7 +411,7 @@ guess_and_alloc_texture(struct st_context *st,
ptWidth,
ptHeight,
ptDepth,
- ptLayers,
+ ptLayers, 0,
bindings);
stObj->lastLevel = lastLevel;
@@ -496,7 +499,7 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
ptWidth,
ptHeight,
ptDepth,
- ptLayers,
+ ptLayers, 0,
bindings);
return stImage->pt != NULL;
}
@@ -1492,7 +1495,7 @@ st_finalize_texture(struct gl_context *ctx,
GLuint face;
struct st_texture_image *firstImage;
enum pipe_format firstImageFormat;
- GLuint ptWidth, ptHeight, ptDepth, ptLayers;
+ GLuint ptWidth, ptHeight, ptDepth, ptLayers, ptNumSamples;
if (_mesa_is_texture_complete(tObj, &tObj->Sampler)) {
/* The texture is complete and we know exactly how many mipmap levels
@@ -1537,6 +1540,11 @@ st_finalize_texture(struct gl_context *ctx,
pipe_sampler_view_release(st->pipe, &stObj->sampler_view);
}
+ /* If this texture comes from a window system, there is nothing else to do. */
+ if (stObj->surface_based) {
+ return GL_TRUE;
+ }
+
/* Find gallium format for the Mesa texture */
firstImageFormat = st_mesa_format_to_pipe_format(firstImage->base.TexFormat);
@@ -1556,6 +1564,7 @@ st_finalize_texture(struct gl_context *ctx,
/* convert GL dims to Gallium dims */
st_gl_texture_dims_to_pipe_dims(stObj->base.Target, width, height, depth,
&ptWidth, &ptHeight, &ptDepth, &ptLayers);
+ ptNumSamples = firstImage->base.NumSamples;
}
/* If we already have a gallium texture, check that it matches the texture
@@ -1563,11 +1572,12 @@ st_finalize_texture(struct gl_context *ctx,
*/
if (stObj->pt) {
if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) ||
- !st_sampler_compat_formats(stObj->pt->format, firstImageFormat) ||
+ stObj->pt->format != firstImageFormat ||
stObj->pt->last_level < stObj->lastLevel ||
stObj->pt->width0 != ptWidth ||
stObj->pt->height0 != ptHeight ||
stObj->pt->depth0 != ptDepth ||
+ stObj->pt->nr_samples != ptNumSamples ||
stObj->pt->array_size != ptLayers)
{
/* The gallium texture does not match the Mesa texture so delete the
@@ -1591,7 +1601,7 @@ st_finalize_texture(struct gl_context *ctx,
ptWidth,
ptHeight,
ptDepth,
- ptLayers,
+ ptLayers, ptNumSamples,
bindings);
if (!stObj->pt) {
@@ -1637,11 +1647,14 @@ st_AllocTextureStorage(struct gl_context *ctx,
GLsizei height, GLsizei depth)
{
const GLuint numFaces = _mesa_num_tex_faces(texObj->Target);
+ struct gl_texture_image *texImage = texObj->Image[0][0];
struct st_context *st = st_context(ctx);
struct st_texture_object *stObj = st_texture_object(texObj);
+ struct pipe_screen *screen = st->pipe->screen;
GLuint ptWidth, ptHeight, ptDepth, ptLayers, bindings;
enum pipe_format fmt;
GLint level;
+ int num_samples = texImage->NumSamples;
assert(levels > 0);
@@ -1651,10 +1664,30 @@ st_AllocTextureStorage(struct gl_context *ctx,
stObj->depth0 = depth;
stObj->lastLevel = levels - 1;
- fmt = st_mesa_format_to_pipe_format(texObj->Image[0][0]->TexFormat);
+ fmt = st_mesa_format_to_pipe_format(texImage->TexFormat);
bindings = default_bindings(st, fmt);
+ /* Raise the sample count if the requested one is unsupported. */
+ if (num_samples > 1) {
+ boolean found = FALSE;
+
+ for (; num_samples <= ctx->Const.MaxSamples; num_samples++) {
+ if (screen->is_format_supported(screen, fmt, PIPE_TEXTURE_2D,
+ num_samples,
+ PIPE_BIND_SAMPLER_VIEW)) {
+ /* Update the sample count in gl_texture_image as well. */
+ texImage->NumSamples = num_samples;
+ found = TRUE;
+ break;
+ }
+ }
+
+ if (!found) {
+ return GL_FALSE;
+ }
+ }
+
st_gl_texture_dims_to_pipe_dims(texObj->Target,
width, height, depth,
&ptWidth, &ptHeight, &ptDepth, &ptLayers);
@@ -1662,11 +1695,11 @@ st_AllocTextureStorage(struct gl_context *ctx,
stObj->pt = st_texture_create(st,
gl_target_to_pipe(texObj->Target),
fmt,
- levels,
+ levels - 1,
ptWidth,
ptHeight,
ptDepth,
- ptLayers,
+ ptLayers, num_samples,
bindings);
if (!stObj->pt)
return GL_FALSE;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_xformfb.c b/mesalib/src/mesa/state_tracker/st_cb_xformfb.c
index 3e52c9988..e1a7a88a1 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_xformfb.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_xformfb.c
@@ -36,7 +36,6 @@
#include "main/bufferobj.h"
#include "main/context.h"
-#include "main/mfeatures.h"
#include "main/transformfeedback.h"
#include "st_cb_bufferobjects.h"
diff --git a/mesalib/src/mesa/state_tracker/st_cb_xformfb.h b/mesalib/src/mesa/state_tracker/st_cb_xformfb.h
index 5c82fed18..998c41825 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_xformfb.h
+++ b/mesalib/src/mesa/state_tracker/st_cb_xformfb.h
@@ -30,7 +30,6 @@
#include "main/compiler.h"
-#include "main/mfeatures.h"
struct dd_function_table;
struct gl_transform_feedback_object;
diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c
index cc87f2bb3..7d18c2521 100644
--- a/mesalib/src/mesa/state_tracker/st_context.c
+++ b/mesalib/src/mesa/state_tracker/st_context.c
@@ -49,6 +49,7 @@
#include "st_cb_eglimage.h"
#include "st_cb_fbo.h"
#include "st_cb_feedback.h"
+#include "st_cb_msaa.h"
#include "st_cb_program.h"
#include "st_cb_queryobj.h"
#include "st_cb_readpixels.h"
@@ -187,6 +188,10 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
st->needs_texcoord_semantic =
screen->get_param(screen, PIPE_CAP_TGSI_TEXCOORD);
+ st->apply_texture_swizzle_to_border_color =
+ !!(screen->get_param(screen, PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK) &
+ (PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 |
+ PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600));
/* GL limits and extensions */
st_init_limits(st);
@@ -203,6 +208,8 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
static void st_init_driver_flags(struct gl_driver_flags *f)
{
f->NewArray = ST_NEW_VERTEX_ARRAYS;
+ f->NewRasterizerDiscard = ST_NEW_RASTERIZER;
+ f->NewUniformBuffer = ST_NEW_UNIFORM_BUFFER;
}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
@@ -233,7 +240,7 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
* driver prefers DP4 or MUL/MAD for vertex transformation.
*/
if (debug_get_option_mesa_mvp_dp4())
- _mesa_set_mvp_with_dp4( ctx, GL_TRUE );
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = GL_TRUE;
return st_create_context_priv(ctx, pipe, options);
}
@@ -340,6 +347,7 @@ void st_init_driver_functions(struct dd_function_table *functions)
st_init_fbo_functions(functions);
st_init_feedback_functions(functions);
+ st_init_msaa_functions(functions);
st_init_program_functions(functions);
st_init_query_functions(functions);
st_init_cond_render_functions(functions);
diff --git a/mesalib/src/mesa/state_tracker/st_context.h b/mesalib/src/mesa/state_tracker/st_context.h
index 8786a036f..ab89b4947 100644
--- a/mesalib/src/mesa/state_tracker/st_context.h
+++ b/mesalib/src/mesa/state_tracker/st_context.h
@@ -50,6 +50,8 @@ struct u_upload_mgr;
#define ST_NEW_EDGEFLAGS_DATA (1 << 4)
#define ST_NEW_GEOMETRY_PROGRAM (1 << 5)
#define ST_NEW_VERTEX_ARRAYS (1 << 6)
+#define ST_NEW_RASTERIZER (1 << 7)
+#define ST_NEW_UNIFORM_BUFFER (1 << 8)
struct st_state_flags {
@@ -87,6 +89,7 @@ struct st_context
boolean prefer_blit_based_texture_transfer;
boolean needs_texcoord_semantic;
+ boolean apply_texture_swizzle_to_border_color;
/* On old libGL's for linux we need to invalidate the drawables
* on glViewpport calls, this is set via a option.
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c
index bff8d9b31..a440ae2a8 100644
--- a/mesalib/src/mesa/state_tracker/st_draw.c
+++ b/mesalib/src/mesa/state_tracker/st_draw.c
@@ -40,7 +40,6 @@
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "vbo/vbo.h"
@@ -231,7 +230,7 @@ st_draw_vbo(struct gl_context *ctx,
nr_prims);
if (!setup_index_buffer(st, ib, &ibuffer)) {
- /* out of memory */
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBegin/DrawElements/DrawArray");
return;
}
@@ -245,7 +244,7 @@ st_draw_vbo(struct gl_context *ctx,
* so we only set these fields for indexed drawing:
*/
info.primitive_restart = ctx->Array._PrimitiveRestart;
- info.restart_index = ctx->Array._RestartIndex;
+ info.restart_index = ctx->Array.RestartIndex;
}
else {
/* Transform feedback drawing is always non-indexed. */
diff --git a/mesalib/src/mesa/state_tracker/st_draw_feedback.c b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
index ae87fb28d..b19d913e5 100644
--- a/mesalib/src/mesa/state_tracker/st_draw_feedback.c
+++ b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
@@ -28,7 +28,6 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "vbo/vbo.h"
@@ -134,7 +133,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
* code sends state updates to the pipe, not to our private draw module.
*/
assert(draw);
- draw_set_viewport_state(draw, &st->state.viewport);
+ draw_set_viewport_states(draw, 0, 1, &st->state.viewport);
draw_set_clip_state(draw, &st->state.clip);
draw_set_rasterizer_state(draw, &st->state.rasterizer, NULL);
draw_bind_vertex_shader(draw, st->vp_variant->draw_shader);
@@ -176,7 +175,8 @@ st_feedback_draw_vbo(struct gl_context *ctx,
map = pipe_buffer_map(pipe, vbuffers[attr].buffer,
PIPE_TRANSFER_READ,
&vb_transfer[attr]);
- draw_set_mapped_vertex_buffer(draw, attr, map);
+ draw_set_mapped_vertex_buffer(draw, attr, map,
+ vbuffers[attr].buffer->width0);
}
else {
vbuffers[attr].buffer = NULL;
@@ -184,7 +184,8 @@ st_feedback_draw_vbo(struct gl_context *ctx,
vbuffers[attr].buffer_offset = 0;
velements[attr].src_offset = 0;
- draw_set_mapped_vertex_buffer(draw, attr, vbuffers[attr].user_buffer);
+ draw_set_mapped_vertex_buffer(draw, attr, vbuffers[attr].user_buffer,
+ ~0);
}
/* common-case setup */
@@ -232,7 +233,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
draw_set_indexes(draw,
(ubyte *) mapped_indices + ibuffer.offset,
- ibuffer.index_size);
+ ibuffer.index_size, ~0);
}
/* set the constant buffer */
@@ -251,7 +252,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
* unmap vertex/index buffers
*/
if (ib) {
- draw_set_indexes(draw, NULL, 0);
+ draw_set_indexes(draw, NULL, 0, 0);
if (ib_transfer)
pipe_buffer_unmap(pipe, ib_transfer);
pipe_resource_reference(&ibuffer.buffer, NULL);
@@ -261,7 +262,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
for (attr = 0; attr < vp->num_inputs; attr++) {
if (vb_transfer[attr])
pipe_buffer_unmap(pipe, vb_transfer[attr]);
- draw_set_mapped_vertex_buffer(draw, attr, NULL);
+ draw_set_mapped_vertex_buffer(draw, attr, NULL, 0);
pipe_resource_reference(&vbuffers[attr].buffer, NULL);
}
draw_set_vertex_buffers(draw, 0, vp->num_inputs, NULL);
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 2d8b9efec..46acc8763 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -29,7 +29,6 @@
#include "main/imports.h"
#include "main/context.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/version.h"
#include "pipe/p_context.h"
@@ -38,9 +37,9 @@
#include "st_context.h"
#include "st_extensions.h"
+#include "st_format.h"
-
-static int _min(int a, int b)
+static unsigned _min(unsigned a, unsigned b)
{
return (a < b) ? a : b;
}
@@ -71,7 +70,6 @@ void st_init_limits(struct st_context *st)
struct gl_constants *c = &st->ctx->Const;
gl_shader_type sh;
boolean can_ubo = TRUE;
- int max_const_buffers;
c->MaxTextureLevels
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
@@ -91,25 +89,10 @@ void st_init_limits(struct st_context *st)
c->MaxArrayTextureLayers
= screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
- c->MaxTextureImageUnits
- = _min(screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
- PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS),
- MAX_TEXTURE_IMAGE_UNITS);
-
- c->MaxVertexTextureImageUnits
- = _min(screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
- PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS),
- MAX_VERTEX_TEXTURE_IMAGE_UNITS);
-
c->MaxCombinedTextureImageUnits
= _min(screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SAMPLERS),
MAX_COMBINED_TEXTURE_IMAGE_UNITS);
- c->MaxTextureCoordUnits
- = _min(c->MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS);
-
- c->MaxTextureUnits = _min(c->MaxTextureImageUnits, c->MaxTextureCoordUnits);
-
/* Define max viewport size and max renderbuffer size in terms of
* max texture size (note: max tex RECT size = max tex 2D size).
* If this isn't true for some hardware we'll need new PIPE_CAP_ queries.
@@ -118,9 +101,9 @@ void st_init_limits(struct st_context *st)
c->MaxViewportHeight =
c->MaxRenderbufferSize = c->MaxTextureRectSize;
- c->MaxDrawBuffers
- = _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
- 1, MAX_DRAW_BUFFERS);
+ c->MaxDrawBuffers = c->MaxColorAttachments =
+ _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
+ 1, MAX_DRAW_BUFFERS);
c->MaxDualSourceDrawBuffers
= _clamp(screen->get_param(screen, PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS),
@@ -156,13 +139,16 @@ void st_init_limits(struct st_context *st)
c->MaxTextureLodBias
= screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_LOD_BIAS);
- c->MaxDrawBuffers
- = CLAMP(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
- 1, MAX_DRAW_BUFFERS);
-
c->QuadsFollowProvokingVertexConvention = screen->get_param(
screen, PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION);
+ c->MaxUniformBlockSize =
+ screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
+ PIPE_SHADER_CAP_MAX_CONSTS) * 16;
+ if (c->MaxUniformBlockSize < 16384) {
+ can_ubo = FALSE;
+ }
+
for (sh = 0; sh < MESA_SHADER_TYPES; ++sh) {
struct gl_shader_compiler_options *options =
&st->ctx->ShaderCompilerOptions[sh];
@@ -183,17 +169,39 @@ void st_init_limits(struct st_context *st)
continue;
}
- pc->MaxNativeInstructions = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS);
- pc->MaxNativeAluInstructions = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS);
- pc->MaxNativeTexInstructions = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS);
- pc->MaxNativeTexIndirections = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS);
- pc->MaxNativeAttribs = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS);
- pc->MaxNativeTemps = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEMPS);
- pc->MaxNativeAddressRegs = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS);
- pc->MaxNativeParameters = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONSTS);
- pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
- /* raise MaxParameters if native support is higher */
- pc->MaxParameters = MAX2(pc->MaxParameters, pc->MaxNativeParameters);
+ pc->MaxTextureImageUnits =
+ _min(screen->get_shader_param(screen, sh,
+ PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS),
+ MAX_TEXTURE_IMAGE_UNITS);
+
+ pc->MaxInstructions = pc->MaxNativeInstructions =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS);
+ pc->MaxAluInstructions = pc->MaxNativeAluInstructions =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS);
+ pc->MaxTexInstructions = pc->MaxNativeTexInstructions =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS);
+ pc->MaxTexIndirections = pc->MaxNativeTexIndirections =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS);
+ pc->MaxAttribs = pc->MaxNativeAttribs =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS);
+ pc->MaxTemps = pc->MaxNativeTemps =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEMPS);
+ pc->MaxAddressRegs = pc->MaxNativeAddressRegs =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS);
+ pc->MaxParameters = pc->MaxNativeParameters =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONSTS);
+
+ pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
+
+ pc->MaxUniformBlocks =
+ screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
+ if (pc->MaxUniformBlocks)
+ pc->MaxUniformBlocks -= 1; /* The first one is for ordinary uniforms. */
+ pc->MaxUniformBlocks = _min(pc->MaxUniformBlocks, MAX_UNIFORM_BUFFERS);
+
+ pc->MaxCombinedUniformComponents = (pc->MaxUniformComponents +
+ c->MaxUniformBlockSize / 4 *
+ pc->MaxUniformBlocks);
/* Gallium doesn't really care about local vs. env parameters so use the
* same limits.
@@ -220,15 +228,9 @@ void st_init_limits(struct st_context *st)
options->EmitNoIndirectUniform = !screen->get_shader_param(screen, sh,
PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
- if (pc->MaxNativeInstructions) {
- if (options->EmitNoIndirectUniform)
+ if (pc->MaxNativeInstructions &&
+ (options->EmitNoIndirectUniform || pc->MaxUniformBlocks < 12)) {
can_ubo = FALSE;
-
- max_const_buffers = screen->get_shader_param(screen, sh,
- PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
- /* we need 13 buffers - 1 constant, 12 UBO */
- if (max_const_buffers < 13)
- can_ubo = FALSE;
}
if (options->EmitNoLoops)
@@ -238,11 +240,20 @@ void st_init_limits(struct st_context *st)
options->LowerClipDistance = true;
}
+ /* This depends on program constants. */
+ c->MaxTextureCoordUnits
+ = _min(c->FragmentProgram.MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS);
+
+ c->MaxTextureUnits = _min(c->FragmentProgram.MaxTextureImageUnits, c->MaxTextureCoordUnits);
+
+ c->VertexProgram.MaxAttribs = MIN2(c->VertexProgram.MaxAttribs, 16);
+
/* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum number
* of inputs. It's always 2 colors + N generic inputs. */
c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
PIPE_SHADER_CAP_MAX_INPUTS);
c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING);
+ c->MaxVaryingComponents = c->MaxVarying * 4;
c->MinProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET);
c->MaxProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET);
@@ -267,8 +278,13 @@ void st_init_limits(struct st_context *st)
if (can_ubo) {
st->ctx->Extensions.ARB_uniform_buffer_object = GL_TRUE;
- st->ctx->Const.UniformBufferOffsetAlignment =
+ c->UniformBufferOffsetAlignment =
screen->get_param(screen, PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT);
+ c->MaxCombinedUniformBlocks = c->MaxUniformBufferBindings =
+ c->VertexProgram.MaxUniformBlocks +
+ c->GeometryProgram.MaxUniformBlocks +
+ c->FragmentProgram.MaxUniformBlocks;
+ assert(c->MaxCombinedUniformBlocks <= MAX_COMBINED_UNIFORM_BUFFERS);
}
}
@@ -398,7 +414,8 @@ void st_init_extensions(struct st_context *st)
{ o(MESA_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS },
{ o(OES_standard_derivatives), PIPE_CAP_SM3 },
- { o(ARB_texture_cube_map_array), PIPE_CAP_CUBE_MAP_ARRAY }
+ { o(ARB_texture_cube_map_array), PIPE_CAP_CUBE_MAP_ARRAY },
+ { o(ARB_texture_multisample), PIPE_CAP_TEXTURE_MULTISAMPLE }
};
/* Required: render target and sampler support */
@@ -658,10 +675,33 @@ void st_init_extensions(struct st_context *st)
/* Maximum sample count. */
for (i = 16; i > 0; --i) {
- if (screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_UNORM,
- PIPE_TEXTURE_2D, i,
- PIPE_BIND_RENDER_TARGET)) {
+ enum pipe_format pformat = st_choose_format(st, GL_RGBA,
+ GL_NONE, GL_NONE,
+ PIPE_TEXTURE_2D, i,
+ PIPE_BIND_RENDER_TARGET, FALSE);
+ if (pformat != PIPE_FORMAT_NONE) {
ctx->Const.MaxSamples = i;
+ ctx->Const.MaxColorTextureSamples = i;
+ break;
+ }
+ }
+ for (i = ctx->Const.MaxSamples; i > 0; --i) {
+ enum pipe_format pformat = st_choose_format(st, GL_DEPTH_STENCIL,
+ GL_NONE, GL_NONE,
+ PIPE_TEXTURE_2D, i,
+ PIPE_BIND_DEPTH_STENCIL, FALSE);
+ if (pformat != PIPE_FORMAT_NONE) {
+ ctx->Const.MaxDepthTextureSamples = i;
+ break;
+ }
+ }
+ for (i = ctx->Const.MaxSamples; i > 0; --i) {
+ enum pipe_format pformat = st_choose_format(st, GL_RGBA_INTEGER,
+ GL_NONE, GL_NONE,
+ PIPE_TEXTURE_2D, i,
+ PIPE_BIND_RENDER_TARGET, FALSE);
+ if (pformat != PIPE_FORMAT_NONE) {
+ ctx->Const.MaxIntegerSamples = i;
break;
}
}
@@ -689,7 +729,10 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_transform_feedback_instanced = GL_TRUE;
}
if (st->options.force_glsl_extensions_warn)
- ctx->Const.ForceGLSLExtensionsWarn = 1;
+ ctx->Const.ForceGLSLExtensionsWarn = 1;
+
+ if (st->options.disable_glsl_line_continuations)
+ ctx->Const.DisableGLSLLineContinuations = 1;
ctx->Const.MinMapBufferAlignment =
screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
@@ -699,6 +742,9 @@ void st_init_extensions(struct st_context *st)
if (screen->get_param(screen, PIPE_CAP_TEXTURE_BUFFER_OBJECTS)) {
ctx->Extensions.ARB_texture_buffer_object = GL_TRUE;
+ ctx->Const.MaxTextureBufferSize =
+ _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE),
+ (1u << 31) - 1);
ctx->Const.TextureBufferOffsetAlignment =
screen->get_param(screen, PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT);
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c
index a15706a03..56f3a4a48 100644
--- a/mesalib/src/mesa/state_tracker/st_format.c
+++ b/mesalib/src/mesa/state_tracker/st_format.c
@@ -38,7 +38,6 @@
#include "main/texstore.h"
#include "main/image.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -1801,41 +1800,6 @@ st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target,
}
-GLboolean
-st_sampler_compat_formats(enum pipe_format format1, enum pipe_format format2)
-{
- if (format1 == format2)
- return GL_TRUE;
-
- if (format1 == PIPE_FORMAT_B8G8R8A8_UNORM &&
- format2 == PIPE_FORMAT_B8G8R8X8_UNORM)
- return GL_TRUE;
-
- if (format1 == PIPE_FORMAT_B8G8R8X8_UNORM &&
- format2 == PIPE_FORMAT_B8G8R8A8_UNORM)
- return GL_TRUE;
-
- if (format1 == PIPE_FORMAT_A8B8G8R8_UNORM &&
- format2 == PIPE_FORMAT_X8B8G8R8_UNORM)
- return GL_TRUE;
-
- if (format1 == PIPE_FORMAT_X8B8G8R8_UNORM &&
- format2 == PIPE_FORMAT_A8B8G8R8_UNORM)
- return GL_TRUE;
-
- if (format1 == PIPE_FORMAT_A8R8G8B8_UNORM &&
- format2 == PIPE_FORMAT_X8R8G8B8_UNORM)
- return GL_TRUE;
-
- if (format1 == PIPE_FORMAT_X8R8G8B8_UNORM &&
- format2 == PIPE_FORMAT_A8R8G8B8_UNORM)
- return GL_TRUE;
-
- return GL_FALSE;
-}
-
-
-
/**
* This is used for translating texture border color and the clear
* color. For example, the clear color is interpreted according to
diff --git a/mesalib/src/mesa/state_tracker/st_format.h b/mesalib/src/mesa/state_tracker/st_format.h
index 0a1c18d92..6e97dcb96 100644
--- a/mesalib/src/mesa/state_tracker/st_format.h
+++ b/mesalib/src/mesa/state_tracker/st_format.h
@@ -70,10 +70,6 @@ size_t
st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target,
GLenum internalFormat, int samples[16]);
-/* can we use a sampler view to translate these formats
- only used to make TFP so far */
-extern GLboolean
-st_sampler_compat_formats(enum pipe_format format1, enum pipe_format format2);
extern void
diff --git a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
index 8ce2e06a2..e5512af2a 100644
--- a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
@@ -172,6 +172,7 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
oldTex->height0,
oldTex->depth0,
oldTex->array_size,
+ 0,
oldTex->bind);
/* This will copy the old texture's base image into the new texture
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 338c652cb..f8176eb77 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1945,8 +1945,6 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
if (ir->type->base_type == GLSL_TYPE_BOOL) {
emit(ir, TGSI_OPCODE_USNE, result_dst, cbuf, st_src_reg_for_int(0));
- result_src.negate = 1;
- emit(ir, TGSI_OPCODE_UCMP, result_dst, result_src, st_src_reg_for_int(~0), st_src_reg_for_int(0));
} else {
emit(ir, TGSI_OPCODE_MOV, result_dst, cbuf);
}
@@ -1969,7 +1967,17 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
case ir_unop_unpack_snorm_4x8:
case ir_unop_unpack_unorm_4x8:
case ir_binop_pack_half_2x16_split:
+ case ir_unop_bitfield_reverse:
+ case ir_unop_bit_count:
+ case ir_unop_find_msb:
+ case ir_unop_find_lsb:
+ case ir_binop_bfm:
+ case ir_triop_bfi:
+ case ir_triop_bitfield_extract:
+ case ir_quadop_bitfield_insert:
case ir_quadop_vector:
+ case ir_binop_vector_extract:
+ case ir_triop_vector_insert:
/* This operation is not supported, or should have already been handled.
*/
assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()");
@@ -2388,8 +2396,8 @@ glsl_to_tgsi_visitor::visit(ir_assignment *ir)
if (native_integers) {
/* This is necessary because TGSI's CMP instruction expects the
* condition to be a float, and we store booleans as integers.
- * If TGSI had a UCMP instruction or similar, this extra
- * instruction would not be necessary.
+ * TODO: really want to avoid i2f path and use UCMP. Requires
+ * changes to process_move_condition though too.
*/
condition_temp = get_temp(glsl_type::vec4_type);
condition.negate = 0;
@@ -2683,7 +2691,7 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
void
glsl_to_tgsi_visitor::visit(ir_texture *ir)
{
- st_src_reg result_src, coord, cube_sc, lod_info, projector, dx, dy, offset;
+ st_src_reg result_src, coord, cube_sc, lod_info, projector, dx, dy, offset, sample_index;
st_dst_reg result_dst, coord_dst, cube_sc_dst;
glsl_to_tgsi_instruction *inst = NULL;
unsigned opcode = TGSI_OPCODE_NOP;
@@ -2706,6 +2714,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
*/
coord = get_temp(glsl_type::vec4_type);
coord_dst = st_dst_reg(coord);
+ coord_dst.writemask = (1 << ir->coordinate->type->vector_elements) - 1;
emit(ir, TGSI_OPCODE_MOV, coord_dst, this->result);
}
@@ -2772,7 +2781,9 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
}
break;
case ir_txf_ms:
- assert(!"Unexpected ir_txf_ms opcode");
+ opcode = TGSI_OPCODE_TXF;
+ ir->lod_info.sample_index->accept(this);
+ sample_index = this->result;
break;
case ir_lod:
assert(!"Unexpected ir_lod opcode");
@@ -2859,7 +2870,11 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
}
}
- if (opcode == TGSI_OPCODE_TXL || opcode == TGSI_OPCODE_TXB ||
+ if (ir->op == ir_txf_ms) {
+ coord_dst.writemask = WRITEMASK_W;
+ emit(ir, TGSI_OPCODE_MOV, coord_dst, sample_index);
+ coord_dst.writemask = WRITEMASK_XYZW;
+ } else if (opcode == TGSI_OPCODE_TXL || opcode == TGSI_OPCODE_TXB ||
opcode == TGSI_OPCODE_TXF) {
/* TGSI stores LOD or LOD bias in the last channel of the coords. */
coord_dst.writemask = WRITEMASK_W;
@@ -2921,6 +2936,10 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
case GLSL_SAMPLER_DIM_EXTERNAL:
inst->tex_target = TEXTURE_EXTERNAL_INDEX;
break;
+ case GLSL_SAMPLER_DIM_MS:
+ inst->tex_target = (sampler_type->sampler_array)
+ ? TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX : TEXTURE_2D_MULTISAMPLE_INDEX;
+ break;
default:
assert(!"Should not get here.");
}
@@ -2967,12 +2986,15 @@ glsl_to_tgsi_visitor::visit(ir_discard *ir)
void
glsl_to_tgsi_visitor::visit(ir_if *ir)
{
+ unsigned if_opcode;
glsl_to_tgsi_instruction *if_inst;
ir->condition->accept(this);
assert(this->result.file != PROGRAM_UNDEFINED);
- if_inst = emit(ir->condition, TGSI_OPCODE_IF, undef_dst, this->result);
+ if_opcode = native_integers ? TGSI_OPCODE_UIF : TGSI_OPCODE_IF;
+
+ if_inst = emit(ir->condition, if_opcode, undef_dst, this->result);
this->instructions.push_tail(if_inst);
@@ -3451,6 +3473,7 @@ glsl_to_tgsi_visitor::copy_propagate(void)
break;
case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_UIF:
++level;
break;
@@ -3529,6 +3552,8 @@ glsl_to_tgsi_visitor::copy_propagate(void)
/* If this is a copy, add it to the ACP. */
if (inst->op == TGSI_OPCODE_MOV &&
inst->dst.file == PROGRAM_TEMPORARY &&
+ !(inst->dst.file == inst->src[0].file &&
+ inst->dst.index == inst->src[0].index) &&
!inst->dst.reladdr &&
!inst->saturate &&
!inst->src[0].reladdr &&
@@ -3653,6 +3678,7 @@ glsl_to_tgsi_visitor::eliminate_dead_code_advanced(void)
break;
case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_UIF:
++level;
/* fallthrough to default case to mark the condition as read */
@@ -4378,6 +4404,7 @@ compile_tgsi_instruction(struct st_translate *t,
case TGSI_OPCODE_ELSE:
case TGSI_OPCODE_ENDLOOP:
case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_UIF:
assert(num_dst == 0);
ureg_label_insn(ureg,
inst->op,
@@ -4903,7 +4930,7 @@ st_translate_program(
assert(i == program->num_immediates);
/* texture samplers */
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+ for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) {
if (program->samplers_used & (1 << i)) {
t->samplers[i] = ureg_DECL_sampler(ureg, i);
}
@@ -5216,6 +5243,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
lower_ubo_reference(prog->_LinkedShaders[i], ir);
do_vec_index_to_cond_assign(ir);
+ lower_vector_insert(ir, true);
lower_quadop_vector(ir, false);
lower_noise(ir);
if (options->MaxIfDepth == 0) {
@@ -5228,7 +5256,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress;
progress = do_common_optimization(ir, true, true,
- options->MaxUnrollIterations)
+ options->MaxUnrollIterations, options)
|| progress;
progress = lower_if_to_cond_assign(ir, options->MaxIfDepth) || progress;
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index 03e086a72..9e537f3c4 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -28,7 +28,6 @@
#include "main/mtypes.h"
#include "main/context.h"
-#include "main/mfeatures.h"
#include "main/texobj.h"
#include "main/teximage.h"
#include "main/texstate.h"
@@ -454,7 +453,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
struct pipe_fence_handle **fence)
{
struct st_context *st = (struct st_context *) stctxi;
- enum pipe_flush_flags pipe_flags = 0;
+ unsigned pipe_flags = 0;
if (flags & ST_FLUSH_END_OF_FRAME) {
pipe_flags |= PIPE_FLUSH_END_OF_FRAME;
@@ -468,7 +467,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
static boolean
st_context_teximage(struct st_context_iface *stctxi,
enum st_texture_type tex_type,
- int level, enum pipe_format internal_format,
+ int level, enum pipe_format pipe_format,
struct pipe_resource *tex, boolean mipmap)
{
struct st_context *st = (struct st_context *) stctxi;
@@ -512,29 +511,13 @@ st_context_teximage(struct st_context_iface *stctxi,
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
stImage = st_texture_image(texImage);
if (tex) {
- gl_format texFormat;
-
- /*
- * XXX When internal_format and tex->format differ, st_finalize_texture
- * needs to allocate a new texture with internal_format and copy the
- * texture here into the new one. It will result in surface_copy being
- * called on surfaces whose formats differ.
- *
- * To avoid that, internal_format is (wrongly) ignored here. A sane fix
- * is to use a sampler view.
- */
- if (!st_sampler_compat_formats(tex->format, internal_format))
- internal_format = tex->format;
-
- if (util_format_get_component_bits(internal_format,
- UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
+ gl_format texFormat = st_pipe_format_to_mesa_format(pipe_format);
+
+ if (util_format_has_alpha(tex->format))
internalFormat = GL_RGBA;
else
internalFormat = GL_RGB;
- texFormat = st_ChooseTextureFormat(ctx, target, internalFormat,
- GL_BGRA, GL_UNSIGNED_BYTE);
-
_mesa_init_teximage_fields(ctx, texImage,
tex->width0, tex->height0, 1, 0,
internalFormat, texFormat);
@@ -563,6 +546,7 @@ st_context_teximage(struct st_context_iface *stctxi,
stObj->width0 = width;
stObj->height0 = height;
stObj->depth0 = depth;
+ stObj->surface_format = pipe_format;
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
_mesa_unlock_texture(ctx, texObj);
@@ -884,16 +868,10 @@ st_manager_add_color_renderbuffer(struct st_context *st,
static const struct st_api st_gl_api = {
"Mesa " PACKAGE_VERSION,
ST_API_OPENGL,
-#if FEATURE_GL
ST_PROFILE_DEFAULT_MASK |
ST_PROFILE_OPENGL_CORE_MASK |
-#endif
-#if FEATURE_ES1
ST_PROFILE_OPENGL_ES1_MASK |
-#endif
-#if FEATURE_ES2
ST_PROFILE_OPENGL_ES2_MASK |
-#endif
0,
ST_API_FEATURE_MS_VISUALS_MASK,
st_api_destroy,
diff --git a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 3831a0a79..dd9f4fc53 100644
--- a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -269,6 +269,8 @@ st_translate_texture_target( GLuint textarget,
}
switch( textarget ) {
+ case TEXTURE_2D_MULTISAMPLE_INDEX: return TGSI_TEXTURE_2D_MSAA;
+ case TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX: return TGSI_TEXTURE_2D_ARRAY_MSAA;
case TEXTURE_BUFFER_INDEX: return TGSI_TEXTURE_BUFFER;
case TEXTURE_1D_INDEX: return TGSI_TEXTURE_1D;
case TEXTURE_2D_INDEX: return TGSI_TEXTURE_2D;
@@ -554,8 +556,6 @@ translate_opcode( unsigned op )
return TGSI_OPCODE_DDY;
case OPCODE_DP2:
return TGSI_OPCODE_DP2;
- case OPCODE_DP2A:
- return TGSI_OPCODE_DP2A;
case OPCODE_DP3:
return TGSI_OPCODE_DP3;
case OPCODE_DP4:
@@ -608,10 +608,6 @@ translate_opcode( unsigned op )
return TGSI_OPCODE_MUL;
case OPCODE_NOP:
return TGSI_OPCODE_NOP;
- case OPCODE_NRM3:
- return TGSI_OPCODE_NRM;
- case OPCODE_NRM4:
- return TGSI_OPCODE_NRM4;
case OPCODE_POW:
return TGSI_OPCODE_POW;
case OPCODE_RCP:
@@ -663,6 +659,7 @@ translate_opcode( unsigned op )
static void
compile_instruction(
+ struct gl_context *ctx,
struct st_translate *t,
const struct prog_instruction *inst,
boolean clamp_dst_color_output)
@@ -695,7 +692,6 @@ compile_instruction(
case OPCODE_CAL:
case OPCODE_ELSE:
case OPCODE_ENDLOOP:
- case OPCODE_IF:
debug_assert(num_dst == 0);
ureg_label_insn( ureg,
translate_opcode( inst->Opcode ),
@@ -703,6 +699,14 @@ compile_instruction(
get_label( t, inst->BranchTarget ));
return;
+ case OPCODE_IF:
+ debug_assert(num_dst == 0);
+ ureg_label_insn( ureg,
+ ctx->Const.NativeIntegers ? TGSI_OPCODE_UIF : TGSI_OPCODE_IF,
+ src, num_src,
+ get_label( t, inst->BranchTarget ));
+ return;
+
case OPCODE_TEX:
case OPCODE_TXB:
case OPCODE_TXD:
@@ -1217,7 +1221,7 @@ st_translate_mesa_program(
}
/* texture samplers */
- for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+ for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) {
if (program->SamplersUsed & (1 << i)) {
t->samplers[i] = ureg_DECL_sampler( ureg, i );
}
@@ -1227,7 +1231,7 @@ st_translate_mesa_program(
*/
for (i = 0; i < program->NumInstructions; i++) {
set_insn_start( t, ureg_get_instruction_number( ureg ));
- compile_instruction( t, &program->Instructions[i], clamp_color );
+ compile_instruction( ctx, t, &program->Instructions[i], clamp_color );
}
/* Fix up all emitted labels:
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index 7a38da84f..60cc37cf8 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/src/mesa/state_tracker/st_program.c
@@ -33,7 +33,6 @@
#include "main/imports.h"
#include "main/hash.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "program/prog_parameter.h"
#include "program/prog_print.h"
diff --git a/mesalib/src/mesa/state_tracker/st_texture.c b/mesalib/src/mesa/state_tracker/st_texture.c
index ed3709848..9a271826e 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_texture.c
@@ -60,6 +60,7 @@ st_texture_create(struct st_context *st,
GLuint height0,
GLuint depth0,
GLuint layers,
+ GLuint nr_samples,
GLuint bind )
{
struct pipe_resource pt, *newtex;
@@ -90,6 +91,7 @@ st_texture_create(struct st_context *st,
pt.usage = PIPE_USAGE_DEFAULT;
pt.bind = bind;
pt.flags = 0;
+ pt.nr_samples = nr_samples;
newtex = screen->resource_create(screen, &pt);
@@ -138,6 +140,8 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture,
case GL_TEXTURE_RECTANGLE:
case GL_PROXY_TEXTURE_RECTANGLE:
case GL_TEXTURE_EXTERNAL_OES:
+ case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
+ case GL_TEXTURE_2D_MULTISAMPLE:
assert(depthIn == 1);
*widthOut = widthIn;
*heightOut = heightIn;
@@ -159,7 +163,9 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture,
*layersOut = 6;
break;
case GL_TEXTURE_2D_ARRAY:
+ case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
case GL_PROXY_TEXTURE_2D_ARRAY:
+ case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:
*widthOut = widthIn;
*heightOut = heightIn;
*depthOut = 1;
@@ -402,7 +408,7 @@ st_create_color_map_texture(struct gl_context *ctx)
/* create texture for color map/table */
pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0,
- texSize, texSize, 1, 1, PIPE_BIND_SAMPLER_VIEW);
+ texSize, texSize, 1, 1, 0, PIPE_BIND_SAMPLER_VIEW);
return pt;
}
diff --git a/mesalib/src/mesa/state_tracker/st_texture.h b/mesalib/src/mesa/state_tracker/st_texture.h
index 8a701009a..c15aeaea6 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.h
+++ b/mesalib/src/mesa/state_tracker/st_texture.h
@@ -87,10 +87,16 @@ struct st_texture_object
*/
struct pipe_sampler_view *sampler_view;
- /* True if there is/was a surface bound to this texture object. It helps
- * track whether the texture object is surface based or not.
+ /* True if this texture comes from the window system. Such a texture
+ * cannot be reallocated and the format can only be changed with a sampler
+ * view or a surface.
*/
GLboolean surface_based;
+
+ /* If surface_based is true, this format should be used for all sampler
+ * views and surfaces instead of pt->format.
+ */
+ enum pipe_format surface_format;
};
@@ -153,6 +159,7 @@ st_texture_create(struct st_context *st,
GLuint height0,
GLuint depth0,
GLuint layers,
+ GLuint nr_samples,
GLuint tex_usage );
diff --git a/mesalib/src/mesa/swrast/s_aaline.c b/mesalib/src/mesa/swrast/s_aaline.c
index dcc9e3a5c..6729c53fc 100644
--- a/mesalib/src/mesa/swrast/s_aaline.c
+++ b/mesalib/src/mesa/swrast/s_aaline.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_aaline.h b/mesalib/src/mesa/swrast/s_aaline.h
index 74d5518e1..8ff1d7da3 100644
--- a/mesalib/src/mesa/swrast/s_aaline.h
+++ b/mesalib/src/mesa/swrast/s_aaline.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_aalinetemp.h b/mesalib/src/mesa/swrast/s_aalinetemp.h
index 75e28f417..26efaa3e2 100644
--- a/mesalib/src/mesa/swrast/s_aalinetemp.h
+++ b/mesalib/src/mesa/swrast/s_aalinetemp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_aatriangle.c b/mesalib/src/mesa/swrast/s_aatriangle.c
index b59177fa7..02d49b9bd 100644
--- a/mesalib/src/mesa/swrast/s_aatriangle.c
+++ b/mesalib/src/mesa/swrast/s_aatriangle.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_aatriangle.h b/mesalib/src/mesa/swrast/s_aatriangle.h
index e40efb198..b5df414d9 100644
--- a/mesalib/src/mesa/swrast/s_aatriangle.h
+++ b/mesalib/src/mesa/swrast/s_aatriangle.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_aatritemp.h b/mesalib/src/mesa/swrast/s_aatritemp.h
index 4581248fd..a400364d3 100644
--- a/mesalib/src/mesa/swrast/s_aatritemp.h
+++ b/mesalib/src/mesa/swrast/s_aatritemp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_alpha.c b/mesalib/src/mesa/swrast/s_alpha.c
index 1ceda531c..3f12552fd 100644
--- a/mesalib/src/mesa/swrast/s_alpha.c
+++ b/mesalib/src/mesa/swrast/s_alpha.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/swrast/s_alpha.h b/mesalib/src/mesa/swrast/s_alpha.h
index fca209a44..6c8728daa 100644
--- a/mesalib/src/mesa/swrast/s_alpha.h
+++ b/mesalib/src/mesa/swrast/s_alpha.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_bitmap.c b/mesalib/src/mesa/swrast/s_bitmap.c
index 3a2792913..6d397da86 100644
--- a/mesalib/src/mesa/swrast/s_bitmap.c
+++ b/mesalib/src/mesa/swrast/s_bitmap.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/swrast/s_blend.c b/mesalib/src/mesa/swrast/s_blend.c
index 54fffbb45..4423d5b17 100644
--- a/mesalib/src/mesa/swrast/s_blend.c
+++ b/mesalib/src/mesa/swrast/s_blend.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_blend.h b/mesalib/src/mesa/swrast/s_blend.h
index 69cd89e7a..32f921352 100644
--- a/mesalib/src/mesa/swrast/s_blend.h
+++ b/mesalib/src/mesa/swrast/s_blend.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_blit.c b/mesalib/src/mesa/swrast/s_blit.c
index 051354dc8..0c8cfe551 100644
--- a/mesalib/src/mesa/swrast/s_blit.c
+++ b/mesalib/src/mesa/swrast/s_blit.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -188,6 +189,12 @@ blit_nearest(struct gl_context *ctx,
return;
}
+ /* allocate the src/dst row buffers */
+ srcBuffer = malloc(MAX_PIXEL_BYTES * srcWidth);
+ dstBuffer = malloc(MAX_PIXEL_BYTES * dstWidth);
+ if (!srcBuffer || !dstBuffer)
+ goto fail_no_memory;
+
/* Blit to all the draw buffers */
for (i = 0; i < numDrawBuffers; i++) {
if (buffer == GL_COLOR_BUFFER_BIT) {
@@ -229,7 +236,7 @@ blit_nearest(struct gl_context *ctx,
default:
_mesa_problem(ctx, "unexpected pixel size (%d) in blit_nearest",
pixelSize);
- return;
+ goto fail;
}
if ((readRb == drawRb) ||
@@ -248,8 +255,7 @@ blit_nearest(struct gl_context *ctx,
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
&map, &rowStride);
if (!map) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
- return;
+ goto fail_no_memory;
}
srcMap = map + srcYpos * rowStride + srcXpos * formatSize;
@@ -276,8 +282,7 @@ blit_nearest(struct gl_context *ctx,
srcWidth, srcHeight,
GL_MAP_READ_BIT, &srcMap, &srcRowStride);
if (!srcMap) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
- return;
+ goto fail_no_memory;
}
ctx->Driver.MapRenderbuffer(ctx, drawRb,
dstXpos, dstYpos,
@@ -285,24 +290,10 @@ blit_nearest(struct gl_context *ctx,
GL_MAP_WRITE_BIT, &dstMap, &dstRowStride);
if (!dstMap) {
ctx->Driver.UnmapRenderbuffer(ctx, readRb);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
- return;
+ goto fail_no_memory;
}
}
- /* allocate the src/dst row buffers */
- srcBuffer = malloc(pixelSize * srcWidth);
- if (!srcBuffer) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT");
- return;
- }
- dstBuffer = malloc(pixelSize * dstWidth);
- if (!dstBuffer) {
- free(srcBuffer);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT");
- return;
- }
-
for (dstRow = 0; dstRow < dstHeight; dstRow++) {
GLfloat srcRowF = (dstRow + 0.5F) / dstHeight * srcHeight - 0.5F;
GLint srcRow = IROUND(srcRowF);
@@ -369,14 +360,21 @@ blit_nearest(struct gl_context *ctx,
}
}
- free(srcBuffer);
- free(dstBuffer);
-
ctx->Driver.UnmapRenderbuffer(ctx, readRb);
if (drawRb != readRb) {
ctx->Driver.UnmapRenderbuffer(ctx, drawRb);
}
}
+
+fail:
+ free(srcBuffer);
+ free(dstBuffer);
+ return;
+
+fail_no_memory:
+ free(srcBuffer);
+ free(dstBuffer);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBuffer");
}
@@ -564,22 +562,10 @@ blit_linear(struct gl_context *ctx,
* Keep two adjacent src rows around for bilinear sampling.
*/
srcBuffer0 = malloc(pixelSize * srcWidth);
- if (!srcBuffer0) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT");
- return;
- }
srcBuffer1 = malloc(pixelSize * srcWidth);
- if (!srcBuffer1) {
- free(srcBuffer0);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT");
- return;
- }
dstBuffer = malloc(pixelSize * dstWidth);
- if (!dstBuffer) {
- free(srcBuffer0);
- free(srcBuffer1);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT");
- return;
+ if (!srcBuffer0 || !srcBuffer1 || !dstBuffer) {
+ goto fail_no_memory;
}
for (i = 0; i < drawFb->_NumColorDrawBuffers; i++) {
@@ -610,11 +596,7 @@ blit_linear(struct gl_context *ctx,
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
&srcMap, &srcRowStride);
if (!srcMap) {
- free(srcBuffer0);
- free(srcBuffer1);
- free(dstBuffer);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
- return;
+ goto fail_no_memory;
}
dstMap = srcMap;
@@ -629,22 +611,14 @@ blit_linear(struct gl_context *ctx,
0, 0, readRb->Width, readRb->Height,
GL_MAP_READ_BIT, &srcMap, &srcRowStride);
if (!srcMap) {
- free(srcBuffer0);
- free(srcBuffer1);
- free(dstBuffer);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
- return;
+ goto fail_no_memory;
}
ctx->Driver.MapRenderbuffer(ctx, drawRb,
0, 0, drawRb->Width, drawRb->Height,
GL_MAP_WRITE_BIT, &dstMap, &dstRowStride);
if (!dstMap) {
ctx->Driver.UnmapRenderbuffer(ctx, readRb);
- free(srcBuffer0);
- free(srcBuffer1);
- free(dstBuffer);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
- return;
+ goto fail_no_memory;
}
}
@@ -734,15 +708,22 @@ blit_linear(struct gl_context *ctx,
}
}
- free(srcBuffer0);
- free(srcBuffer1);
- free(dstBuffer);
-
ctx->Driver.UnmapRenderbuffer(ctx, readRb);
if (drawRb != readRb) {
ctx->Driver.UnmapRenderbuffer(ctx, drawRb);
}
}
+
+ free(srcBuffer0);
+ free(srcBuffer1);
+ free(dstBuffer);
+ return;
+
+fail_no_memory:
+ free(srcBuffer0);
+ free(srcBuffer1);
+ free(dstBuffer);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
}
diff --git a/mesalib/src/mesa/swrast/s_chan.h b/mesalib/src/mesa/swrast/s_chan.h
index 1db7fae4d..38daf6575 100644
--- a/mesalib/src/mesa/swrast/s_chan.h
+++ b/mesalib/src/mesa/swrast/s_chan.h
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
/**
diff --git a/mesalib/src/mesa/swrast/s_clear.c b/mesalib/src/mesa/swrast/s_clear.c
index d942e6e63..58b36e8a2 100644
--- a/mesalib/src/mesa/swrast/s_clear.c
+++ b/mesalib/src/mesa/swrast/s_clear.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index 11e906436..70bbb83dc 100644
--- a/mesalib/src/mesa/swrast/s_context.c
+++ b/mesalib/src/mesa/swrast/s_context.c
@@ -17,13 +17,13 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
- * Brian Paul
+ * Keith Whitwell <keith@tungstengraphics.com> Brian Paul
*/
#include "main/imports.h"
@@ -459,7 +459,7 @@ _swrast_invalidate_state( struct gl_context *ctx, GLbitfield new_state )
swrast->BlendFunc = _swrast_validate_blend_func;
if (new_state & _SWRAST_NEW_TEXTURE_SAMPLE_FUNC)
- for (i = 0 ; i < ctx->Const.MaxTextureImageUnits ; i++)
+ for (i = 0 ; i < ARRAY_SIZE(swrast->TextureSample); i++)
swrast->TextureSample[i] = NULL;
}
@@ -473,7 +473,7 @@ _swrast_update_texture_samplers(struct gl_context *ctx)
if (!swrast)
return; /* pipe hack */
- for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) {
+ for (u = 0; u < ARRAY_SIZE(swrast->TextureSample); u++) {
struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current;
/* Note: If tObj is NULL, the sample function will be a simple
* function that just returns opaque black (0,0,0,1).
@@ -766,7 +766,7 @@ _swrast_CreateContext( struct gl_context *ctx )
swrast->Driver.SpanRenderStart = _swrast_span_render_start;
swrast->Driver.SpanRenderFinish = _swrast_span_render_finish;
- for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
+ for (i = 0; i < ARRAY_SIZE(swrast->TextureSample); i++)
swrast->TextureSample[i] = NULL;
/* SpanArrays is global and shared by all SWspan instances. However, when
diff --git a/mesalib/src/mesa/swrast/s_context.h b/mesalib/src/mesa/swrast/s_context.h
index 2f7a2b531..9520185b2 100644
--- a/mesalib/src/mesa/swrast/s_context.h
+++ b/mesalib/src/mesa/swrast/s_context.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -137,11 +138,24 @@ struct swrast_texture_image
/** used for mipmap LOD computation */
GLfloat WidthScale, HeightScale, DepthScale;
- /** These fields only valid when texture memory is mapped */
- GLint RowStride; /**< Padded width in units of texels */
- GLuint *ImageOffsets; /**< if 3D texture: array [Depth] of offsets to
- each 2D slice in 'Data', in texels */
- GLubyte *Map; /**< Pointer to mapped image memory */
+ /**
+ * Byte stride between rows in ImageSlices.
+ *
+ * For compressed textures, this is the byte stride between one row of
+ * blocks and the next row of blocks.
+ *
+ * Only valid while one of the ImageSlices is mapped, and must be the same
+ * between all slices.
+ */
+ GLint RowStride;
+ /**
+ * When a texture image is mapped for swrast, this array contains pointers
+ * to the beginning of each slice.
+ *
+ * For swrast-allocated textures, these pointers will always stay
+ * initialized to point within Buffer.
+ */
+ void **ImageSlices;
/** Malloc'd texture memory */
GLubyte *Buffer;
@@ -299,7 +313,7 @@ typedef struct
/** Internal hooks, kept up to date by the same mechanism as above.
*/
blend_func BlendFunc;
- texture_sample_func TextureSample[MAX_TEXTURE_IMAGE_UNITS];
+ texture_sample_func TextureSample[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
/** Buffer for saving the sampled texture colors.
* Needed for GL_ARB_texture_env_crossbar implementation.
@@ -379,6 +393,9 @@ _swrast_map_textures(struct gl_context *ctx);
extern void
_swrast_unmap_textures(struct gl_context *ctx);
+extern unsigned int
+_swrast_teximage_slice_height(struct gl_texture_image *texImage);
+
extern void
_swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj);
diff --git a/mesalib/src/mesa/swrast/s_copypix.c b/mesalib/src/mesa/swrast/s_copypix.c
index 1d8926179..57bdce0d2 100644
--- a/mesalib/src/mesa/swrast/s_copypix.c
+++ b/mesalib/src/mesa/swrast/s_copypix.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_depth.c b/mesalib/src/mesa/swrast/s_depth.c
index 969b75f07..4d2a6bd36 100644
--- a/mesalib/src/mesa/swrast/s_depth.c
+++ b/mesalib/src/mesa/swrast/s_depth.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_depth.h b/mesalib/src/mesa/swrast/s_depth.h
index 25a7a0bbf..987c7af2b 100644
--- a/mesalib/src/mesa/swrast/s_depth.h
+++ b/mesalib/src/mesa/swrast/s_depth.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c
index 3d23f912f..41b50ab71 100644
--- a/mesalib/src/mesa/swrast/s_drawpix.c
+++ b/mesalib/src/mesa/swrast/s_drawpix.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_feedback.c b/mesalib/src/mesa/swrast/s_feedback.c
index 00467e54f..67d84753e 100644
--- a/mesalib/src/mesa/swrast/s_feedback.c
+++ b/mesalib/src/mesa/swrast/s_feedback.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
diff --git a/mesalib/src/mesa/swrast/s_feedback.h b/mesalib/src/mesa/swrast/s_feedback.h
index 6bfd49735..62b9a38d6 100644
--- a/mesalib/src/mesa/swrast/s_feedback.h
+++ b/mesalib/src/mesa/swrast/s_feedback.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_fog.c b/mesalib/src/mesa/swrast/s_fog.c
index 57a6a8e61..1a2ef1d50 100644
--- a/mesalib/src/mesa/swrast/s_fog.c
+++ b/mesalib/src/mesa/swrast/s_fog.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_fog.h b/mesalib/src/mesa/swrast/s_fog.h
index 9f93b7050..d4d31e4f5 100644
--- a/mesalib/src/mesa/swrast/s_fog.h
+++ b/mesalib/src/mesa/swrast/s_fog.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_fragprog.c b/mesalib/src/mesa/swrast/s_fragprog.c
index 1ce2ee452..e7e1b8582 100644
--- a/mesalib/src/mesa/swrast/s_fragprog.c
+++ b/mesalib/src/mesa/swrast/s_fragprog.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
diff --git a/mesalib/src/mesa/swrast/s_fragprog.h b/mesalib/src/mesa/swrast/s_fragprog.h
index ac1f5ff4c..0522c6c7f 100644
--- a/mesalib/src/mesa/swrast/s_fragprog.h
+++ b/mesalib/src/mesa/swrast/s_fragprog.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_lines.c b/mesalib/src/mesa/swrast/s_lines.c
index 7364dd965..72c41369b 100644
--- a/mesalib/src/mesa/swrast/s_lines.c
+++ b/mesalib/src/mesa/swrast/s_lines.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_lines.h b/mesalib/src/mesa/swrast/s_lines.h
index a4c98a855..3d4453eb8 100644
--- a/mesalib/src/mesa/swrast/s_lines.h
+++ b/mesalib/src/mesa/swrast/s_lines.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_linetemp.h b/mesalib/src/mesa/swrast/s_linetemp.h
index 8feb8b120..f3ce6d95e 100644
--- a/mesalib/src/mesa/swrast/s_linetemp.h
+++ b/mesalib/src/mesa/swrast/s_linetemp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_logic.c b/mesalib/src/mesa/swrast/s_logic.c
index 93388d720..a111f6337 100644
--- a/mesalib/src/mesa/swrast/s_logic.c
+++ b/mesalib/src/mesa/swrast/s_logic.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_logic.h b/mesalib/src/mesa/swrast/s_logic.h
index 0a3adfca5..b5e11fbf8 100644
--- a/mesalib/src/mesa/swrast/s_logic.h
+++ b/mesalib/src/mesa/swrast/s_logic.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_masking.c b/mesalib/src/mesa/swrast/s_masking.c
index 8f5344650..d9d06b45b 100644
--- a/mesalib/src/mesa/swrast/s_masking.c
+++ b/mesalib/src/mesa/swrast/s_masking.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_masking.h b/mesalib/src/mesa/swrast/s_masking.h
index 5124509a0..0aa0755d1 100644
--- a/mesalib/src/mesa/swrast/s_masking.h
+++ b/mesalib/src/mesa/swrast/s_masking.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_points.c b/mesalib/src/mesa/swrast/s_points.c
index 80693be8e..7483a7716 100644
--- a/mesalib/src/mesa/swrast/s_points.c
+++ b/mesalib/src/mesa/swrast/s_points.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_points.h b/mesalib/src/mesa/swrast/s_points.h
index 0b6550e80..e356f063b 100644
--- a/mesalib/src/mesa/swrast/s_points.h
+++ b/mesalib/src/mesa/swrast/s_points.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.c b/mesalib/src/mesa/swrast/s_renderbuffer.c
index 282b2c482..54b645e78 100644
--- a/mesalib/src/mesa/swrast/s_renderbuffer.c
+++ b/mesalib/src/mesa/swrast/s_renderbuffer.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.h b/mesalib/src/mesa/swrast/s_renderbuffer.h
index 266ebd934..45c57fffd 100644
--- a/mesalib/src/mesa/swrast/s_renderbuffer.h
+++ b/mesalib/src/mesa/swrast/s_renderbuffer.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_span.c b/mesalib/src/mesa/swrast/s_span.c
index 7bb3b1f2b..cb755f9eb 100644
--- a/mesalib/src/mesa/swrast/s_span.c
+++ b/mesalib/src/mesa/swrast/s_span.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_span.h b/mesalib/src/mesa/swrast/s_span.h
index 6f710c533..0a5a6dc6c 100644
--- a/mesalib/src/mesa/swrast/s_span.h
+++ b/mesalib/src/mesa/swrast/s_span.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_stencil.c b/mesalib/src/mesa/swrast/s_stencil.c
index 3423737ee..a63a773cf 100644
--- a/mesalib/src/mesa/swrast/s_stencil.c
+++ b/mesalib/src/mesa/swrast/s_stencil.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -28,6 +29,8 @@
#include "main/imports.h"
#include "main/format_pack.h"
#include "main/format_unpack.h"
+#include "main/core.h"
+#include "main/stencil.h"
#include "s_context.h"
#include "s_depth.h"
@@ -128,7 +131,7 @@ apply_stencil_op(const struct gl_context *ctx, GLenum oper, GLuint face,
GLuint n, GLubyte stencil[], const GLubyte mask[],
GLint stride)
{
- const GLubyte ref = ctx->Stencil.Ref[face];
+ const GLubyte ref = _mesa_get_stencil_ref(ctx, face);
const GLubyte wrtmask = ctx->Stencil.WriteMask[face];
const GLubyte invmask = (GLubyte) (~wrtmask);
GLuint i, j;
@@ -215,7 +218,7 @@ do_stencil_test(struct gl_context *ctx, GLuint face, GLuint n,
GLboolean allfail = GL_FALSE;
GLuint i, j;
const GLuint valueMask = ctx->Stencil.ValueMask[face];
- const GLubyte ref = (GLubyte) (ctx->Stencil.Ref[face] & valueMask);
+ const GLubyte ref = (GLubyte) (_mesa_get_stencil_ref(ctx, face) & valueMask);
GLubyte s;
/*
diff --git a/mesalib/src/mesa/swrast/s_stencil.h b/mesalib/src/mesa/swrast/s_stencil.h
index 113649a37..c92f0af3e 100644
--- a/mesalib/src/mesa/swrast/s_stencil.h
+++ b/mesalib/src/mesa/swrast/s_stencil.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c
index c24807cb7..df3a74a06 100644
--- a/mesalib/src/mesa/swrast/s_texcombine.c
+++ b/mesalib/src/mesa/swrast/s_texcombine.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -611,7 +612,7 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
* thread.
*/
swrast->TexelBuffer =
- malloc(ctx->Const.MaxTextureImageUnits * maxThreads *
+ malloc(ctx->Const.FragmentProgram.MaxTextureImageUnits * maxThreads *
SWRAST_MAX_WIDTH * 4 * sizeof(GLfloat));
if (!swrast->TexelBuffer) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine");
diff --git a/mesalib/src/mesa/swrast/s_texcombine.h b/mesalib/src/mesa/swrast/s_texcombine.h
index 11049d86b..dd9151de2 100644
--- a/mesalib/src/mesa/swrast/s_texcombine.h
+++ b/mesalib/src/mesa/swrast/s_texcombine.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_texfetch.c b/mesalib/src/mesa/swrast/s_texfetch.c
index 5e1a9f783..f6c269d8b 100644
--- a/mesalib/src/mesa/swrast/s_texfetch.c
+++ b/mesalib/src/mesa/swrast/s_texfetch.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -97,10 +98,17 @@ static void
fetch_compressed(const struct swrast_texture_image *swImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
- swImage->FetchCompressedTexel(swImage->Map,
- swImage->ImageOffsets,
- swImage->RowStride,
- i, j, k, texel);
+ /* The FetchCompressedTexel function takes an integer pixel rowstride,
+ * while the image's rowstride is bytes per row of blocks.
+ */
+ GLuint bw, bh;
+ GLuint texelBytes = _mesa_get_format_bytes(swImage->Base.TexFormat);
+ _mesa_get_format_block_size(swImage->Base.TexFormat, &bw, &bh);
+ assert(swImage->RowStride * bw % texelBytes == 0);
+
+ swImage->FetchCompressedTexel(swImage->ImageSlices[k],
+ swImage->RowStride * bw / texelBytes,
+ i, j, texel);
}
diff --git a/mesalib/src/mesa/swrast/s_texfetch.h b/mesalib/src/mesa/swrast/s_texfetch.h
index 4e4397e13..dd37b066c 100644
--- a/mesalib/src/mesa/swrast/s_texfetch.h
+++ b/mesalib/src/mesa/swrast/s_texfetch.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_texfetch_tmp.h b/mesalib/src/mesa/swrast/s_texfetch_tmp.h
index 2de1f1a97..44fa8170b 100644
--- a/mesalib/src/mesa/swrast/s_texfetch_tmp.h
+++ b/mesalib/src/mesa/swrast/s_texfetch_tmp.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -43,23 +44,24 @@
#if DIM == 1
#define TEXEL_ADDR( type, image, i, j, k, size ) \
- ((void) (j), (void) (k), ((type *)(image)->Map + (i) * (size)))
+ ((void) (j), (void) (k), ((type *)(image)->ImageSlices[0] + (i) * (size)))
#define FETCH(x) fetch_texel_1d_##x
#elif DIM == 2
#define TEXEL_ADDR( type, image, i, j, k, size ) \
- ((void) (k), \
- ((type *)(image)->Map + ((image)->RowStride * (j) + (i)) * (size)))
+ ((void) (k), \
+ ((type *)((GLubyte *) (image)->ImageSlices[0] + (image)->RowStride * (j)) + \
+ (i) * (size)))
#define FETCH(x) fetch_texel_2d_##x
#elif DIM == 3
#define TEXEL_ADDR( type, image, i, j, k, size ) \
- ((type *)(image)->Map + ((image)->ImageOffsets[k] \
- + (image)->RowStride * (j) + (i)) * (size))
+ ((type *)((GLubyte *) (image)->ImageSlices[k] + \
+ (image)->RowStride * (j)) + (i) * (size))
#define FETCH(x) fetch_texel_3d_##x
diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c
index ae3ffe5f4..fba8e6cba 100644
--- a/mesalib/src/mesa/swrast/s_texfilter.c
+++ b/mesalib/src/mesa/swrast/s_texfilter.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -1435,7 +1436,7 @@ opt_sample_rgb_2d(struct gl_context *ctx,
GLint i = IFLOOR(texcoords[k][0] * width) & colMask;
GLint j = IFLOOR(texcoords[k][1] * height) & rowMask;
GLint pos = (j << shift) | i;
- GLubyte *texel = swImg->Map + 3 * pos;
+ GLubyte *texel = (GLubyte *) swImg->ImageSlices[0] + 3 * pos;
rgba[k][RCOMP] = UBYTE_TO_FLOAT(texel[2]);
rgba[k][GCOMP] = UBYTE_TO_FLOAT(texel[1]);
rgba[k][BCOMP] = UBYTE_TO_FLOAT(texel[0]);
@@ -1480,7 +1481,7 @@ opt_sample_rgba_2d(struct gl_context *ctx,
const GLint col = IFLOOR(texcoords[i][0] * width) & colMask;
const GLint row = IFLOOR(texcoords[i][1] * height) & rowMask;
const GLint pos = (row << shift) | col;
- const GLuint texel = *((GLuint *) swImg->Map + pos);
+ const GLuint texel = *((GLuint *) swImg->ImageSlices[0] + pos);
rgba[i][RCOMP] = UBYTE_TO_FLOAT( (texel >> 24) );
rgba[i][GCOMP] = UBYTE_TO_FLOAT( (texel >> 16) & 0xff );
rgba[i][BCOMP] = UBYTE_TO_FLOAT( (texel >> 8) & 0xff );
@@ -1504,7 +1505,9 @@ sample_lambda_2d(struct gl_context *ctx,
const GLboolean repeatNoBorderPOT = (samp->WrapS == GL_REPEAT)
&& (samp->WrapT == GL_REPEAT)
- && (tImg->Border == 0 && (tImg->Width == swImg->RowStride))
+ && (tImg->Border == 0)
+ && (_mesa_format_row_stride(tImg->TexFormat, tImg->Width) ==
+ swImg->RowStride)
&& swImg->_IsPowerOfTwo;
ASSERT(lambda != NULL);
diff --git a/mesalib/src/mesa/swrast/s_texfilter.h b/mesalib/src/mesa/swrast/s_texfilter.h
index 58b57365c..7bfa045a7 100644
--- a/mesalib/src/mesa/swrast/s_texfilter.h
+++ b/mesalib/src/mesa/swrast/s_texfilter.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_texrender.c b/mesalib/src/mesa/swrast/s_texrender.c
index 7b25a7b7d..751d7767b 100644
--- a/mesalib/src/mesa/swrast/s_texrender.c
+++ b/mesalib/src/mesa/swrast/s_texrender.c
@@ -22,37 +22,6 @@ delete_texture_wrapper(struct gl_context *ctx, struct gl_renderbuffer *rb)
free(rb);
}
-
-/**
- * This function creates a renderbuffer object which wraps a texture image.
- * The new renderbuffer is plugged into the given attachment point.
- * This allows rendering into the texture as if it were a renderbuffer.
- */
-static void
-wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
-{
- struct gl_renderbuffer *rb;
- const GLuint name = 0;
-
- ASSERT(att->Type == GL_TEXTURE);
- ASSERT(att->Renderbuffer == NULL);
-
- rb = ctx->Driver.NewRenderbuffer(ctx, name);
- if (!rb) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "wrap_texture");
- return;
- }
-
- /* init base gl_renderbuffer fields */
- _mesa_init_renderbuffer(rb, name);
- /* plug in our texture_renderbuffer-specific functions */
- rb->Delete = delete_texture_wrapper;
- rb->AllocStorage = NULL; /* illegal! */
-
- /* update attachment point */
- _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
-}
-
/**
* Update the renderbuffer wrapper for rendering to a texture.
* For example, update the width, height of the RB based on the texture size,
@@ -69,7 +38,7 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
(void) ctx;
- swImage = swrast_texture_image(_mesa_get_attachment_teximage(att));
+ swImage = swrast_texture_image(rb->TexImage);
assert(swImage);
format = swImage->Base.TexFormat;
@@ -81,25 +50,10 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
zOffset = att->Zoffset;
}
- rb->Width = swImage->Base.Width;
- rb->Height = swImage->Base.Height;
- rb->InternalFormat = swImage->Base.InternalFormat;
- rb->_BaseFormat = _mesa_get_format_base_format(format);
-
/* Want to store linear values, not sRGB */
rb->Format = _mesa_get_srgb_format_linear(format);
-
- /* Set the gl_renderbuffer::Buffer field so that mapping the buffer
- * succeeds.
- */
- if (att->Texture->Target == GL_TEXTURE_3D ||
- att->Texture->Target == GL_TEXTURE_2D_ARRAY_EXT) {
- srb->Buffer = swImage->Buffer +
- swImage->ImageOffsets[zOffset] * _mesa_get_format_bytes(format);
- }
- else {
- srb->Buffer = swImage->Buffer;
- }
+
+ srb->Buffer = swImage->ImageSlices[zOffset];
}
@@ -126,23 +80,24 @@ _swrast_render_texture(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
+ struct gl_renderbuffer *rb = att->Renderbuffer;
(void) fb;
- if (!att->Renderbuffer) {
- wrap_texture(ctx, att);
- }
+ /* plug in our texture_renderbuffer-specific functions */
+ rb->Delete = delete_texture_wrapper;
+
update_wrapper(ctx, att);
}
void
_swrast_finish_render_texture(struct gl_context *ctx,
- struct gl_renderbuffer_attachment *att)
+ struct gl_renderbuffer *rb)
{
/* do nothing */
/* The renderbuffer texture wrapper will get deleted by the
* normal mechanism for deleting renderbuffers.
*/
(void) ctx;
- (void) att;
+ (void) rb;
}
diff --git a/mesalib/src/mesa/swrast/s_texture.c b/mesalib/src/mesa/swrast/s_texture.c
index 8ae3d5bd0..27803c553 100644
--- a/mesalib/src/mesa/swrast/s_texture.c
+++ b/mesalib/src/mesa/swrast/s_texture.c
@@ -16,9 +16,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
/**
@@ -58,6 +59,26 @@ _swrast_delete_texture_image(struct gl_context *ctx,
_mesa_delete_texture_image(ctx, texImage);
}
+static unsigned int
+texture_slices(struct gl_texture_image *texImage)
+{
+ if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY)
+ return texImage->Height;
+ else
+ return texImage->Depth;
+}
+
+unsigned int
+_swrast_teximage_slice_height(struct gl_texture_image *texImage)
+{
+ /* For 1D array textures, the slices are all 1 pixel high, and Height is
+ * the number of slices.
+ */
+ if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY)
+ return 1;
+ else
+ return texImage->Height;
+}
/**
* Called via ctx->Driver.AllocTextureImageBuffer()
@@ -67,31 +88,28 @@ _swrast_alloc_texture_image_buffer(struct gl_context *ctx,
struct gl_texture_image *texImage)
{
struct swrast_texture_image *swImg = swrast_texture_image(texImage);
- GLuint bytes = _mesa_format_image_size(texImage->TexFormat, texImage->Width,
- texImage->Height, texImage->Depth);
+ GLuint bytesPerSlice;
+ GLuint slices = texture_slices(texImage);
GLuint i;
- assert(!swImg->Buffer);
- swImg->Buffer = _mesa_align_malloc(bytes, 512);
- if (!swImg->Buffer)
+ if (!_swrast_init_texture_image(texImage))
return GL_FALSE;
- /* RowStride and ImageOffsets[] describe how to address texels in 'Data' */
- swImg->RowStride = texImage->Width;
+ bytesPerSlice = _mesa_format_image_size(texImage->TexFormat, texImage->Width,
+ _swrast_teximage_slice_height(texImage), 1);
- /* Allocate the ImageOffsets array and initialize to typical values.
- * We allocate the array for 1D/2D textures too in order to avoid special-
- * case code in the texstore routines.
- */
- swImg->ImageOffsets = malloc(texImage->Depth * sizeof(GLuint));
- if (!swImg->ImageOffsets)
+ assert(!swImg->Buffer);
+ swImg->Buffer = _mesa_align_malloc(bytesPerSlice * slices, 512);
+ if (!swImg->Buffer)
return GL_FALSE;
- for (i = 0; i < texImage->Depth; i++) {
- swImg->ImageOffsets[i] = i * texImage->Width * texImage->Height;
- }
+ /* RowStride and ImageSlices[] describe how to address texels in 'Data' */
+ swImg->RowStride = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->Width);
- _swrast_init_texture_image(texImage);
+ for (i = 0; i < slices; i++) {
+ swImg->ImageSlices[i] = swImg->Buffer + bytesPerSlice * i;
+ }
return GL_TRUE;
}
@@ -100,11 +118,11 @@ _swrast_alloc_texture_image_buffer(struct gl_context *ctx,
/**
* Code that overrides ctx->Driver.AllocTextureImageBuffer may use this to
* initialize the fields of swrast_texture_image without allocating the image
- * buffer or initializing ImageOffsets or RowStride.
+ * buffer or initializing RowStride or the contents of ImageSlices.
*
* Returns GL_TRUE on success, GL_FALSE on memory allocation failure.
*/
-void
+GLboolean
_swrast_init_texture_image(struct gl_texture_image *texImage)
{
struct swrast_texture_image *swImg = swrast_texture_image(texImage);
@@ -128,6 +146,13 @@ _swrast_init_texture_image(struct gl_texture_image *texImage)
swImg->HeightScale = (GLfloat) texImage->Height;
swImg->DepthScale = (GLfloat) texImage->Depth;
}
+
+ assert(!swImg->ImageSlices);
+ swImg->ImageSlices = calloc(texture_slices(texImage), sizeof(void *));
+ if (!swImg->ImageSlices)
+ return GL_FALSE;
+
+ return GL_TRUE;
}
@@ -144,8 +169,8 @@ _swrast_free_texture_image_buffer(struct gl_context *ctx,
swImage->Buffer = NULL;
}
- free(swImage->ImageOffsets);
- swImage->ImageOffsets = NULL;
+ free(swImage->ImageSlices);
+ swImage->ImageSlices = NULL;
}
@@ -206,25 +231,15 @@ _swrast_map_teximage(struct gl_context *ctx,
*mapOut = NULL;
return;
}
-
- map = swImage->Buffer;
-
- if (texImage->TexObject->Target == GL_TEXTURE_3D ||
- texImage->TexObject->Target == GL_TEXTURE_2D_ARRAY) {
- GLuint sliceSize = _mesa_format_image_size(texImage->TexFormat,
- texImage->Width,
- texImage->Height,
- 1);
- assert(slice < texImage->Depth);
- map += slice * sliceSize;
- } else if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
- GLuint sliceSize = _mesa_format_image_size(texImage->TexFormat,
- texImage->Width,
- 1,
- 1);
- assert(slice < texImage->Height);
- map += slice * sliceSize;
- }
+
+ /* This function can only be used with a swrast-allocated buffer, in which
+ * case ImageSlices is populated with pointers into Buffer.
+ */
+ assert(swImage->Buffer);
+ assert(swImage->Buffer == swImage->ImageSlices[0]);
+
+ assert(slice < texture_slices(texImage));
+ map = swImage->ImageSlices[slice];
/* apply x/y offset to map address */
map += stride * (y / bh) + texelSize * (x / bw);
@@ -251,12 +266,42 @@ _swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
for (face = 0; face < faces; face++) {
for (level = texObj->BaseLevel; level < MAX_TEXTURE_LEVELS; level++) {
struct gl_texture_image *texImage = texObj->Image[face][level];
- if (texImage) {
- struct swrast_texture_image *swImage =
- swrast_texture_image(texImage);
+ struct swrast_texture_image *swImage = swrast_texture_image(texImage);
+ unsigned int i;
+
+ if (!texImage)
+ continue;
+
+ /* In the case of a swrast-allocated texture buffer, the ImageSlices
+ * and RowStride are always available.
+ */
+ if (swImage->Buffer) {
+ assert(swImage->ImageSlices[0] == swImage->Buffer);
+ continue;
+ }
- /* XXX we'll eventually call _swrast_map_teximage() here */
- swImage->Map = swImage->Buffer;
+ for (i = 0; i < texture_slices(texImage); i++) {
+ GLubyte *map;
+ GLint rowStride;
+
+ if (swImage->ImageSlices[i])
+ continue;
+
+ ctx->Driver.MapTextureImage(ctx, texImage, i,
+ 0, 0,
+ texImage->Width, texImage->Height,
+ GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
+ &map, &rowStride);
+
+ swImage->ImageSlices[i] = map;
+ /* A swrast-using driver has to return the same rowstride for
+ * every slice of the same texture, since we don't track them
+ * separately.
+ */
+ if (i == 0)
+ swImage->RowStride = rowStride;
+ else
+ assert(swImage->RowStride == rowStride);
}
}
}
@@ -272,12 +317,20 @@ _swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
for (face = 0; face < faces; face++) {
for (level = texObj->BaseLevel; level < MAX_TEXTURE_LEVELS; level++) {
struct gl_texture_image *texImage = texObj->Image[face][level];
- if (texImage) {
- struct swrast_texture_image *swImage
- = swrast_texture_image(texImage);
+ struct swrast_texture_image *swImage = swrast_texture_image(texImage);
+ unsigned int i;
+
+ if (!texImage)
+ continue;
- /* XXX we'll eventually call _swrast_unmap_teximage() here */
- swImage->Map = NULL;
+ if (swImage->Buffer)
+ return;
+
+ for (i = 0; i < texture_slices(texImage); i++) {
+ if (swImage->ImageSlices[i]) {
+ ctx->Driver.UnmapTextureImage(ctx, texImage, i);
+ swImage->ImageSlices[i] = NULL;
+ }
}
}
}
@@ -322,30 +375,3 @@ _swrast_unmap_textures(struct gl_context *ctx)
enabledUnits &= ~(1 << unit);
}
}
-
-
-/**
- * Called via ctx->Driver.AllocTextureStorage()
- * Just have to allocate memory for the texture images.
- */
-GLboolean
-_swrast_AllocTextureStorage(struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLsizei levels, GLsizei width,
- GLsizei height, GLsizei depth)
-{
- const GLint numFaces = (texObj->Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
- GLint face, level;
-
- for (face = 0; face < numFaces; face++) {
- for (level = 0; level < levels; level++) {
- struct gl_texture_image *texImage = texObj->Image[face][level];
- if (!_swrast_alloc_texture_image_buffer(ctx, texImage)) {
- return GL_FALSE;
- }
- }
- }
-
- return GL_TRUE;
-}
-
diff --git a/mesalib/src/mesa/swrast/s_triangle.c b/mesalib/src/mesa/swrast/s_triangle.c
index f0b1d383d..ffe99832b 100644
--- a/mesalib/src/mesa/swrast/s_triangle.c
+++ b/mesalib/src/mesa/swrast/s_triangle.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -133,7 +134,7 @@ _swrast_culltriangle( struct gl_context *ctx,
const GLfloat twidth = (GLfloat) texImg->Width; \
const GLfloat theight = (GLfloat) texImg->Height; \
const GLint twidth_log2 = texImg->WidthLog2; \
- const GLubyte *texture = (const GLubyte *) swImg->Map; \
+ const GLubyte *texture = (const GLubyte *) swImg->ImageSlices[0]; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
@@ -191,7 +192,7 @@ _swrast_culltriangle( struct gl_context *ctx,
const GLfloat twidth = (GLfloat) texImg->Width; \
const GLfloat theight = (GLfloat) texImg->Height; \
const GLint twidth_log2 = texImg->WidthLog2; \
- const GLubyte *texture = (const GLubyte *) swImg->Map; \
+ const GLubyte *texture = (const GLubyte *) swImg->ImageSlices[0]; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
@@ -547,7 +548,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
swrast_texture_image_const(texImg); \
const GLfloat twidth = (GLfloat) texImg->Width; \
const GLfloat theight = (GLfloat) texImg->Height; \
- info.texture = (const GLchan *) swImg->Map; \
+ info.texture = (const GLchan *) swImg->ImageSlices[0]; \
info.twidth_log2 = texImg->WidthLog2; \
info.smask = texImg->Width - 1; \
info.tmask = texImg->Height - 1; \
@@ -814,7 +815,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
obj->Image[0][obj->BaseLevel]; \
const struct swrast_texture_image *swImg = \
swrast_texture_image_const(texImg); \
- info.texture = (const GLchan *) swImg->Map; \
+ info.texture = (const GLchan *) swImg->ImageSlices[0]; \
info.twidth_log2 = texImg->WidthLog2; \
info.smask = texImg->Width - 1; \
info.tmask = texImg->Height - 1; \
@@ -1078,7 +1079,8 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& texObj2D->_Swizzle == SWIZZLE_NOOP
&& swImg->_IsPowerOfTwo
&& texImg->Border == 0
- && texImg->Width == swImg->RowStride
+ && (_mesa_format_row_stride(format, texImg->Width) ==
+ swImg->RowStride)
&& (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888)
&& minFilter == magFilter
&& ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
diff --git a/mesalib/src/mesa/swrast/s_triangle.h b/mesalib/src/mesa/swrast/s_triangle.h
index 46e23d420..c0cbb3927 100644
--- a/mesalib/src/mesa/swrast/s_triangle.h
+++ b/mesalib/src/mesa/swrast/s_triangle.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/swrast/s_tritemp.h b/mesalib/src/mesa/swrast/s_tritemp.h
index 797afc41a..f96ddd45b 100644
--- a/mesalib/src/mesa/swrast/s_tritemp.h
+++ b/mesalib/src/mesa/swrast/s_tritemp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/swrast/s_zoom.c b/mesalib/src/mesa/swrast/s_zoom.c
index 3b309a251..01276f4e9 100644
--- a/mesalib/src/mesa/swrast/s_zoom.c
+++ b/mesalib/src/mesa/swrast/s_zoom.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
diff --git a/mesalib/src/mesa/swrast/s_zoom.h b/mesalib/src/mesa/swrast/s_zoom.h
index 1955e7e88..a1441e81e 100644
--- a/mesalib/src/mesa/swrast/s_zoom.h
+++ b/mesalib/src/mesa/swrast/s_zoom.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef S_ZOOM_H
diff --git a/mesalib/src/mesa/swrast/swrast.h b/mesalib/src/mesa/swrast/swrast.h
index 82555ae6a..359a985fd 100644
--- a/mesalib/src/mesa/swrast/swrast.h
+++ b/mesalib/src/mesa/swrast/swrast.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
*/
@@ -217,7 +218,7 @@ extern GLboolean
_swrast_alloc_texture_image_buffer(struct gl_context *ctx,
struct gl_texture_image *texImage);
-extern void
+extern GLboolean
_swrast_init_texture_image(struct gl_texture_image *texImage);
extern void
@@ -269,15 +270,7 @@ _swrast_render_texture(struct gl_context *ctx,
extern void
_swrast_finish_render_texture(struct gl_context *ctx,
- struct gl_renderbuffer_attachment *att);
-
-
-
-extern GLboolean
-_swrast_AllocTextureStorage(struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLsizei levels, GLsizei width,
- GLsizei height, GLsizei depth);
+ struct gl_renderbuffer *rb);
/**
diff --git a/mesalib/src/mesa/swrast_setup/ss_context.c b/mesalib/src/mesa/swrast_setup/ss_context.c
index 5847a7682..0c40683a5 100644
--- a/mesalib/src/mesa/swrast_setup/ss_context.c
+++ b/mesalib/src/mesa/swrast_setup/ss_context.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/swrast_setup/ss_context.h b/mesalib/src/mesa/swrast_setup/ss_context.h
index ecc1f5fd6..29de33232 100644
--- a/mesalib/src/mesa/swrast_setup/ss_context.h
+++ b/mesalib/src/mesa/swrast_setup/ss_context.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/swrast_setup/ss_triangle.c b/mesalib/src/mesa/swrast_setup/ss_triangle.c
index 5f4a997ee..c8378fc8b 100644
--- a/mesalib/src/mesa/swrast_setup/ss_triangle.c
+++ b/mesalib/src/mesa/swrast_setup/ss_triangle.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/swrast_setup/ss_triangle.h b/mesalib/src/mesa/swrast_setup/ss_triangle.h
index a027f4826..2fcc6d4dc 100644
--- a/mesalib/src/mesa/swrast_setup/ss_triangle.h
+++ b/mesalib/src/mesa/swrast_setup/ss_triangle.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/swrast_setup/ss_tritmp.h b/mesalib/src/mesa/swrast_setup/ss_tritmp.h
index 11742067f..a44fb24f2 100644
--- a/mesalib/src/mesa/swrast_setup/ss_tritmp.h
+++ b/mesalib/src/mesa/swrast_setup/ss_tritmp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/swrast_setup/ss_vb.h b/mesalib/src/mesa/swrast_setup/ss_vb.h
index 05e665b5c..72c077b92 100644
--- a/mesalib/src/mesa/swrast_setup/ss_vb.h
+++ b/mesalib/src/mesa/swrast_setup/ss_vb.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/swrast_setup/swrast_setup.h b/mesalib/src/mesa/swrast_setup/swrast_setup.h
index 1d87ec108..e453e56ae 100644
--- a/mesalib/src/mesa/swrast_setup/swrast_setup.h
+++ b/mesalib/src/mesa/swrast_setup/swrast_setup.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_context.c b/mesalib/src/mesa/tnl/t_context.c
index ed31b9c45..77f1c1bce 100644
--- a/mesalib/src/mesa/tnl/t_context.c
+++ b/mesalib/src/mesa/tnl/t_context.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_context.h b/mesalib/src/mesa/tnl/t_context.h
index c9ff1246d..4ebc31261 100644
--- a/mesalib/src/mesa/tnl/t_context.h
+++ b/mesalib/src/mesa/tnl/t_context.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/tnl/t_draw.c b/mesalib/src/mesa/tnl/t_draw.c
index 0631eb183..08cd1d1ea 100644
--- a/mesalib/src/mesa/tnl/t_draw.c
+++ b/mesalib/src/mesa/tnl/t_draw.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_pipeline.c b/mesalib/src/mesa/tnl/t_pipeline.c
index 806d9ca6e..7f09af7f1 100644
--- a/mesalib/src/mesa/tnl/t_pipeline.c
+++ b/mesalib/src/mesa/tnl/t_pipeline.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_pipeline.h b/mesalib/src/mesa/tnl/t_pipeline.h
index 0eb03395c..35cd0afe3 100644
--- a/mesalib/src/mesa/tnl/t_pipeline.h
+++ b/mesalib/src/mesa/tnl/t_pipeline.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_rasterpos.c b/mesalib/src/mesa/tnl/t_rasterpos.c
index 1673b81ef..269a7162e 100644
--- a/mesalib/src/mesa/tnl/t_rasterpos.c
+++ b/mesalib/src/mesa/tnl/t_rasterpos.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/tnl/t_vb_cliptmp.h b/mesalib/src/mesa/tnl/t_vb_cliptmp.h
index 0b45bc534..4dc3320c6 100644
--- a/mesalib/src/mesa/tnl/t_vb_cliptmp.h
+++ b/mesalib/src/mesa/tnl/t_vb_cliptmp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vb_fog.c b/mesalib/src/mesa/tnl/t_vb_fog.c
index 134cae1c7..c011ae785 100644
--- a/mesalib/src/mesa/tnl/t_vb_fog.c
+++ b/mesalib/src/mesa/tnl/t_vb_fog.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vb_light.c b/mesalib/src/mesa/tnl/t_vb_light.c
index 39ba49685..133894853 100644
--- a/mesalib/src/mesa/tnl/t_vb_light.c
+++ b/mesalib/src/mesa/tnl/t_vb_light.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/tnl/t_vb_lighttmp.h b/mesalib/src/mesa/tnl/t_vb_lighttmp.h
index 1944e5ddc..5679640c9 100644
--- a/mesalib/src/mesa/tnl/t_vb_lighttmp.h
+++ b/mesalib/src/mesa/tnl/t_vb_lighttmp.h
@@ -17,14 +17,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
*
* Authors:
- * Brian Paul
- * Keith Whitwell <keith@tungstengraphics.com>
+ * Brian Paul Keith Whitwell <keith@tungstengraphics.com>
*/
diff --git a/mesalib/src/mesa/tnl/t_vb_normals.c b/mesalib/src/mesa/tnl/t_vb_normals.c
index c19b48e51..519c90d8e 100644
--- a/mesalib/src/mesa/tnl/t_vb_normals.c
+++ b/mesalib/src/mesa/tnl/t_vb_normals.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vb_points.c b/mesalib/src/mesa/tnl/t_vb_points.c
index 0e33b691e..932194d75 100644
--- a/mesalib/src/mesa/tnl/t_vb_points.c
+++ b/mesalib/src/mesa/tnl/t_vb_points.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Brian Paul
diff --git a/mesalib/src/mesa/tnl/t_vb_program.c b/mesalib/src/mesa/tnl/t_vb_program.c
index 452285f6b..5ade54343 100644
--- a/mesalib/src/mesa/tnl/t_vb_program.c
+++ b/mesalib/src/mesa/tnl/t_vb_program.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -259,7 +260,7 @@ map_textures(struct gl_context *ctx, const struct gl_vertex_program *vp)
{
GLuint u;
- for (u = 0; u < ctx->Const.MaxVertexTextureImageUnits; u++) {
+ for (u = 0; u < ctx->Const.VertexProgram.MaxTextureImageUnits; u++) {
if (vp->Base.TexturesUsed[u]) {
/* Note: _Current *should* correspond to the target indicated
* in TexturesUsed[u].
@@ -278,7 +279,7 @@ unmap_textures(struct gl_context *ctx, const struct gl_vertex_program *vp)
{
GLuint u;
- for (u = 0; u < ctx->Const.MaxVertexTextureImageUnits; u++) {
+ for (u = 0; u < ctx->Const.VertexProgram.MaxTextureImageUnits; u++) {
if (vp->Base.TexturesUsed[u]) {
/* Note: _Current *should* correspond to the target indicated
* in TexturesUsed[u].
diff --git a/mesalib/src/mesa/tnl/t_vb_render.c b/mesalib/src/mesa/tnl/t_vb_render.c
index cb3192132..4d42bcd3e 100644
--- a/mesalib/src/mesa/tnl/t_vb_render.c
+++ b/mesalib/src/mesa/tnl/t_vb_render.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vb_rendertmp.h b/mesalib/src/mesa/tnl/t_vb_rendertmp.h
index 4ed485a7b..1c6470cea 100644
--- a/mesalib/src/mesa/tnl/t_vb_rendertmp.h
+++ b/mesalib/src/mesa/tnl/t_vb_rendertmp.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vb_texgen.c b/mesalib/src/mesa/tnl/t_vb_texgen.c
index 8ba67f3c0..881710858 100644
--- a/mesalib/src/mesa/tnl/t_vb_texgen.c
+++ b/mesalib/src/mesa/tnl/t_vb_texgen.c
@@ -17,13 +17,13 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Brian Paul
- * Keith Whitwell <keith@tungstengraphics.com>
+ * Brian Paul Keith Whitwell <keith@tungstengraphics.com>
*/
/*
diff --git a/mesalib/src/mesa/tnl/t_vb_texmat.c b/mesalib/src/mesa/tnl/t_vb_texmat.c
index 91bb0f797..f3e317b33 100644
--- a/mesalib/src/mesa/tnl/t_vb_texmat.c
+++ b/mesalib/src/mesa/tnl/t_vb_texmat.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vb_vertex.c b/mesalib/src/mesa/tnl/t_vb_vertex.c
index 8f296f54b..4cb8c06b2 100644
--- a/mesalib/src/mesa/tnl/t_vb_vertex.c
+++ b/mesalib/src/mesa/tnl/t_vb_vertex.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/tnl/t_vertex.c b/mesalib/src/mesa/tnl/t_vertex.c
index ce3e32165..c7a745ed7 100644
--- a/mesalib/src/mesa/tnl/t_vertex.c
+++ b/mesalib/src/mesa/tnl/t_vertex.c
@@ -156,9 +156,11 @@ static void choose_interp_func( struct gl_context *ctx,
GLboolean force_boundary )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
+ GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL ||
+ ctx->Polygon.BackMode != GL_FILL);
+ GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide;
- if (vtx->need_extras &&
- (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) {
+ if (vtx->need_extras && (twosided || unfilled)) {
vtx->interp = _tnl_generic_interp_extras;
} else {
vtx->interp = _tnl_generic_interp;
@@ -171,9 +173,12 @@ static void choose_interp_func( struct gl_context *ctx,
static void choose_copy_pv_func( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
+ GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL ||
+ ctx->Polygon.BackMode != GL_FILL);
- if (vtx->need_extras &&
- (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) {
+ GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide;
+
+ if (vtx->need_extras && (twosided || unfilled)) {
vtx->copy_pv = _tnl_generic_copy_pv_extras;
} else {
vtx->copy_pv = _tnl_generic_copy_pv;
diff --git a/mesalib/src/mesa/tnl/tnl.h b/mesalib/src/mesa/tnl/tnl.h
index 958322887..d67a3a71d 100644
--- a/mesalib/src/mesa/tnl/tnl.h
+++ b/mesalib/src/mesa/tnl/tnl.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/vbo/vbo.h b/mesalib/src/mesa/vbo/vbo.h
index 49dab2314..08c67d67d 100644
--- a/mesalib/src/mesa/vbo/vbo.h
+++ b/mesalib/src/mesa/vbo/vbo.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -32,6 +33,7 @@
#ifndef _VBO_H
#define _VBO_H
+#include <stdbool.h>
#include "main/glheader.h"
struct gl_client_array;
@@ -72,6 +74,15 @@ void _vbo_DestroyContext( struct gl_context *ctx );
void _vbo_InvalidateState( struct gl_context *ctx, GLuint new_state );
+void
+vbo_initialize_exec_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *exec);
+
+void
+vbo_initialize_save_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *exec);
+
+
typedef void (*vbo_draw_func)( struct gl_context *ctx,
const struct _mesa_prim *prims,
GLuint nr_prims,
@@ -160,6 +171,15 @@ vbo_count_tessellated_primitives(GLenum mode, GLuint count,
GLuint num_instances);
void
+vbo_try_prim_conversion(struct _mesa_prim *p);
+
+bool
+vbo_can_merge_prims(const struct _mesa_prim *p0, const struct _mesa_prim *p1);
+
+void
+vbo_merge_prims(struct _mesa_prim *p0, const struct _mesa_prim *p1);
+
+void
vbo_sw_primitive_restart(struct gl_context *ctx,
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/mesalib/src/mesa/vbo/vbo_context.c b/mesalib/src/mesa/vbo/vbo_context.c
index 7eda31e8f..4c3c9c090 100644
--- a/mesalib/src/mesa/vbo/vbo_context.c
+++ b/mesalib/src/mesa/vbo/vbo_context.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/vbo/vbo_context.h b/mesalib/src/mesa/vbo/vbo_context.h
index 1ff6ec000..ced742033 100644
--- a/mesalib/src/mesa/vbo/vbo_context.h
+++ b/mesalib/src/mesa/vbo/vbo_context.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@@ -51,7 +52,6 @@
#ifndef _VBO_CONTEXT_H
#define _VBO_CONTEXT_H
-#include "main/mfeatures.h"
#include "vbo.h"
#include "vbo_attrib.h"
#include "vbo_exec.h"
diff --git a/mesalib/src/mesa/vbo/vbo_exec.c b/mesalib/src/mesa/vbo/vbo_exec.c
index 5827f90c3..c56a14212 100644
--- a/mesalib/src/mesa/vbo/vbo_exec.c
+++ b/mesalib/src/mesa/vbo/vbo_exec.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
@@ -47,7 +48,6 @@ void vbo_exec_init( struct gl_context *ctx )
return;
vbo_exec_vtx_init( exec );
- vbo_exec_array_init( exec );
ctx->Driver.NeedFlush = 0;
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
@@ -68,7 +68,6 @@ void vbo_exec_destroy( struct gl_context *ctx )
}
vbo_exec_vtx_destroy( exec );
- vbo_exec_array_destroy( exec );
}
@@ -79,10 +78,26 @@ void vbo_exec_destroy( struct gl_context *ctx )
*/
void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state )
{
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
- if (new_state & (_NEW_PROGRAM|_NEW_ARRAY)) {
+ if (!exec->validating && new_state & (_NEW_PROGRAM|_NEW_ARRAY)) {
exec->array.recalculate_inputs = GL_TRUE;
+
+ /* If we ended up here because a VAO was deleted, the _DrawArrays
+ * pointer which pointed to the VAO might be invalid now, so set it
+ * to NULL. This prevents crashes in driver functions like Clear
+ * where driver state validation might occur, but the vbo module is
+ * still in an invalid state.
+ *
+ * Drivers should skip vertex array state validation if _DrawArrays
+ * is NULL. It also has no effect on performance, because attrib
+ * bindings will be recalculated anyway.
+ */
+ if (vbo->last_draw_method == DRAW_ARRAYS) {
+ ctx->Array._DrawArrays = NULL;
+ vbo->last_draw_method = DRAW_NONE;
+ }
}
if (new_state & _NEW_EVAL)
@@ -142,3 +157,102 @@ vbo_count_tessellated_primitives(GLenum mode, GLuint count,
}
return num_primitives * num_instances;
}
+
+
+
+/**
+ * In some degenarate cases we can improve our ability to merge
+ * consecutive primitives. For example:
+ * glBegin(GL_LINE_STRIP);
+ * glVertex(1);
+ * glVertex(1);
+ * glEnd();
+ * glBegin(GL_LINE_STRIP);
+ * glVertex(1);
+ * glVertex(1);
+ * glEnd();
+ * Can be merged as a GL_LINES prim with four vertices.
+ *
+ * This function converts 2-vertex line strips/loops into GL_LINES, etc.
+ */
+void
+vbo_try_prim_conversion(struct _mesa_prim *p)
+{
+ if (p->mode == GL_LINE_STRIP && p->count == 2) {
+ /* convert 2-vertex line strip to a separate line */
+ p->mode = GL_LINES;
+ }
+ else if ((p->mode == GL_TRIANGLE_STRIP || p->mode == GL_TRIANGLE_FAN)
+ && p->count == 3) {
+ /* convert 3-vertex tri strip or fan to a separate triangle */
+ p->mode = GL_TRIANGLES;
+ }
+
+ /* Note: we can't convert a 4-vertex quad strip to a separate quad
+ * because the vertex ordering is different. We'd have to muck
+ * around in the vertex data to make it work.
+ */
+}
+
+
+/**
+ * Helper function for determining if two subsequent glBegin/glEnd
+ * primitives can be combined. This is only possible for GL_POINTS,
+ * GL_LINES, GL_TRIANGLES and GL_QUADS.
+ * If we return true, it means that we can concatenate p1 onto p0 (and
+ * discard p1).
+ */
+bool
+vbo_can_merge_prims(const struct _mesa_prim *p0, const struct _mesa_prim *p1)
+{
+ if (!p0->begin ||
+ !p1->begin ||
+ !p0->end ||
+ !p1->end)
+ return false;
+
+ /* The prim mode must match (ex: both GL_TRIANGLES) */
+ if (p0->mode != p1->mode)
+ return false;
+
+ /* p1's vertices must come right after p0 */
+ if (p0->start + p0->count != p1->start)
+ return false;
+
+ if (p0->basevertex != p1->basevertex ||
+ p0->num_instances != p1->num_instances ||
+ p0->base_instance != p1->base_instance)
+ return false;
+
+ /* can always merge subsequent GL_POINTS primitives */
+ if (p0->mode == GL_POINTS)
+ return true;
+
+ /* independent lines with no extra vertices */
+ if (p0->mode == GL_LINES && p0->count % 2 == 0 && p1->count % 2 == 0)
+ return true;
+
+ /* independent tris */
+ if (p0->mode == GL_TRIANGLES && p0->count % 3 == 0 && p1->count % 3 == 0)
+ return true;
+
+ /* independent quads */
+ if (p0->mode == GL_QUADS && p0->count % 4 == 0 && p1->count % 4 == 0)
+ return true;
+
+ return false;
+}
+
+
+/**
+ * If we've determined that p0 and p1 can be merged, this function
+ * concatenates p1 onto p0.
+ */
+void
+vbo_merge_prims(struct _mesa_prim *p0, const struct _mesa_prim *p1)
+{
+ assert(vbo_can_merge_prims(p0, p1));
+
+ p0->count += p1->count;
+ p0->end = p1->end;
+}
diff --git a/mesalib/src/mesa/vbo/vbo_exec.h b/mesalib/src/mesa/vbo/vbo_exec.h
index 96cf4c82b..01e2856f2 100644
--- a/mesalib/src/mesa/vbo/vbo_exec.h
+++ b/mesalib/src/mesa/vbo/vbo_exec.h
@@ -34,7 +34,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __VBO_EXEC_H__
#define __VBO_EXEC_H__
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "vbo.h"
#include "vbo_attrib.h"
@@ -82,6 +81,7 @@ struct vbo_exec_context
struct gl_context *ctx;
GLvertexformat vtxfmt;
GLvertexformat vtxfmt_noop;
+ GLboolean validating; /**< if we're in the middle of state validation */
struct {
struct gl_buffer_object *bufferobj;
@@ -152,9 +152,6 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
/* Internal functions:
*/
-void vbo_exec_array_init( struct vbo_exec_context *exec );
-void vbo_exec_array_destroy( struct vbo_exec_context *exec );
-
void vbo_exec_vtx_init( struct vbo_exec_context *exec );
void vbo_exec_vtx_destroy( struct vbo_exec_context *exec );
diff --git a/mesalib/src/mesa/vbo/vbo_exec_api.c b/mesalib/src/mesa/vbo/vbo_exec_api.c
index 353f8cfde..600398c58 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_api.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_api.c
@@ -34,7 +34,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/vtxfmt.h"
#include "main/dlist.h"
#include "main/eval.h"
@@ -75,7 +74,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
GLuint last_begin = exec->vtx.prim[exec->vtx.prim_count-1].begin;
GLuint last_count;
- if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(exec->ctx)) {
GLint i = exec->vtx.prim_count - 1;
assert(i >= 0);
exec->vtx.prim[i].count = (exec->vtx.vert_count -
@@ -97,7 +96,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
*/
assert(exec->vtx.prim_count == 0);
- if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(exec->ctx)) {
exec->vtx.prim[0].mode = exec->ctx->Driver.CurrentExecPrimitive;
exec->vtx.prim[0].start = 0;
exec->vtx.prim[0].count = 0;
@@ -270,7 +269,7 @@ vbo_exec_wrap_upgrade_vertex(struct vbo_exec_context *exec,
/* Heuristic: Attempt to isolate attributes received outside
* begin/end so that they don't bloat the vertices.
*/
- if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END &&
+ if (!_mesa_inside_begin_end(ctx) &&
!oldSize && lastcount > 8 && exec->vtx.vertex_size) {
vbo_exec_copy_to_current( exec );
reset_attrfv( exec );
@@ -655,132 +654,6 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j )
}
-static void GLAPIENTRY
-vbo_exec_EvalMesh1(GLenum mode, GLint i1, GLint i2)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint i;
- GLfloat u, du;
- GLenum prim;
-
- switch (mode) {
- case GL_POINT:
- prim = GL_POINTS;
- break;
- case GL_LINE:
- prim = GL_LINE_STRIP;
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" );
- return;
- }
-
- /* No effect if vertex maps disabled.
- */
- if (!ctx->Eval.Map1Vertex4 &&
- !ctx->Eval.Map1Vertex3)
- return;
-
- du = ctx->Eval.MapGrid1du;
- u = ctx->Eval.MapGrid1u1 + i1 * du;
-
- CALL_Begin(GET_DISPATCH(), (prim));
- for (i=i1;i<=i2;i++,u+=du) {
- CALL_EvalCoord1f(GET_DISPATCH(), (u));
- }
- CALL_End(GET_DISPATCH(), ());
-}
-
-
-static void GLAPIENTRY
-vbo_exec_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLfloat u, du, v, dv, v1, u1;
- GLint i, j;
-
- switch (mode) {
- case GL_POINT:
- case GL_LINE:
- case GL_FILL:
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh2(mode)" );
- return;
- }
-
- /* No effect if vertex maps disabled.
- */
- if (!ctx->Eval.Map2Vertex4 &&
- !ctx->Eval.Map2Vertex3)
- return;
-
- du = ctx->Eval.MapGrid2du;
- dv = ctx->Eval.MapGrid2dv;
- v1 = ctx->Eval.MapGrid2v1 + j1 * dv;
- u1 = ctx->Eval.MapGrid2u1 + i1 * du;
-
- switch (mode) {
- case GL_POINT:
- CALL_Begin(GET_DISPATCH(), (GL_POINTS));
- for (v=v1,j=j1;j<=j2;j++,v+=dv) {
- for (u=u1,i=i1;i<=i2;i++,u+=du) {
- CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
- }
- }
- CALL_End(GET_DISPATCH(), ());
- break;
- case GL_LINE:
- for (v=v1,j=j1;j<=j2;j++,v+=dv) {
- CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP));
- for (u=u1,i=i1;i<=i2;i++,u+=du) {
- CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
- }
- CALL_End(GET_DISPATCH(), ());
- }
- for (u=u1,i=i1;i<=i2;i++,u+=du) {
- CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP));
- for (v=v1,j=j1;j<=j2;j++,v+=dv) {
- CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
- }
- CALL_End(GET_DISPATCH(), ());
- }
- break;
- case GL_FILL:
- for (v=v1,j=j1;j<j2;j++,v+=dv) {
- CALL_Begin(GET_DISPATCH(), (GL_TRIANGLE_STRIP));
- for (u=u1,i=i1;i<=i2;i++,u+=du) {
- CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
- CALL_EvalCoord2f(GET_DISPATCH(), (u, v+dv));
- }
- CALL_End(GET_DISPATCH(), ());
- }
- break;
- }
-}
-
-
-/**
- * Execute a glRectf() function. This is not suitable for GL_COMPILE
- * modes (as the test for outside begin/end is not compiled),
- * but may be useful for drivers in circumstances which exclude
- * display list interactions.
- *
- * (None of the functions in this file are suitable for GL_COMPILE
- * modes).
- */
-static void GLAPIENTRY
-vbo_exec_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- CALL_Begin(GET_DISPATCH(), (GL_QUADS));
- CALL_Vertex2f(GET_DISPATCH(), (x1, y1));
- CALL_Vertex2f(GET_DISPATCH(), (x2, y1));
- CALL_Vertex2f(GET_DISPATCH(), (x2, y2));
- CALL_Vertex2f(GET_DISPATCH(), (x1, y2));
- CALL_End(GET_DISPATCH(), ());
-}
-
-
/**
* Called via glBegin.
*/
@@ -790,7 +663,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
int i;
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBegin");
return;
}
@@ -846,6 +719,34 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
/**
+ * Try to merge / concatenate the two most recent VBO primitives.
+ */
+static void
+try_vbo_merge(struct vbo_exec_context *exec)
+{
+ struct _mesa_prim *cur = &exec->vtx.prim[exec->vtx.prim_count - 1];
+
+ assert(exec->vtx.prim_count >= 1);
+
+ vbo_try_prim_conversion(cur);
+
+ if (exec->vtx.prim_count >= 2) {
+ struct _mesa_prim *prev = &exec->vtx.prim[exec->vtx.prim_count - 2];
+ assert(prev == cur - 1);
+
+ if (vbo_can_merge_prims(prev, cur)) {
+ assert(cur->begin);
+ assert(cur->end);
+ assert(prev->begin);
+ assert(prev->end);
+ vbo_merge_prims(prev, cur);
+ exec->vtx.prim_count--; /* drop the last primitive */
+ }
+ }
+}
+
+
+/**
* Called via glEnd.
*/
static void GLAPIENTRY vbo_exec_End( void )
@@ -853,7 +754,7 @@ static void GLAPIENTRY vbo_exec_End( void )
GET_CURRENT_CONTEXT( ctx );
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
+ if (!_mesa_inside_begin_end(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glEnd");
return;
}
@@ -871,6 +772,8 @@ static void GLAPIENTRY vbo_exec_End( void )
exec->vtx.prim[i].end = 1;
exec->vtx.prim[i].count = idx - exec->vtx.prim[i].start;
+
+ try_vbo_merge(exec);
}
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
@@ -911,16 +814,21 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
struct gl_context *ctx = exec->ctx;
GLvertexformat *vfmt = &exec->vtxfmt;
- _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+ vfmt->ArrayElement = _ae_ArrayElement;
vfmt->Begin = vbo_exec_Begin;
vfmt->End = vbo_exec_End;
vfmt->PrimitiveRestartNV = vbo_exec_PrimitiveRestartNV;
- _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_);
- _MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_);
+ vfmt->CallList = _mesa_CallList;
+ vfmt->CallLists = _mesa_CallLists;
- vfmt->Rectf = vbo_exec_Rectf;
+ vfmt->EvalCoord1f = vbo_exec_EvalCoord1f;
+ vfmt->EvalCoord1fv = vbo_exec_EvalCoord1fv;
+ vfmt->EvalCoord2f = vbo_exec_EvalCoord2f;
+ vfmt->EvalCoord2fv = vbo_exec_EvalCoord2fv;
+ vfmt->EvalPoint1 = vbo_exec_EvalPoint1;
+ vfmt->EvalPoint2 = vbo_exec_EvalPoint2;
/* from attrib_tmp.h:
*/
@@ -1243,7 +1151,7 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
assert(exec->flush_call_depth == 1);
#endif
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ if (_mesa_inside_begin_end(ctx)) {
/* We've had glBegin but not glEnd! */
#ifdef DEBUG
exec->flush_call_depth--;
diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c
index 7e61f7b31..9dadd0421 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_array.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_array.c
@@ -30,6 +30,7 @@
#include "main/context.h"
#include "main/state.h"
#include "main/api_validate.h"
+#include "main/dispatch.h"
#include "main/varray.h"
#include "main/bufferobj.h"
#include "main/enums.h"
@@ -91,7 +92,7 @@ vbo_get_minmax_index(struct gl_context *ctx,
const GLuint count)
{
const GLboolean restart = ctx->Array._PrimitiveRestart;
- const GLuint restartIndex = ctx->Array._RestartIndex;
+ const GLuint restartIndex = _mesa_primitive_restart_index(ctx, ib->type);
const int index_size = vbo_sizeof_ib_type(ib->type);
const char *indices;
GLuint i;
@@ -501,6 +502,7 @@ vbo_bind_arrays(struct gl_context *ctx)
if (exec->array.recalculate_inputs) {
recalculate_input_bindings(ctx);
+ exec->array.recalculate_inputs = GL_FALSE;
/* Again... because we may have changed the bitmask of per-vertex varying
* attributes. If we regenerate the fixed-function vertex program now
@@ -508,10 +510,13 @@ vbo_bind_arrays(struct gl_context *ctx)
* need in the shader.
*/
if (ctx->NewState) {
+ /* Setting "validating" to TRUE prevents _mesa_update_state from
+ * invalidating what we just did.
+ */
+ exec->validating = GL_TRUE;
_mesa_update_state(ctx);
+ exec->validating = GL_FALSE;
}
-
- exec->array.recalculate_inputs = GL_FALSE;
}
}
@@ -572,10 +577,10 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
prim[0].base_instance = baseInstance;
/* Implement the primitive restart index */
- if (ctx->Array._PrimitiveRestart && ctx->Array._RestartIndex < count) {
+ if (ctx->Array.PrimitiveRestart && ctx->Array.RestartIndex < count) {
GLuint primCount = 0;
- if (ctx->Array._RestartIndex == start) {
+ if (ctx->Array.RestartIndex == start) {
/* special case: RestartIndex at beginning */
if (count > 1) {
prim[0].start = start + 1;
@@ -583,7 +588,7 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
primCount = 1;
}
}
- else if (ctx->Array._RestartIndex == start + count - 1) {
+ else if (ctx->Array.RestartIndex == start + count - 1) {
/* special case: RestartIndex at end */
if (count > 1) {
prim[0].start = start;
@@ -594,10 +599,10 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
else {
/* general case: RestartIndex in middle, split into two prims */
prim[0].start = start;
- prim[0].count = ctx->Array._RestartIndex - start;
+ prim[0].count = ctx->Array.RestartIndex - start;
prim[1] = prim[0];
- prim[1].start = ctx->Array._RestartIndex + 1;
+ prim[1].start = ctx->Array.RestartIndex + 1;
prim[1].count = count - prim[1].start;
primCount = 2;
@@ -627,6 +632,128 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
}
+/**
+ * Execute a glRectf() function.
+ */
+static void GLAPIENTRY
+vbo_exec_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ CALL_Begin(GET_DISPATCH(), (GL_QUADS));
+ CALL_Vertex2f(GET_DISPATCH(), (x1, y1));
+ CALL_Vertex2f(GET_DISPATCH(), (x2, y1));
+ CALL_Vertex2f(GET_DISPATCH(), (x2, y2));
+ CALL_Vertex2f(GET_DISPATCH(), (x1, y2));
+ CALL_End(GET_DISPATCH(), ());
+}
+
+
+static void GLAPIENTRY
+vbo_exec_EvalMesh1(GLenum mode, GLint i1, GLint i2)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint i;
+ GLfloat u, du;
+ GLenum prim;
+
+ switch (mode) {
+ case GL_POINT:
+ prim = GL_POINTS;
+ break;
+ case GL_LINE:
+ prim = GL_LINE_STRIP;
+ break;
+ default:
+ _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" );
+ return;
+ }
+
+ /* No effect if vertex maps disabled.
+ */
+ if (!ctx->Eval.Map1Vertex4 &&
+ !ctx->Eval.Map1Vertex3)
+ return;
+
+ du = ctx->Eval.MapGrid1du;
+ u = ctx->Eval.MapGrid1u1 + i1 * du;
+
+ CALL_Begin(GET_DISPATCH(), (prim));
+ for (i=i1;i<=i2;i++,u+=du) {
+ CALL_EvalCoord1f(GET_DISPATCH(), (u));
+ }
+ CALL_End(GET_DISPATCH(), ());
+}
+
+
+static void GLAPIENTRY
+vbo_exec_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLfloat u, du, v, dv, v1, u1;
+ GLint i, j;
+
+ switch (mode) {
+ case GL_POINT:
+ case GL_LINE:
+ case GL_FILL:
+ break;
+ default:
+ _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh2(mode)" );
+ return;
+ }
+
+ /* No effect if vertex maps disabled.
+ */
+ if (!ctx->Eval.Map2Vertex4 &&
+ !ctx->Eval.Map2Vertex3)
+ return;
+
+ du = ctx->Eval.MapGrid2du;
+ dv = ctx->Eval.MapGrid2dv;
+ v1 = ctx->Eval.MapGrid2v1 + j1 * dv;
+ u1 = ctx->Eval.MapGrid2u1 + i1 * du;
+
+ switch (mode) {
+ case GL_POINT:
+ CALL_Begin(GET_DISPATCH(), (GL_POINTS));
+ for (v=v1,j=j1;j<=j2;j++,v+=dv) {
+ for (u=u1,i=i1;i<=i2;i++,u+=du) {
+ CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
+ }
+ }
+ CALL_End(GET_DISPATCH(), ());
+ break;
+ case GL_LINE:
+ for (v=v1,j=j1;j<=j2;j++,v+=dv) {
+ CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP));
+ for (u=u1,i=i1;i<=i2;i++,u+=du) {
+ CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
+ }
+ CALL_End(GET_DISPATCH(), ());
+ }
+ for (u=u1,i=i1;i<=i2;i++,u+=du) {
+ CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP));
+ for (v=v1,j=j1;j<=j2;j++,v+=dv) {
+ CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
+ }
+ CALL_End(GET_DISPATCH(), ());
+ }
+ break;
+ case GL_FILL:
+ for (v=v1,j=j1;j<j2;j++,v+=dv) {
+ CALL_Begin(GET_DISPATCH(), (GL_TRIANGLE_STRIP));
+ for (u=u1,i=i1;i<=i2;i++,u+=du) {
+ CALL_EvalCoord2f(GET_DISPATCH(), (u, v));
+ CALL_EvalCoord2f(GET_DISPATCH(), (u, v+dv));
+ }
+ CALL_End(GET_DISPATCH(), ());
+ }
+ break;
+ }
+}
+
/**
* Called from glDrawArrays when in immediate mode (not display list mode).
@@ -859,6 +986,7 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
{
static GLuint warnCount = 0;
GLboolean index_bounds_valid = GL_TRUE;
+ GLuint max_element;
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
@@ -871,8 +999,27 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
type, indices, basevertex ))
return;
+ if (ctx->Const.CheckArrayBounds) {
+ /* _MaxElement was computed, so we can use it.
+ * This path is used for drivers which need strict bounds checking.
+ */
+ max_element = ctx->Array.ArrayObj->_MaxElement;
+ }
+ else {
+ /* Generally, hardware drivers don't need to know the buffer bounds
+ * if all vertex attributes are in VBOs.
+ * However, if none of vertex attributes are in VBOs, _MaxElement
+ * is always set to some random big number anyway, so bounds checking
+ * is mostly useless.
+ *
+ * This is only useful to catch invalid values in the "end" parameter
+ * like ~0.
+ */
+ max_element = 2 * 1000 * 1000 * 1000; /* just a big number */
+ }
+
if ((int) end + basevertex < 0 ||
- start + basevertex >= ctx->Array.ArrayObj->_MaxElement) {
+ start + basevertex >= max_element) {
/* The application requested we draw using a range of indices that's
* outside the bounds of the current VBO. This is invalid and appears
* to give undefined results. The safest thing to do is to simply
@@ -886,7 +1033,7 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
"\trange is outside VBO bounds (max=%u); ignoring.\n"
"\tThis should be fixed in the application.",
start, end, basevertex, count, type, indices,
- ctx->Array.ArrayObj->_MaxElement - 1);
+ max_element - 1);
}
index_bounds_valid = GL_FALSE;
}
@@ -917,7 +1064,7 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
}
if ((int) start + basevertex < 0 ||
- end + basevertex >= ctx->Array.ArrayObj->_MaxElement)
+ end + basevertex >= max_element)
index_bounds_valid = GL_FALSE;
#if 0
@@ -1359,40 +1506,50 @@ vbo_exec_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
vbo_draw_transform_feedback(ctx, mode, obj, stream, primcount);
}
+
/**
- * Plug in the immediate-mode vertex array drawing commands into the
- * givven vbo_exec_context object.
+ * Initialize the dispatch table with the VBO functions for drawing.
*/
void
-vbo_exec_array_init( struct vbo_exec_context *exec )
+vbo_initialize_exec_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *exec)
{
- exec->vtxfmt.DrawArrays = vbo_exec_DrawArrays;
- exec->vtxfmt.DrawElements = vbo_exec_DrawElements;
- exec->vtxfmt.DrawRangeElements = vbo_exec_DrawRangeElements;
- exec->vtxfmt.MultiDrawElementsEXT = vbo_exec_MultiDrawElements;
- exec->vtxfmt.DrawElementsBaseVertex = vbo_exec_DrawElementsBaseVertex;
- exec->vtxfmt.DrawRangeElementsBaseVertex = vbo_exec_DrawRangeElementsBaseVertex;
- exec->vtxfmt.MultiDrawElementsBaseVertex = vbo_exec_MultiDrawElementsBaseVertex;
- exec->vtxfmt.DrawArraysInstanced = vbo_exec_DrawArraysInstanced;
- exec->vtxfmt.DrawArraysInstancedBaseInstance = vbo_exec_DrawArraysInstancedBaseInstance;
- exec->vtxfmt.DrawElementsInstanced = vbo_exec_DrawElementsInstanced;
- exec->vtxfmt.DrawElementsInstancedBaseInstance = vbo_exec_DrawElementsInstancedBaseInstance;
- exec->vtxfmt.DrawElementsInstancedBaseVertex = vbo_exec_DrawElementsInstancedBaseVertex;
- exec->vtxfmt.DrawElementsInstancedBaseVertexBaseInstance = vbo_exec_DrawElementsInstancedBaseVertexBaseInstance;
- exec->vtxfmt.DrawTransformFeedback = vbo_exec_DrawTransformFeedback;
- exec->vtxfmt.DrawTransformFeedbackStream =
- vbo_exec_DrawTransformFeedbackStream;
- exec->vtxfmt.DrawTransformFeedbackInstanced =
- vbo_exec_DrawTransformFeedbackInstanced;
- exec->vtxfmt.DrawTransformFeedbackStreamInstanced =
- vbo_exec_DrawTransformFeedbackStreamInstanced;
-}
+ SET_DrawArrays(exec, vbo_exec_DrawArrays);
+ SET_DrawElements(exec, vbo_exec_DrawElements);
+ if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
+ SET_DrawRangeElements(exec, vbo_exec_DrawRangeElements);
+ }
-void
-vbo_exec_array_destroy( struct vbo_exec_context *exec )
-{
- /* nothing to do */
+ SET_MultiDrawElementsEXT(exec, vbo_exec_MultiDrawElements);
+
+ if (ctx->API == API_OPENGL_COMPAT) {
+ SET_Rectf(exec, vbo_exec_Rectf);
+ SET_EvalMesh1(exec, vbo_exec_EvalMesh1);
+ SET_EvalMesh2(exec, vbo_exec_EvalMesh2);
+ }
+
+ if (_mesa_is_desktop_gl(ctx)) {
+ SET_DrawElementsBaseVertex(exec, vbo_exec_DrawElementsBaseVertex);
+ SET_DrawRangeElementsBaseVertex(exec, vbo_exec_DrawRangeElementsBaseVertex);
+ SET_MultiDrawElementsBaseVertex(exec, vbo_exec_MultiDrawElementsBaseVertex);
+ SET_DrawArraysInstancedBaseInstance(exec, vbo_exec_DrawArraysInstancedBaseInstance);
+ SET_DrawElementsInstancedBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseInstance);
+ SET_DrawElementsInstancedBaseVertex(exec, vbo_exec_DrawElementsInstancedBaseVertex);
+ SET_DrawElementsInstancedBaseVertexBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseVertexBaseInstance);
+ }
+
+ if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
+ SET_DrawArraysInstancedARB(exec, vbo_exec_DrawArraysInstanced);
+ SET_DrawElementsInstancedARB(exec, vbo_exec_DrawElementsInstanced);
+ }
+
+ if (_mesa_is_desktop_gl(ctx)) {
+ SET_DrawTransformFeedback(exec, vbo_exec_DrawTransformFeedback);
+ SET_DrawTransformFeedbackStream(exec, vbo_exec_DrawTransformFeedbackStream);
+ SET_DrawTransformFeedbackInstanced(exec, vbo_exec_DrawTransformFeedbackInstanced);
+ SET_DrawTransformFeedbackStreamInstanced(exec, vbo_exec_DrawTransformFeedbackStreamInstanced);
+ }
}
diff --git a/mesalib/src/mesa/vbo/vbo_exec_draw.c b/mesalib/src/mesa/vbo/vbo_exec_draw.c
index 9529ce069..6a4f2a98b 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_draw.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_draw.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
@@ -30,7 +31,6 @@
#include "main/compiler.h"
#include "main/context.h"
#include "main/enums.h"
-#include "main/mfeatures.h"
#include "main/state.h"
#include "main/vtxfmt.h"
diff --git a/mesalib/src/mesa/vbo/vbo_exec_eval.c b/mesalib/src/mesa/vbo/vbo_exec_eval.c
index e6c728476..103b04a01 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_eval.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_eval.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/vbo/vbo_noop.c b/mesalib/src/mesa/vbo/vbo_noop.c
index 2f2200219..f86984589 100644
--- a/mesalib/src/mesa/vbo/vbo_noop.c
+++ b/mesalib/src/mesa/vbo/vbo_noop.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 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.
*/
@@ -29,12 +30,10 @@
#include "main/glheader.h"
-#include "main/api_arrayelt.h"
#include "main/context.h"
#include "main/dispatch.h"
#include "main/dlist.h"
#include "main/eval.h"
-#include "main/mfeatures.h"
#include "vbo/vbo_noop.h"
static void GLAPIENTRY
@@ -332,84 +331,23 @@ _mesa_noop_EvalPoint2(GLint a, GLint b)
}
static void GLAPIENTRY
-_mesa_noop_Begin(GLenum mode)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_End(void)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_PrimitiveRestartNV(void)
-{
-}
-
-
-static void GLAPIENTRY
-_mesa_noop_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
-}
-
-
-static void GLAPIENTRY
-_mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
- const GLvoid * indices)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
- const GLvoid * indices, GLint basevertex)
+_mesa_noop_ArrayElement(GLint elem)
{
}
static void GLAPIENTRY
-_mesa_noop_DrawRangeElements(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid * indices)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_MultiDrawElements(GLenum mode, const GLsizei * count, GLenum type,
- const GLvoid ** indices, GLsizei primcount)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_DrawRangeElementsBaseVertex(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid * indices,
- GLint basevertex)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei * count,
- GLenum type,
- const GLvoid * const *indices,
- GLsizei primcount,
- const GLint * basevertex)
+_mesa_noop_Begin(GLenum mode)
{
}
static void GLAPIENTRY
-_mesa_noop_EvalMesh1(GLenum mode, GLint i1, GLint i2)
+_mesa_noop_End(void)
{
}
static void GLAPIENTRY
-_mesa_noop_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+_mesa_noop_PrimitiveRestartNV(void)
{
}
@@ -422,11 +360,12 @@ _mesa_noop_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
void
_mesa_noop_vtxfmt_init(GLvertexformat * vfmt)
{
- _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+ vfmt->ArrayElement = _mesa_noop_ArrayElement;
vfmt->Begin = _mesa_noop_Begin;
- _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_);
+ vfmt->CallList = _mesa_CallList;
+ vfmt->CallLists = _mesa_CallLists;
vfmt->Color3f = _mesa_noop_Color3f;
vfmt->Color3fv = _mesa_noop_Color3fv;
@@ -437,7 +376,12 @@ _mesa_noop_vtxfmt_init(GLvertexformat * vfmt)
vfmt->PrimitiveRestartNV = _mesa_noop_PrimitiveRestartNV;
- _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_);
+ vfmt->EvalCoord1f = _mesa_noop_EvalCoord1f;
+ vfmt->EvalCoord1fv = _mesa_noop_EvalCoord1fv;
+ vfmt->EvalCoord2f = _mesa_noop_EvalCoord2f;
+ vfmt->EvalCoord2fv = _mesa_noop_EvalCoord2fv;
+ vfmt->EvalPoint1 = _mesa_noop_EvalPoint1;
+ vfmt->EvalPoint2 = _mesa_noop_EvalPoint2;
vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT;
vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT;
@@ -486,16 +430,6 @@ _mesa_noop_vtxfmt_init(GLvertexformat * vfmt)
vfmt->VertexAttrib3fvARB = _mesa_noop_VertexAttrib3fvARB;
vfmt->VertexAttrib4fARB = _mesa_noop_VertexAttrib4fARB;
vfmt->VertexAttrib4fvARB = _mesa_noop_VertexAttrib4fvARB;
-
- vfmt->Rectf = _mesa_noop_Rectf;
-
- vfmt->DrawArrays = _mesa_noop_DrawArrays;
- vfmt->DrawElements = _mesa_noop_DrawElements;
- vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements;
- vfmt->MultiDrawElementsEXT = _mesa_noop_MultiDrawElements;
- vfmt->DrawElementsBaseVertex = _mesa_noop_DrawElementsBaseVertex;
- vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex;
- vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex;
}
diff --git a/mesalib/src/mesa/vbo/vbo_noop.h b/mesalib/src/mesa/vbo/vbo_noop.h
index 044d373e8..f61cd5136 100644
--- a/mesalib/src/mesa/vbo/vbo_noop.h
+++ b/mesalib/src/mesa/vbo/vbo_noop.h
@@ -17,16 +17,16 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _API_NOOP_H
#define _API_NOOP_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
diff --git a/mesalib/src/mesa/vbo/vbo_primitive_restart.c b/mesalib/src/mesa/vbo/vbo_primitive_restart.c
index a6a0149ca..418f8829d 100644
--- a/mesalib/src/mesa/vbo/vbo_primitive_restart.c
+++ b/mesalib/src/mesa/vbo/vbo_primitive_restart.c
@@ -31,6 +31,7 @@
#include "main/imports.h"
#include "main/bufferobj.h"
#include "main/macros.h"
+#include "main/varray.h"
#include "vbo.h"
#include "vbo_context.h"
@@ -171,7 +172,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
GLuint sub_prim_num;
GLuint end_index;
GLuint sub_end_index;
- GLuint restart_index = ctx->Array._RestartIndex;
+ GLuint restart_index = _mesa_primitive_restart_index(ctx, ib->type);
struct _mesa_prim temp_prim;
struct vbo_context *vbo = vbo_context(ctx);
vbo_draw_func draw_prims_func = vbo->draw_prims;
diff --git a/mesalib/src/mesa/vbo/vbo_rebase.c b/mesalib/src/mesa/vbo/vbo_rebase.c
index d0bf6c59d..65ab58bf3 100644
--- a/mesalib/src/mesa/vbo/vbo_rebase.c
+++ b/mesalib/src/mesa/vbo/vbo_rebase.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/vbo/vbo_save.c b/mesalib/src/mesa/vbo/vbo_save.c
index ad11b5ddc..305256a3a 100644
--- a/mesalib/src/mesa/vbo/vbo_save.c
+++ b/mesalib/src/mesa/vbo/vbo_save.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
@@ -29,7 +30,6 @@
#include "main/mtypes.h"
#include "main/bufferobj.h"
#include "main/imports.h"
-#include "main/mfeatures.h"
#include "vbo_context.h"
@@ -86,7 +86,7 @@ void vbo_save_init( struct gl_context *ctx )
}
}
- ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
+ ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
}
diff --git a/mesalib/src/mesa/vbo/vbo_save.h b/mesalib/src/mesa/vbo/vbo_save.h
index 750117b12..aa075bb31 100644
--- a/mesalib/src/mesa/vbo/vbo_save.h
+++ b/mesalib/src/mesa/vbo/vbo_save.h
@@ -34,7 +34,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef VBO_SAVE_H
#define VBO_SAVE_H
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "vbo.h"
#include "vbo_attrib.h"
@@ -127,10 +126,10 @@ struct vbo_save_context {
struct gl_client_array arrays[VBO_ATTRIB_MAX];
const struct gl_client_array *inputs[VBO_ATTRIB_MAX];
- GLubyte attrsz[VBO_ATTRIB_MAX];
- GLenum attrtype[VBO_ATTRIB_MAX];
- GLubyte active_sz[VBO_ATTRIB_MAX];
- GLuint vertex_size;
+ GLubyte attrsz[VBO_ATTRIB_MAX]; /**< 1, 2, 3 or 4 */
+ GLenum attrtype[VBO_ATTRIB_MAX]; /**< GL_FLOAT, GL_INT, etc */
+ GLubyte active_sz[VBO_ATTRIB_MAX]; /**< 1, 2, 3 or 4 */
+ GLuint vertex_size; /**< size in GLfloats */
GLboolean out_of_memory; /**< True if last VBO allocation failed */
diff --git a/mesalib/src/mesa/vbo/vbo_save_api.c b/mesalib/src/mesa/vbo/vbo_save_api.c
index 749071753..26951bd94 100644
--- a/mesalib/src/mesa/vbo/vbo_save_api.c
+++ b/mesalib/src/mesa/vbo/vbo_save_api.c
@@ -74,7 +74,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/enums.h"
#include "main/eval.h"
#include "main/macros.h"
-#include "main/mfeatures.h"
#include "main/api_validate.h"
#include "main/api_arrayelt.h"
#include "main/vtxfmt.h"
@@ -306,9 +305,9 @@ _save_reset_counters(struct gl_context *ctx)
* previous prim.
*/
static void
-vbo_merge_prims(struct gl_context *ctx,
- struct _mesa_prim *prim_list,
- GLuint *prim_count)
+merge_prims(struct gl_context *ctx,
+ struct _mesa_prim *prim_list,
+ GLuint *prim_count)
{
GLuint i;
struct _mesa_prim *prev_prim = prim_list;
@@ -316,19 +315,13 @@ vbo_merge_prims(struct gl_context *ctx,
for (i = 1; i < *prim_count; i++) {
struct _mesa_prim *this_prim = prim_list + i;
- if (this_prim->mode == prev_prim->mode &&
- this_prim->mode == GL_QUADS &&
- this_prim->count % 4 == 0 &&
- prev_prim->count % 4 == 0 &&
- this_prim->start == prev_prim->start + prev_prim->count &&
- this_prim->basevertex == prev_prim->basevertex &&
- this_prim->num_instances == prev_prim->num_instances &&
- this_prim->base_instance == prev_prim->base_instance) {
+ vbo_try_prim_conversion(this_prim);
+
+ if (vbo_can_merge_prims(prev_prim, this_prim)) {
/* We've found a prim that just extend the previous one. Tack it
* onto the previous one, and let this primitive struct get dropped.
*/
- prev_prim->count += this_prim->count;
- prev_prim->end = this_prim->end;
+ vbo_merge_prims(prev_prim, this_prim);
continue;
}
@@ -421,7 +414,7 @@ _save_compile_vertex_list(struct gl_context *ctx)
*/
save->copied.nr = _save_copy_vertices(ctx, node, save->buffer);
- vbo_merge_prims(ctx, node->prim, &node->prim_count);
+ merge_prims(ctx, node->prim, &node->prim_count);
/* Deal with GL_COMPILE_AND_EXECUTE:
*/
@@ -476,6 +469,8 @@ _save_compile_vertex_list(struct gl_context *ctx)
/**
+ * This is called when we fill a vertex buffer before we hit a glEnd().
+ * We
* TODO -- If no new vertices have been stored, don't bother saving it.
*/
static void
@@ -584,7 +579,11 @@ _save_copy_from_current(struct gl_context *ctx)
}
-/* Flush existing data, set new attrib size, replay copied vertices.
+/**
+ * Called when we increase the size of a vertex attribute. For example,
+ * if we've seen one or more glTexCoord2f() calls and now we get a
+ * glTexCoord3f() call.
+ * Flush existing data, set new attrib size, replay copied vertices.
*/
static void
_save_upgrade_vertex(struct gl_context *ctx, GLuint attr, GLuint newsz)
@@ -641,7 +640,7 @@ _save_upgrade_vertex(struct gl_context *ctx, GLuint attr, GLuint newsz)
* and will need fixup at runtime.
*/
if (save->copied.nr) {
- GLfloat *data = save->copied.buffer;
+ const GLfloat *data = save->copied.buffer;
GLfloat *dest = save->buffer;
GLuint j;
@@ -683,6 +682,11 @@ _save_upgrade_vertex(struct gl_context *ctx, GLuint attr, GLuint newsz)
}
+/**
+ * This is called when the size of a vertex attribute changes.
+ * For example, after seeing one or more glTexCoord2f() calls we
+ * get a glTexCoord4f() or glTexCoord1f() call.
+ */
static void
save_fixup_vertex(struct gl_context *ctx, GLuint attr, GLuint sz)
{
@@ -709,6 +713,11 @@ save_fixup_vertex(struct gl_context *ctx, GLuint attr, GLuint sz)
}
+/**
+ * Reset the current size of all vertex attributes to the default
+ * value of 0. This signals that we haven't yet seen any per-vertex
+ * commands such as glNormal3f() or glTexCoord2f().
+ */
static void
_save_reset_vertex(struct gl_context *ctx)
{
@@ -861,7 +870,7 @@ dlist_fallback(struct gl_context *ctx)
else {
_mesa_install_save_vtxfmt(ctx, &ctx->ListState.ListVtxfmt);
}
- ctx->Driver.SaveNeedFlush = 0;
+ ctx->Driver.SaveNeedFlush = GL_FALSE;
}
@@ -931,15 +940,16 @@ _save_CallLists(GLsizei n, GLenum type, const GLvoid * v)
-/* This begin is hooked into ... Updating of
- * ctx->Driver.CurrentSavePrimitive is already taken care of.
+/**
+ * Called via ctx->Driver.NotifySaveBegin() when a glBegin is getting
+ * compiled into a display list.
+ * Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
*/
GLboolean
vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
-
- GLuint i = save->prim_count++;
+ const GLuint i = save->prim_count++;
assert(i < save->prim_max);
save->prim[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK;
@@ -960,7 +970,13 @@ vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
else {
_mesa_install_save_vtxfmt(ctx, &save->vtxfmt);
}
- ctx->Driver.SaveNeedFlush = 1;
+
+ /* We need to call SaveFlushVertices() if there's state change */
+ ctx->Driver.SaveNeedFlush = GL_TRUE;
+
+ /* GL_TRUE means we've handled this glBegin here; don't compile a BEGIN
+ * opcode into the display list.
+ */
return GL_TRUE;
}
@@ -970,7 +986,7 @@ _save_End(void)
{
GET_CURRENT_CONTEXT(ctx);
struct vbo_save_context *save = &vbo_context(ctx)->save;
- GLint i = save->prim_count - 1;
+ const GLint i = save->prim_count - 1;
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
save->prim[i].end = 1;
@@ -994,198 +1010,6 @@ _save_End(void)
}
-/* These are all errors as this vtxfmt is only installed inside
- * begin/end pairs.
- */
-static void GLAPIENTRY
-_save_DrawElements(GLenum mode, GLsizei count, GLenum type,
- const GLvoid * indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
- GLsizei count, GLenum type, const GLvoid * indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) end;
- (void) count;
- (void) type;
- (void) indices;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
- const GLvoid * indices, GLint basevertex)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- (void) basevertex;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawRangeElementsBaseVertex(GLenum mode,
- GLuint start,
- GLuint end,
- GLsizei count,
- GLenum type,
- const GLvoid * indices, GLint basevertex)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) end;
- (void) count;
- (void) type;
- (void) indices;
- (void) basevertex;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawArrays(GLenum mode, GLint start, GLsizei count)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) count;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawArrays");
-}
-
-
-static void GLAPIENTRY
-_save_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
- const GLvoid **indices, GLsizei primcount)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- (void) primcount;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glMultiDrawElements");
-}
-
-
-static void GLAPIENTRY
-_save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
- GLenum type, const GLvoid * const *indices,
- GLsizei primcount, const GLint *basevertex)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- (void) primcount;
- (void) basevertex;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glMultiDrawElementsBaseVertex");
-}
-
-
-static void GLAPIENTRY
-_save_DrawTransformFeedback(GLenum mode, GLuint name)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawTransformFeedback");
-}
-
-
-static void GLAPIENTRY
-_save_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- (void) stream;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glDrawTransformFeedbackStream");
-}
-
-
-static void GLAPIENTRY
-_save_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
- GLsizei primcount)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- (void) primcount;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glDrawTransformFeedbackInstanced");
-}
-
-
-static void GLAPIENTRY
-_save_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
- GLuint stream, GLsizei primcount)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- (void) stream;
- (void) primcount;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glDrawTransformFeedbackStreamInstanced");
-}
-
-
-static void GLAPIENTRY
-_save_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) x1;
- (void) y1;
- (void) x2;
- (void) y2;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glRectf");
-}
-
-
-static void GLAPIENTRY
-_save_EvalMesh1(GLenum mode, GLint i1, GLint i2)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) i1;
- (void) i2;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glEvalMesh1");
-}
-
-
-static void GLAPIENTRY
-_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) i1;
- (void) i2;
- (void) j1;
- (void) j2;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glEvalMesh2");
-}
-
-
static void GLAPIENTRY
_save_Begin(GLenum mode)
{
@@ -1233,8 +1057,14 @@ _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count)
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLint i;
- if (!_mesa_validate_DrawArrays(ctx, mode, start, count))
+ if (!_mesa_is_valid_prim_mode(ctx, mode)) {
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)");
+ return;
+ }
+ if (count < 0) {
+ _mesa_compile_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count<0)");
return;
+ }
if (save->out_of_memory)
return;
@@ -1263,8 +1093,20 @@ _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum type,
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLint i;
- if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices, 0))
+ if (!_mesa_is_valid_prim_mode(ctx, mode)) {
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawElements(mode)");
+ return;
+ }
+ if (count < 0) {
+ _mesa_compile_error(ctx, GL_INVALID_VALUE, "glDrawElements(count<0)");
+ return;
+ }
+ if (type != GL_UNSIGNED_BYTE &&
+ type != GL_UNSIGNED_SHORT &&
+ type != GL_UNSIGNED_INT) {
+ _mesa_compile_error(ctx, GL_INVALID_VALUE, "glDrawElements(count<0)");
return;
+ }
if (save->out_of_memory)
return;
@@ -1310,9 +1152,26 @@ _save_OBE_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
GET_CURRENT_CONTEXT(ctx);
struct vbo_save_context *save = &vbo_context(ctx)->save;
- if (!_mesa_validate_DrawRangeElements(ctx, mode,
- start, end, count, type, indices, 0))
+ if (!_mesa_is_valid_prim_mode(ctx, mode)) {
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawRangeElements(mode)");
+ return;
+ }
+ if (count < 0) {
+ _mesa_compile_error(ctx, GL_INVALID_VALUE,
+ "glDrawRangeElements(count<0)");
return;
+ }
+ if (type != GL_UNSIGNED_BYTE &&
+ type != GL_UNSIGNED_SHORT &&
+ type != GL_UNSIGNED_INT) {
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawRangeElements(type)");
+ return;
+ }
+ if (end < start) {
+ _mesa_compile_error(ctx, GL_INVALID_VALUE,
+ "glDrawRangeElements(end < start)");
+ return;
+ }
if (save->out_of_memory)
return;
@@ -1360,9 +1219,8 @@ _save_vtxfmt_init(struct gl_context *ctx)
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLvertexformat *vfmt = &save->vtxfmt;
- _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+ vfmt->ArrayElement = _ae_ArrayElement;
- vfmt->Begin = _save_Begin;
vfmt->Color3f = _save_Color3f;
vfmt->Color3fv = _save_Color3fv;
vfmt->Color4f = _save_Color4f;
@@ -1485,30 +1343,42 @@ _save_vtxfmt_init(struct gl_context *ctx)
/* This will all require us to fallback to saving the list as opcodes:
*/
- _MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */
+ vfmt->CallList = _save_CallList;
+ vfmt->CallLists = _save_CallLists;
- _MESA_INIT_EVAL_VTXFMT(vfmt, _save_);
+ vfmt->EvalCoord1f = _save_EvalCoord1f;
+ vfmt->EvalCoord1fv = _save_EvalCoord1fv;
+ vfmt->EvalCoord2f = _save_EvalCoord2f;
+ vfmt->EvalCoord2fv = _save_EvalCoord2fv;
+ vfmt->EvalPoint1 = _save_EvalPoint1;
+ vfmt->EvalPoint2 = _save_EvalPoint2;
/* These calls all generate GL_INVALID_OPERATION since this vtxfmt is
* only used when we're inside a glBegin/End pair.
*/
vfmt->Begin = _save_Begin;
- vfmt->Rectf = _save_Rectf;
- vfmt->DrawArrays = _save_DrawArrays;
- vfmt->DrawElements = _save_DrawElements;
- vfmt->DrawRangeElements = _save_DrawRangeElements;
- vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex;
- vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex;
- vfmt->MultiDrawElementsEXT = _save_MultiDrawElements;
- vfmt->MultiDrawElementsBaseVertex = _save_MultiDrawElementsBaseVertex;
- vfmt->DrawTransformFeedback = _save_DrawTransformFeedback;
- vfmt->DrawTransformFeedbackStream = _save_DrawTransformFeedbackStream;
- vfmt->DrawTransformFeedbackInstanced = _save_DrawTransformFeedbackInstanced;
- vfmt->DrawTransformFeedbackStreamInstanced =
- _save_DrawTransformFeedbackStreamInstanced;
}
+/**
+ * Initialize the dispatch table with the VBO functions for display
+ * list compilation.
+ */
+void
+vbo_initialize_save_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *exec)
+{
+ SET_DrawArrays(exec, _save_OBE_DrawArrays);
+ SET_DrawElements(exec, _save_OBE_DrawElements);
+ SET_DrawRangeElements(exec, _save_OBE_DrawRangeElements);
+ SET_MultiDrawElementsEXT(exec, _save_OBE_MultiDrawElements);
+ SET_MultiDrawElementsBaseVertex(exec, _save_OBE_MultiDrawElementsBaseVertex);
+ SET_Rectf(exec, _save_OBE_Rectf);
+ /* Note: other glDraw functins aren't compiled into display lists */
+}
+
+
+
void
vbo_save_SaveFlushVertices(struct gl_context *ctx)
{
@@ -1516,8 +1386,7 @@ vbo_save_SaveFlushVertices(struct gl_context *ctx)
/* Noop when we are actually active:
*/
- if (ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM ||
- ctx->Driver.CurrentSavePrimitive <= GL_POLYGON)
+ if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX)
return;
if (save->vert_count || save->prim_count)
@@ -1526,7 +1395,7 @@ vbo_save_SaveFlushVertices(struct gl_context *ctx)
_save_copy_to_current(ctx);
_save_reset_vertex(ctx);
_save_reset_counters(ctx);
- ctx->Driver.SaveNeedFlush = 0;
+ ctx->Driver.SaveNeedFlush = GL_FALSE;
}
@@ -1548,7 +1417,7 @@ vbo_save_NewList(struct gl_context *ctx, GLuint list, GLenum mode)
_save_reset_vertex(ctx);
_save_reset_counters(ctx);
- ctx->Driver.SaveNeedFlush = 0;
+ ctx->Driver.SaveNeedFlush = GL_FALSE;
}
@@ -1559,8 +1428,7 @@ vbo_save_EndList(struct gl_context *ctx)
/* EndList called inside a (saved) Begin/End pair?
*/
- if (ctx->Driver.CurrentSavePrimitive != PRIM_OUTSIDE_BEGIN_END) {
-
+ if (_mesa_inside_dlist_begin_end(ctx)) {
if (save->prim_count > 0) {
GLint i = save->prim_count - 1;
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
@@ -1700,14 +1568,4 @@ vbo_save_api_init(struct vbo_save_context *save)
/* These will actually get set again when binding/drawing */
for (i = 0; i < VBO_ATTRIB_MAX; i++)
save->inputs[i] = &save->arrays[i];
-
- /* Hook our array functions into the outside-begin-end vtxfmt in
- * ctx->ListState.
- */
- ctx->ListState.ListVtxfmt.Rectf = _save_OBE_Rectf;
- ctx->ListState.ListVtxfmt.DrawArrays = _save_OBE_DrawArrays;
- ctx->ListState.ListVtxfmt.DrawElements = _save_OBE_DrawElements;
- ctx->ListState.ListVtxfmt.DrawRangeElements = _save_OBE_DrawRangeElements;
- ctx->ListState.ListVtxfmt.MultiDrawElementsEXT = _save_OBE_MultiDrawElements;
- ctx->ListState.ListVtxfmt.MultiDrawElementsBaseVertex = _save_OBE_MultiDrawElementsBaseVertex;
}
diff --git a/mesalib/src/mesa/vbo/vbo_save_draw.c b/mesalib/src/mesa/vbo/vbo_save_draw.c
index f5b5c411d..a6ce379e2 100644
--- a/mesalib/src/mesa/vbo/vbo_save_draw.c
+++ b/mesalib/src/mesa/vbo/vbo_save_draw.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/* Author:
@@ -30,7 +31,6 @@
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/imports.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/light.h"
@@ -269,17 +269,12 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data)
if (node->prim_count > 0) {
- if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END &&
- node->prim[0].begin) {
-
- /* Degenerate case: list is called inside begin/end pair and
- * includes operations such as glBegin or glDrawArrays.
- */
- if (0)
- printf("displaylist recursive begin");
-
- vbo_save_loopback_vertex_list( ctx, node );
-
+ if (_mesa_inside_begin_end(ctx) && node->prim[0].begin) {
+ /* Error: we're about to begin a new primitive but we're already
+ * inside a glBegin/End pair.
+ */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "draw operation inside glBegin/End");
goto end;
}
else if (save->replay_flags) {
diff --git a/mesalib/src/mesa/vbo/vbo_save_loopback.c b/mesalib/src/mesa/vbo/vbo_save_loopback.c
index 98772be76..31343cd67 100644
--- a/mesalib/src/mesa/vbo/vbo_save_loopback.c
+++ b/mesalib/src/mesa/vbo/vbo_save_loopback.c
@@ -29,7 +29,6 @@
#include "main/glheader.h"
#include "main/enums.h"
#include "main/imports.h"
-#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/dispatch.h"
#include "glapi/glapi.h"
@@ -178,7 +177,7 @@ void vbo_loopback_vertex_list( struct gl_context *ctx,
for (i = 0 ; i < prim_count ; i++) {
if ((prim[i].mode & VBO_SAVE_PRIM_WEAK) &&
- (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END))
+ _mesa_inside_begin_end(ctx))
{
loopback_weak_prim( ctx, &prim[i] );
}
diff --git a/mesalib/src/mesa/vbo/vbo_split.c b/mesalib/src/mesa/vbo/vbo_split.c
index c933a3f9a..e128f5bd0 100644
--- a/mesalib/src/mesa/vbo/vbo_split.c
+++ b/mesalib/src/mesa/vbo/vbo_split.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/vbo/vbo_split.h b/mesalib/src/mesa/vbo/vbo_split.h
index b7f0a9c57..a4e5fa0b8 100644
--- a/mesalib/src/mesa/vbo/vbo_split.h
+++ b/mesalib/src/mesa/vbo/vbo_split.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/vbo/vbo_split_copy.c b/mesalib/src/mesa/vbo/vbo_split_copy.c
index a917f39ca..9df36df78 100644
--- a/mesalib/src/mesa/vbo/vbo_split_copy.c
+++ b/mesalib/src/mesa/vbo/vbo_split_copy.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/vbo/vbo_split_inplace.c b/mesalib/src/mesa/vbo/vbo_split_inplace.c
index 8a3830805..b26b00af8 100644
--- a/mesalib/src/mesa/vbo/vbo_split_inplace.c
+++ b/mesalib/src/mesa/vbo/vbo_split_inplace.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
diff --git a/mesalib/src/mesa/x86/3dnow.c b/mesalib/src/mesa/x86/3dnow.c
index de2fb1e2a..f12dc2610 100644
--- a/mesalib/src/mesa/x86/3dnow.c
+++ b/mesalib/src/mesa/x86/3dnow.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/3dnow.h b/mesalib/src/mesa/x86/3dnow.h
index 1c1fedcd4..e13f400d4 100644
--- a/mesalib/src/mesa/x86/3dnow.h
+++ b/mesalib/src/mesa/x86/3dnow.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/3dnow_normal.S b/mesalib/src/mesa/x86/3dnow_normal.S
index 7f5f6b357..b3908f07a 100644
--- a/mesalib/src/mesa/x86/3dnow_normal.S
+++ b/mesalib/src/mesa/x86/3dnow_normal.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/3dnow_xform1.S b/mesalib/src/mesa/x86/3dnow_xform1.S
index a73301a8d..004a734e1 100644
--- a/mesalib/src/mesa/x86/3dnow_xform1.S
+++ b/mesalib/src/mesa/x86/3dnow_xform1.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef USE_3DNOW_ASM
diff --git a/mesalib/src/mesa/x86/3dnow_xform2.S b/mesalib/src/mesa/x86/3dnow_xform2.S
index 2988fb7bf..333ad6342 100644
--- a/mesalib/src/mesa/x86/3dnow_xform2.S
+++ b/mesalib/src/mesa/x86/3dnow_xform2.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef USE_3DNOW_ASM
diff --git a/mesalib/src/mesa/x86/3dnow_xform3.S b/mesalib/src/mesa/x86/3dnow_xform3.S
index a356aaee7..740e07723 100644
--- a/mesalib/src/mesa/x86/3dnow_xform3.S
+++ b/mesalib/src/mesa/x86/3dnow_xform3.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef USE_3DNOW_ASM
diff --git a/mesalib/src/mesa/x86/3dnow_xform4.S b/mesalib/src/mesa/x86/3dnow_xform4.S
index b2b7c64f2..4612d368f 100644
--- a/mesalib/src/mesa/x86/3dnow_xform4.S
+++ b/mesalib/src/mesa/x86/3dnow_xform4.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef USE_3DNOW_ASM
diff --git a/mesalib/src/mesa/x86/Makefile.am b/mesalib/src/mesa/x86/Makefile.am
index 5976bb47c..21ce3607a 100644
--- a/mesalib/src/mesa/x86/Makefile.am
+++ b/mesalib/src/mesa/x86/Makefile.am
@@ -25,7 +25,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
- $(API_DEFINES) \
$(DEFINES)
noinst_PROGRAMS = gen_matypes
diff --git a/mesalib/src/mesa/x86/clip_args.h b/mesalib/src/mesa/x86/clip_args.h
index 796611fbf..bafa535ef 100644
--- a/mesalib/src/mesa/x86/clip_args.h
+++ b/mesalib/src/mesa/x86/clip_args.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/common_x86.c b/mesalib/src/mesa/x86/common_x86.c
index 629950723..910828f16 100644
--- a/mesalib/src/mesa/x86/common_x86.c
+++ b/mesalib/src/mesa/x86/common_x86.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/**
diff --git a/mesalib/src/mesa/x86/common_x86_asm.S b/mesalib/src/mesa/x86/common_x86_asm.S
index ea4047a0e..230d588c4 100644
--- a/mesalib/src/mesa/x86/common_x86_asm.S
+++ b/mesalib/src/mesa/x86/common_x86_asm.S
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/common_x86_asm.h b/mesalib/src/mesa/x86/common_x86_asm.h
index 0d39e3d23..a4b714396 100644
--- a/mesalib/src/mesa/x86/common_x86_asm.h
+++ b/mesalib/src/mesa/x86/common_x86_asm.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/common_x86_features.h b/mesalib/src/mesa/x86/common_x86_features.h
index 676af8c1f..2069b906e 100644
--- a/mesalib/src/mesa/x86/common_x86_features.h
+++ b/mesalib/src/mesa/x86/common_x86_features.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/gen_matypes.c b/mesalib/src/mesa/x86/gen_matypes.c
index 61f181cd9..fff6f541b 100644
--- a/mesalib/src/mesa/x86/gen_matypes.c
+++ b/mesalib/src/mesa/x86/gen_matypes.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
diff --git a/mesalib/src/mesa/x86/mmx.h b/mesalib/src/mesa/x86/mmx.h
index 74e9979d3..0772e0f6f 100644
--- a/mesalib/src/mesa/x86/mmx.h
+++ b/mesalib/src/mesa/x86/mmx.h
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
diff --git a/mesalib/src/mesa/x86/norm_args.h b/mesalib/src/mesa/x86/norm_args.h
index e22f8bbd7..34a546a8b 100644
--- a/mesalib/src/mesa/x86/norm_args.h
+++ b/mesalib/src/mesa/x86/norm_args.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/sse.c b/mesalib/src/mesa/x86/sse.c
index aef15b531..f3e93248b 100644
--- a/mesalib/src/mesa/x86/sse.c
+++ b/mesalib/src/mesa/x86/sse.c
@@ -17,9 +17,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/sse.h b/mesalib/src/mesa/x86/sse.h
index e92ddc139..20a4de277 100644
--- a/mesalib/src/mesa/x86/sse.h
+++ b/mesalib/src/mesa/x86/sse.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/sse_normal.S b/mesalib/src/mesa/x86/sse_normal.S
index a8c0d38c7..7024dd0ce 100644
--- a/mesalib/src/mesa/x86/sse_normal.S
+++ b/mesalib/src/mesa/x86/sse_normal.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/** TODO:
diff --git a/mesalib/src/mesa/x86/sse_xform1.S b/mesalib/src/mesa/x86/sse_xform1.S
index 4aa9de607..d165aff6d 100644
--- a/mesalib/src/mesa/x86/sse_xform1.S
+++ b/mesalib/src/mesa/x86/sse_xform1.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/** TODO:
diff --git a/mesalib/src/mesa/x86/sse_xform2.S b/mesalib/src/mesa/x86/sse_xform2.S
index a443dad35..bb0f75696 100644
--- a/mesalib/src/mesa/x86/sse_xform2.S
+++ b/mesalib/src/mesa/x86/sse_xform2.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/** TODO:
diff --git a/mesalib/src/mesa/x86/sse_xform3.S b/mesalib/src/mesa/x86/sse_xform3.S
index 4bc22d8a5..60c011094 100644
--- a/mesalib/src/mesa/x86/sse_xform3.S
+++ b/mesalib/src/mesa/x86/sse_xform3.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/** TODO:
diff --git a/mesalib/src/mesa/x86/sse_xform4.S b/mesalib/src/mesa/x86/sse_xform4.S
index fb1fa741c..596efd06a 100644
--- a/mesalib/src/mesa/x86/sse_xform4.S
+++ b/mesalib/src/mesa/x86/sse_xform4.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef USE_SSE_ASM
diff --git a/mesalib/src/mesa/x86/x86_cliptest.S b/mesalib/src/mesa/x86/x86_cliptest.S
index e413aee61..b8163dad9 100644
--- a/mesalib/src/mesa/x86/x86_cliptest.S
+++ b/mesalib/src/mesa/x86/x86_cliptest.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/x86_xform.c b/mesalib/src/mesa/x86/x86_xform.c
index 3dcc55e16..8d1488e8b 100644
--- a/mesalib/src/mesa/x86/x86_xform.c
+++ b/mesalib/src/mesa/x86/x86_xform.c
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/x86_xform.h b/mesalib/src/mesa/x86/x86_xform.h
index e886d9add..9052fa46a 100644
--- a/mesalib/src/mesa/x86/x86_xform.h
+++ b/mesalib/src/mesa/x86/x86_xform.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
diff --git a/mesalib/src/mesa/x86/x86_xform2.S b/mesalib/src/mesa/x86/x86_xform2.S
index 980725ef5..b66146041 100644
--- a/mesalib/src/mesa/x86/x86_xform2.S
+++ b/mesalib/src/mesa/x86/x86_xform2.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/x86_xform3.S b/mesalib/src/mesa/x86/x86_xform3.S
index 1c782f1c5..017914095 100644
--- a/mesalib/src/mesa/x86/x86_xform3.S
+++ b/mesalib/src/mesa/x86/x86_xform3.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/x86_xform4.S b/mesalib/src/mesa/x86/x86_xform4.S
index 97a841138..e9e9b7154 100644
--- a/mesalib/src/mesa/x86/x86_xform4.S
+++ b/mesalib/src/mesa/x86/x86_xform4.S
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*
diff --git a/mesalib/src/mesa/x86/xform_args.h b/mesalib/src/mesa/x86/xform_args.h
index b773f5198..d2cf6f712 100644
--- a/mesalib/src/mesa/x86/xform_args.h
+++ b/mesalib/src/mesa/x86/xform_args.h
@@ -18,9 +18,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
/*