From e8d5e7c4bb11f7fcb0a4ba5c13f43e7929849a2f Mon Sep 17 00:00:00 2001
From: marha
Date: Mon, 15 Jun 2015 20:27:26 +0200
Subject: fontconfig libX11 libxcb xcb-proto mesa pixman xserver
xkeyboard-config git update 15 June 2015
xserver commit fa12f2c150b2f50de9dac4a2b09265f13af353af
libxcb commit f85661c3bca97faa72431df92a3867be39a74e23
libxcb/xcb-proto commit fef8a4cdc2cacd9541a656026371a3d338dadb8e
xkeyboard-config commit 61fb58a95a071cc1c212f6d3808908c086219fe0
libX11 commit f0286b2770ece10aef5e2e8c004260217f12fd25
pixman commit eebc1b78200aff075dbcae9c8d00edad1f830d91
fontconfig commit f6d61c9beed856a925bd60c025b55284b2d88161
mesa commit 932d1613d1e15ec22555e5ec09105c49eb850e36
---
fontconfig/README | 40 +-
fontconfig/configure.ac | 2 +-
fontconfig/doc/fontconfig-devel.sgml | 1 +
fontconfig/doc/fontconfig-user.sgml | 6 +-
fontconfig/fontconfig/fontconfig.h | 10 +-
fontconfig/src/fccache.c | 6 +-
fontconfig/src/fcdbg.c | 88 +-
fontconfig/src/fcdefault.c | 1 +
fontconfig/src/fcfreetype.c | 80 +-
fontconfig/src/fcinit.c | 28 +-
fontconfig/src/fcint.h | 41 +-
fontconfig/src/fcmatch.c | 44 +-
fontconfig/src/fcname.c | 20 +-
fontconfig/src/fcobjs.c | 31 +-
fontconfig/src/fcobjs.h | 1 +
fontconfig/src/fcpat.c | 6 +
fontconfig/src/fcrange.c | 109 +-
fontconfig/src/fcxml.c | 63 +-
libX11/modules/im/ximcp/imLcPrs.c | 6 +-
libX11/modules/om/generic/omGeneric.c | 2 +-
libX11/src/FontNames.c | 2 +-
libX11/src/GetFPath.c | 2 +-
libX11/src/ListExt.c | 2 +-
libxcb/src/c_client.py | 103 +-
libxcb/src/xcb_in.c | 1 +
libxcb/src/xcb_out.c | 85 +-
libxcb/src/xcbext.h | 77 +-
libxcb/xcb-proto/doc/xml-xcb.txt | 11 +-
libxcb/xcb-proto/src/present.xml | 10 +-
libxcb/xcb-proto/src/xprint.xml | 8 +-
mesalib/Android.common.mk | 9 +
mesalib/Android.mk | 12 +-
mesalib/CleanSpec.mk | 1 +
mesalib/VERSION | 2 +-
mesalib/configure.ac | 32 +-
mesalib/docs/GL3.txt | 16 +-
mesalib/docs/devinfo.html | 394 ++--
mesalib/docs/index.html | 19 +
mesalib/docs/relnotes.html | 3 +
mesalib/docs/relnotes/10.5.6.html | 147 ++
mesalib/docs/relnotes/10.5.7.html | 103 +
mesalib/docs/relnotes/10.6.0.html | 248 ++-
mesalib/docs/relnotes/10.7.0.html | 60 +
mesalib/include/EGL/egl.h | 562 +++--
mesalib/include/EGL/eglext.h | 258 ++-
mesalib/include/EGL/eglmesaext.h | 33 +-
mesalib/include/EGL/eglplatform.h | 19 +-
mesalib/include/KHR/khrplatform.h | 19 +-
mesalib/scons/llvm.py | 4 +-
mesalib/src/Makefile.am | 3 +-
mesalib/src/gallium/Android.common.mk | 8 +
mesalib/src/gallium/Android.mk | 15 +-
mesalib/src/gallium/auxiliary/Android.mk | 11 +
mesalib/src/gallium/auxiliary/hud/hud_context.c | 6 +
mesalib/src/gallium/auxiliary/nir/tgsi_to_nir.c | 3 -
mesalib/src/gallium/auxiliary/util/u_blit.c | 6 +
mesalib/src/gallium/auxiliary/util/u_blitter.c | 27 +
mesalib/src/gallium/auxiliary/util/u_blitter.h | 16 +-
mesalib/src/gallium/auxiliary/util/u_dump_state.c | 2 +
mesalib/src/gallium/auxiliary/util/u_format_etc.c | 3 +-
mesalib/src/gallium/auxiliary/util/u_math.h | 20 +
mesalib/src/gallium/auxiliary/util/u_tests.h | 8 +
mesalib/src/glsl/Android.mk | 1 -
mesalib/src/glsl/Makefile.am | 33 +-
mesalib/src/glsl/SConscript | 4 +-
mesalib/src/glsl/ast_array_index.cpp | 2 +-
mesalib/src/glsl/ast_function.cpp | 30 +-
mesalib/src/glsl/ast_to_hir.cpp | 128 +-
mesalib/src/glsl/builtin_functions.cpp | 18 +
mesalib/src/glsl/glsl_parser_extras.cpp | 4 +-
mesalib/src/glsl/glsl_types.cpp | 2 +-
mesalib/src/glsl/glsl_types.h | 14 +-
mesalib/src/glsl/ir.cpp | 4 +-
mesalib/src/glsl/ir.h | 24 +
mesalib/src/glsl/ir_hierarchical_visitor.cpp | 9 +
mesalib/src/glsl/ir_hierarchical_visitor.h | 3 +-
mesalib/src/glsl/ir_hv_accept.cpp | 6 +
mesalib/src/glsl/ir_print_visitor.cpp | 5 +
mesalib/src/glsl/ir_print_visitor.h | 1 +
mesalib/src/glsl/ir_uniform.h | 5 +
mesalib/src/glsl/ir_visitor.h | 2 +
mesalib/src/glsl/link_atomics.cpp | 2 +-
mesalib/src/glsl/link_uniform_initializers.cpp | 4 +-
mesalib/src/glsl/link_uniforms.cpp | 55 +-
mesalib/src/glsl/link_varyings.cpp | 2 +-
mesalib/src/glsl/linker.cpp | 30 +-
mesalib/src/glsl/lower_clip_distance.cpp | 8 +-
mesalib/src/glsl/main.cpp | 8 +-
mesalib/src/glsl/nir/glsl_to_nir.cpp | 15 +-
mesalib/src/glsl/nir/nir_intrinsics.h | 20 +-
mesalib/src/glsl/nir/nir_lower_atomics.c | 2 +-
mesalib/src/glsl/nir/nir_lower_io.c | 2 -
mesalib/src/glsl/nir/nir_lower_phis_to_scalar.c | 5 +
mesalib/src/glsl/nir/nir_opt_algebraic.py | 2 +
mesalib/src/glsl/nir/nir_opt_peephole_ffma.c | 19 +-
mesalib/src/glsl/standalone_scaffolding.cpp | 2 +-
mesalib/src/loader/Android.mk | 2 +
mesalib/src/loader/Makefile.am | 10 +-
.../src/mapi/glapi/gen/AMD_performance_monitor.xml | 22 +-
.../src/mapi/glapi/gen/APPLE_object_purgeable.xml | 6 +-
.../mapi/glapi/gen/APPLE_vertex_array_object.xml | 10 +-
.../src/mapi/glapi/gen/ARB_ES2_compatibility.xml | 10 +-
mesalib/src/mapi/glapi/gen/ARB_base_instance.xml | 9 +-
.../src/mapi/glapi/gen/ARB_blend_func_extended.xml | 4 +-
.../src/mapi/glapi/gen/ARB_clear_buffer_object.xml | 8 +-
mesalib/src/mapi/glapi/gen/ARB_clear_texture.xml | 4 +-
mesalib/src/mapi/glapi/gen/ARB_clip_control.xml | 2 +-
mesalib/src/mapi/glapi/gen/ARB_compute_shader.xml | 4 +-
mesalib/src/mapi/glapi/gen/ARB_copy_buffer.xml | 2 +-
mesalib/src/mapi/glapi/gen/ARB_copy_image.xml | 2 +-
.../src/mapi/glapi/gen/ARB_direct_state_access.xml | 158 +-
.../src/mapi/glapi/gen/ARB_draw_buffers_blend.xml | 8 +-
.../glapi/gen/ARB_draw_elements_base_vertex.xml | 11 +-
mesalib/src/mapi/glapi/gen/ARB_draw_indirect.xml | 8 +-
mesalib/src/mapi/glapi/gen/ARB_draw_instanced.xml | 4 +-
.../src/mapi/glapi/gen/ARB_framebuffer_object.xml | 46 +-
.../src/mapi/glapi/gen/ARB_geometry_shader4.xml | 2 +-
.../src/mapi/glapi/gen/ARB_get_program_binary.xml | 6 +-
mesalib/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml | 36 +-
.../mapi/glapi/gen/ARB_internalformat_query.xml | 3 +-
.../src/mapi/glapi/gen/ARB_invalidate_subdata.xml | 12 +-
.../src/mapi/glapi/gen/ARB_map_buffer_range.xml | 4 +-
mesalib/src/mapi/glapi/gen/ARB_multi_bind.xml | 12 +-
.../mapi/glapi/gen/ARB_program_interface_query.xml | 12 +-
mesalib/src/mapi/glapi/gen/ARB_robustness.xml | 40 +-
mesalib/src/mapi/glapi/gen/ARB_sampler_objects.xml | 28 +-
.../mapi/glapi/gen/ARB_separate_shader_objects.xml | 122 +-
.../mapi/glapi/gen/ARB_shader_atomic_counters.xml | 2 +-
.../mapi/glapi/gen/ARB_shader_image_load_store.xml | 4 +-
mesalib/src/mapi/glapi/gen/ARB_sync.xml | 14 +-
.../mapi/glapi/gen/ARB_texture_buffer_range.xml | 2 +-
.../src/mapi/glapi/gen/ARB_texture_multisample.xml | 8 +-
mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml | 12 +-
.../glapi/gen/ARB_texture_storage_multisample.xml | 4 +-
mesalib/src/mapi/glapi/gen/ARB_texture_view.xml | 2 +-
.../mapi/glapi/gen/ARB_uniform_buffer_object.xml | 14 +-
.../src/mapi/glapi/gen/ARB_vertex_array_object.xml | 8 +-
.../src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml | 20 +-
.../mapi/glapi/gen/ARB_vertex_attrib_binding.xml | 12 +-
.../glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml | 106 +-
mesalib/src/mapi/glapi/gen/ARB_viewport_array.xml | 20 +-
.../src/mapi/glapi/gen/EXT_framebuffer_object.xml | 6 +-
mesalib/src/mapi/glapi/gen/EXT_gpu_shader4.xml | 28 +-
.../src/mapi/glapi/gen/EXT_provoking_vertex.xml | 2 +-
.../mapi/glapi/gen/EXT_separate_shader_objects.xml | 94 +-
mesalib/src/mapi/glapi/gen/EXT_texture_integer.xml | 4 +-
.../src/mapi/glapi/gen/EXT_transform_feedback.xml | 16 +-
mesalib/src/mapi/glapi/gen/GL3x.xml | 100 +-
mesalib/src/mapi/glapi/gen/GL4x.xml | 10 +-
.../src/mapi/glapi/gen/INTEL_performance_query.xml | 20 +-
mesalib/src/mapi/glapi/gen/KHR_debug.xml | 20 +-
mesalib/src/mapi/glapi/gen/Makefile.am | 8 +-
.../src/mapi/glapi/gen/NV_primitive_restart.xml | 4 +-
mesalib/src/mapi/glapi/gen/NV_texture_barrier.xml | 2 +-
mesalib/src/mapi/glapi/gen/NV_vdpau_interop.xml | 20 +-
mesalib/src/mapi/glapi/gen/OES_EGL_image.xml | 6 +-
mesalib/src/mapi/glapi/gen/OES_fixed_point.xml | 123 +-
.../src/mapi/glapi/gen/OES_single_precision.xml | 17 +-
mesalib/src/mapi/glapi/gen/apiexec.py | 240 +++
mesalib/src/mapi/glapi/gen/es_EXT.xml | 166 +-
mesalib/src/mapi/glapi/gen/glX_proto_recv.py | 62 +-
mesalib/src/mapi/glapi/gen/glX_proto_send.py | 70 +-
mesalib/src/mapi/glapi/gen/glX_proto_size.py | 99 +-
mesalib/src/mapi/glapi/gen/glX_server_table.py | 38 +-
mesalib/src/mapi/glapi/gen/gl_API.dtd | 2 -
mesalib/src/mapi/glapi/gen/gl_API.xml | 1741 +++++++---------
mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py | 41 +-
mesalib/src/mapi/glapi/gen/gl_XML.py | 20 +-
mesalib/src/mapi/glapi/gen/gl_and_es_API.xml | 86 +-
mesalib/src/mapi/glapi/gen/gl_apitemp.py | 44 +-
mesalib/src/mapi/glapi/gen/gl_enums.py | 34 +-
mesalib/src/mapi/glapi/gen/gl_genexec.py | 90 +-
mesalib/src/mapi/glapi/gen/gl_gentable.py | 34 +-
mesalib/src/mapi/glapi/gen/gl_procs.py | 52 +-
mesalib/src/mapi/glapi/gen/gl_table.py | 97 +-
mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py | 47 +-
mesalib/src/mapi/glapi/gen/gl_x86_asm.py | 45 +-
mesalib/src/mapi/glapi/gen/remap_helper.py | 53 +-
mesalib/src/mapi/glapi/gen/static_data.py | 1729 +++++++++++++++
mesalib/src/mesa/Android.gen.mk | 16 +-
mesalib/src/mesa/Android.libmesa_glsl_utils.mk | 6 +-
mesalib/src/mesa/Makefile.am | 1 -
mesalib/src/mesa/drivers/SConscript | 3 -
mesalib/src/mesa/drivers/common/meta_blit.c | 6 +-
.../src/mesa/drivers/common/meta_tex_subimage.c | 12 +-
mesalib/src/mesa/drivers/dri/Makefile.am | 1 +
mesalib/src/mesa/drivers/dri/common/Android.mk | 8 +-
mesalib/src/mesa/drivers/dri/common/Makefile.am | 6 +-
.../src/mesa/drivers/dri/common/Makefile.sources | 4 +-
mesalib/src/mesa/drivers/dri/common/SConscript | 2 +-
mesalib/src/mesa/drivers/dri/common/dri_util.c | 22 +-
mesalib/src/mesa/drivers/dri/swrast/swrast.c | 4 +-
mesalib/src/mesa/drivers/haiku/swrast/SConscript | 33 -
.../src/mesa/drivers/haiku/swrast/SoftwareRast.cpp | 697 -------
.../src/mesa/drivers/haiku/swrast/SoftwareRast.h | 95 -
.../mesa/drivers/haiku/swrast/SoftwareRast.rdef | 39 -
mesalib/src/mesa/main/api_exec.h | 3 +
mesalib/src/mesa/main/api_loopback.c | 2 +
mesalib/src/mesa/main/arrayobj.c | 22 -
mesalib/src/mesa/main/attrib.c | 22 +
mesalib/src/mesa/main/blit.c | 7 -
mesalib/src/mesa/main/bufferobj.c | 105 -
mesalib/src/mesa/main/buffers.c | 21 -
mesalib/src/mesa/main/clear.c | 32 -
mesalib/src/mesa/main/config.h | 13 +-
mesalib/src/mesa/main/context.c | 73 +-
mesalib/src/mesa/main/copyimage.c | 39 +-
mesalib/src/mesa/main/depth.c | 6 +-
mesalib/src/mesa/main/dlist.c | 30 +-
mesalib/src/mesa/main/errors.c | 1 +
mesalib/src/mesa/main/extensions.c | 2 +-
mesalib/src/mesa/main/fbobject.c | 103 +-
mesalib/src/mesa/main/formats.c | 11 +
mesalib/src/mesa/main/genmipmap.c | 7 -
mesalib/src/mesa/main/get.c | 12 +
mesalib/src/mesa/main/get_hash_params.py | 8 +-
mesalib/src/mesa/main/getstring.c | 16 +-
mesalib/src/mesa/main/glformats.c | 43 +-
mesalib/src/mesa/main/glformats.h | 2 +-
mesalib/src/mesa/main/glheader.h | 6 -
mesalib/src/mesa/main/hash.c | 28 -
mesalib/src/mesa/main/hash.h | 3 -
mesalib/src/mesa/main/mtypes.h | 14 +-
mesalib/src/mesa/main/pipelineobj.c | 6 -
mesalib/src/mesa/main/program_resource.c | 6 +-
mesalib/src/mesa/main/queryobj.c | 7 -
mesalib/src/mesa/main/readpix.c | 25 +-
mesalib/src/mesa/main/readpix.h | 3 +
mesalib/src/mesa/main/samplerobj.c | 7 -
mesalib/src/mesa/main/shader_query.cpp | 25 +-
mesalib/src/mesa/main/shaderapi.c | 6 +-
mesalib/src/mesa/main/shaderobj.c | 4 +-
mesalib/src/mesa/main/shared.c | 1 -
mesalib/src/mesa/main/state.c | 2 +-
mesalib/src/mesa/main/texgetimage.c | 14 -
mesalib/src/mesa/main/teximage.c | 76 +-
mesalib/src/mesa/main/texobj.c | 14 -
mesalib/src/mesa/main/texparam.c | 84 -
mesalib/src/mesa/main/texstorage.c | 7 -
mesalib/src/mesa/main/textureview.c | 95 +-
mesalib/src/mesa/main/textureview.h | 9 +-
mesalib/src/mesa/main/transformfeedback.c | 42 -
mesalib/src/mesa/main/uniform_query.cpp | 15 +-
mesalib/src/mesa/main/uniforms.h | 4 -
mesalib/src/mesa/main/varray.c | 64 -
mesalib/src/mesa/main/version.c | 75 +-
mesalib/src/mesa/main/version.h | 3 -
mesalib/src/mesa/main/vtxfmt.c | 2 +-
mesalib/src/mesa/program/dummy_errors.c | 30 +
mesalib/src/mesa/program/ir_to_mesa.cpp | 20 +-
mesalib/src/mesa/program/prog_execute.c | 2 +-
mesalib/src/mesa/program/prog_instruction.c | 12 +-
mesalib/src/mesa/program/prog_instruction.h | 33 +-
mesalib/src/mesa/program/prog_optimize.c | 4 +-
mesalib/src/mesa/program/prog_print.c | 8 +-
mesalib/src/mesa/program/prog_to_nir.c | 108 +-
mesalib/src/mesa/program/program.c | 24 +-
mesalib/src/mesa/program/program_parse.y | 8 +-
mesalib/src/mesa/program/program_parse_extra.c | 4 +-
mesalib/src/mesa/program/programopt.c | 6 +-
mesalib/src/mesa/state_tracker/st_atom_shader.c | 2 +-
mesalib/src/mesa/state_tracker/st_cb_bitmap.c | 8 +-
mesalib/src/mesa/state_tracker/st_cb_blit.c | 4 +
mesalib/src/mesa/state_tracker/st_cb_clear.c | 6 +
mesalib/src/mesa/state_tracker/st_cb_drawpixels.c | 8 +-
mesalib/src/mesa/state_tracker/st_cb_drawtex.c | 6 +
mesalib/src/mesa/state_tracker/st_cb_program.c | 8 +-
mesalib/src/mesa/state_tracker/st_context.c | 6 -
mesalib/src/mesa/state_tracker/st_draw.c | 2 +-
mesalib/src/mesa/state_tracker/st_extensions.c | 6 -
mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 829 +++++---
mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.h | 2 +
mesalib/src/mesa/state_tracker/st_manager.c | 3 +-
mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c | 9 +-
mesalib/src/mesa/state_tracker/st_program.c | 24 +-
mesalib/src/mesa/state_tracker/st_program.h | 1 +
mesalib/src/mesa/tnl/t_context.c | 1 +
mesalib/src/mesa/vbo/vbo_exec_array.c | 5 +-
pixman/pixman/pixman-arm-common.h | 11 +-
pixman/pixman/pixman-arm-neon.c | 24 +-
pixman/pixman/pixman-arm-simd.c | 18 +-
pixman/pixman/pixman-inlines.h | 3 +-
pixman/pixman/pixman-mips-dspr2.c | 8 +-
pixman/pixman/pixman-mips-dspr2.h | 6 -
pixman/pixman/pixman-mmx.c | 24 +-
pixman/pixman/pixman-sse2.c | 24 +-
pixman/test/solid-test.c | 9 +-
xorg-server/config/10-evdev.conf | 40 -
xorg-server/config/Makefile.am | 4 +-
xorg-server/dix/devices.c | 4 +-
xorg-server/dix/getevents.c | 27 +-
xorg-server/dix/inpututils.c | 78 +-
xorg-server/glamor/glamor_largepixmap.c | 9 +
xorg-server/glamor/glamor_render.c | 9 +-
xorg-server/hw/xfree86/common/xf86Module.h | 2 +-
xorg-server/hw/xfree86/common/xf86Xinput.c | 4 +
xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 12 -
xorg-server/hw/xwayland/xwayland-cursor.c | 26 +
xorg-server/hw/xwayland/xwayland-input.c | 2 +
xorg-server/hw/xwayland/xwayland.c | 4 +-
xorg-server/hw/xwayland/xwayland.h | 4 +-
xorg-server/include/input.h | 15 +
xorg-server/include/inpututils.h | 2 +
xorg-server/include/os.h | 17 +
xorg-server/os/access.c | 109 +
xorg-server/os/auth.c | 8 +-
xorg-server/os/backtrace.c | 4 +-
xorg-server/present/present.c | 8 +-
xorg-server/test/input.c | 63 +
xorg-server/xkeyboard-config/NEWS | 2 +
xorg-server/xkeyboard-config/configure.ac | 2 +-
xorg-server/xkeyboard-config/po/ca.po | 2201 +++++++-------------
xorg-server/xkeyboard-config/po/cs.po | 1514 +++++++-------
xorg-server/xkeyboard-config/po/da.po | 1673 +++++++--------
xorg-server/xkeyboard-config/po/de.po | 1514 +++++++-------
xorg-server/xkeyboard-config/po/es.po | 1674 +++++++--------
xorg-server/xkeyboard-config/po/fr.po | 1512 +++++++-------
xorg-server/xkeyboard-config/po/gl.po | 1514 +++++++-------
xorg-server/xkeyboard-config/po/ko.po | 1518 +++++++-------
xorg-server/xkeyboard-config/po/nl.po | 1547 +++++++-------
xorg-server/xkeyboard-config/po/pl.po | 1512 +++++++-------
xorg-server/xkeyboard-config/po/sv.po | 1517 +++++++-------
xorg-server/xkeyboard-config/po/uk.po | 1671 +++++++--------
xorg-server/xkeyboard-config/rules/base.xml.in | 2 +-
xorg-server/xkeyboard-config/symbols/cm | 52 +-
xorg-server/xkeyboard-config/symbols/lk | 12 +-
xorg-server/xkeyboard-config/symbols/ph | 2 -
327 files changed, 17483 insertions(+), 15436 deletions(-)
create mode 100644 mesalib/docs/relnotes/10.5.6.html
create mode 100644 mesalib/docs/relnotes/10.5.7.html
create mode 100644 mesalib/docs/relnotes/10.7.0.html
create mode 100644 mesalib/src/mapi/glapi/gen/apiexec.py
create mode 100644 mesalib/src/mapi/glapi/gen/static_data.py
delete mode 100644 mesalib/src/mesa/drivers/haiku/swrast/SConscript
delete mode 100644 mesalib/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
delete mode 100644 mesalib/src/mesa/drivers/haiku/swrast/SoftwareRast.h
delete mode 100644 mesalib/src/mesa/drivers/haiku/swrast/SoftwareRast.rdef
create mode 100644 mesalib/src/mesa/program/dummy_errors.c
delete mode 100644 xorg-server/config/10-evdev.conf
diff --git a/fontconfig/README b/fontconfig/README
index 4a4dc307b..8f04b9b3c 100644
--- a/fontconfig/README
+++ b/fontconfig/README
@@ -1,12 +1,48 @@
Fontconfig
Font configuration and customization library
- Version 2.11.93 (2.12 RC3)
- 2015-03-09
+ Version 2.11.94 (2.12 RC4)
+ 2015-06-02
Check INSTALL for compilation and installation instructions.
Report bugs to https://bugs.freedesktop.org in the fontconfig module.
+2.11.94 (2.12 RC4)
+
+Akira TAGOH (16):
+ Remove the dead code
+ Bug 89617 - FcConfigAppFontAddFile() returns false on any font file
+ Fix unknown attribute in Win32
+ Fix SIGFPE
+ Fix a typo for the latest cache version
+ Fix a typo in fontconfig-user.sgml
+ Drop unmaintained code
+ Observe blanks to compute correct languages in fc-query/fc-scan
+ Add missing description for usage
+ Make FC_SCALE deprecated
+ Bug 90148 - Don't warn if cachedir isn't specified
+ Fix memory leaks after FcFini()
+ Fix a typo
+ Fix a crash
+ Detect the overflow for the object ID
+ Revert the previous change
+
+Behdad Esfahbod (11):
+ Fix bitmap scaling
+ Add su[pport for symbol fonts
+ Write ranges using a [start finish) format
+ Only set FC_SIZE for scalable fonts if OS/2 version 5 is present
+ Add bitmap-only font size as Double, not Range
+ Accept Integer for FC_SIZE
+ Don't set FC_SIZE for bitmap fonts
+ Fix compiler warnings
+ Simplify FcRange
+ Reduce number of places that cache version is specified to 1
+ Bump cache version number to 6, because of recent FcRange changes
+
+Руслан Ижбулатов (1):
+ W32: Support cache paths relative to the root directory
+
2.11.93 (2.12 RC3)
Akira TAGOH (18):
diff --git a/fontconfig/configure.ac b/fontconfig/configure.ac
index bb9880487..e888f2c9e 100644
--- a/fontconfig/configure.ac
+++ b/fontconfig/configure.ac
@@ -33,7 +33,7 @@ dnl This is the package version number, not the shared library
dnl version. This same version number must appear in fontconfig/fontconfig.h
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
dnl not possible to extract the version number here from fontconfig.h
-AC_INIT([fontconfig], [2.11.93], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig])
+AC_INIT([fontconfig], [2.11.94], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig])
AM_INIT_AUTOMAKE([1.11 parallel-tests dist-bzip2])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
diff --git a/fontconfig/doc/fontconfig-devel.sgml b/fontconfig/doc/fontconfig-devel.sgml
index 17402c7bc..d0ec8a579 100644
--- a/fontconfig/doc/fontconfig-devel.sgml
+++ b/fontconfig/doc/fontconfig-devel.sgml
@@ -177,6 +177,7 @@ convenience for the application's rendering mechanism.
scalable FC_SCALABLE Bool Whether glyphs can be scaled
scale FC_SCALE Double Scale factor for point->pixel
conversions (deprecated)
+ symbol FC_SYMBOL Bool Whether font uses MS symbol-font encoding
color FC_COLOR Bool Whether any glyphs have color
dpi FC_DPI Double Target dots per inch
rgba FC_RGBA Int unknown, rgb, bgr, vrgb,
diff --git a/fontconfig/doc/fontconfig-user.sgml b/fontconfig/doc/fontconfig-user.sgml
index e7cdb2e77..8f49f78ed 100644
--- a/fontconfig/doc/fontconfig-user.sgml
+++ b/fontconfig/doc/fontconfig-user.sgml
@@ -258,7 +258,7 @@ debugging messages.
MEMORY 512 Monitor fontconfig memory usage
CONFIG 1024 Monitor which config files are loaded
LANGSET 2048 Dump char sets used to construct lang values
- OBJTYPES 4096 Display message when value typechecks fail
+ MATCH2 4096 Display font-matching transformation in patterns
Add the value of the desired debug levels together and assign that (in
@@ -787,6 +787,10 @@ is used to override the default configuration directory.
is used to output the detailed debugging messages. see Debugging Applications section for more details.
+FC_DBG_MATCH_FILTER
+is used to filter out the patterns. this takes a comma-separated list of object names and effects only when FC_DEBUG has MATCH2. see Debugging Applications section for more details.
+
+ FONTCONFIG_USE_MMAP
is used to control the use of mmap(2) for the cache files if available. this take a boolean value. fontconfig will checks if the cache files are stored on the filesystem that is safe to use mmap(2). explicitly setting this environment variable will causes skipping this check and enforce to use or not use mmap(2) anyway.
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index 58b6b5137..a570b2f5c 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -52,7 +52,7 @@ typedef int FcBool;
#define FC_MAJOR 2
#define FC_MINOR 11
-#define FC_REVISION 93
+#define FC_REVISION 94
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
@@ -66,7 +66,10 @@ typedef int FcBool;
* it means multiple copies of the font information.
*/
-#define FC_CACHE_VERSION "5"
+#define FC_CACHE_VERSION_NUMBER 6
+#define _FC_STRINGIFY_(s) #s
+#define _FC_STRINGIFY(s) _FC_STRINGIFY_(s)
+#define FC_CACHE_VERSION _FC_STRINGIFY(FC_CACHE_VERSION_NUMBER)
#define FcTrue 1
#define FcFalse 0
@@ -96,6 +99,7 @@ typedef int FcBool;
#define FC_SCALABLE "scalable" /* Bool */
#define FC_COLOR "color" /* Bool */
#define FC_SCALE "scale" /* double (deprecated) */
+#define FC_SYMBOL "symbol" /* Bool */
#define FC_DPI "dpi" /* double */
#define FC_RGBA "rgba" /* Int */
#define FC_MINSPACE "minspace" /* Bool use minimum line spacing */
@@ -216,7 +220,7 @@ typedef struct _FcMatrix {
typedef struct _FcCharSet FcCharSet;
typedef struct _FcObjectType {
- const char *object;
+ char *object;
FcType type;
} FcObjectType;
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index 25538bd70..fc3ed410a 100644
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -655,7 +655,7 @@ FcDirCacheMapFd (FcConfig *config, int fd, struct stat *fd_stat, struct stat *di
allocated = FcTrue;
}
if (cache->magic != FC_CACHE_MAGIC_MMAP ||
- cache->version < FC_CACHE_CONTENT_VERSION ||
+ cache->version < FC_CACHE_VERSION_NUMBER ||
cache->size != (intptr_t) fd_stat->st_size ||
!FcCacheTimeValid (config, cache, dir_stat) ||
!FcCacheDirsValid (config, cache) ||
@@ -751,7 +751,7 @@ FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct
ret = FcFalse;
else if (c.magic != FC_CACHE_MAGIC_MMAP)
ret = FcFalse;
- else if (c.version < FC_CACHE_CONTENT_VERSION)
+ else if (c.version < FC_CACHE_VERSION_NUMBER)
ret = FcFalse;
else if (fd_stat->st_size != c.size)
ret = FcFalse;
@@ -828,7 +828,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
serialize->linear = cache;
cache->magic = FC_CACHE_MAGIC_ALLOC;
- cache->version = FC_CACHE_CONTENT_VERSION;
+ cache->version = FC_CACHE_VERSION_NUMBER;
cache->size = serialize->size;
cache->checksum = (int) dir_stat->st_mtime;
diff --git a/fontconfig/src/fcdbg.c b/fontconfig/src/fcdbg.c
index ef038f017..c2853fff3 100644
--- a/fontconfig/src/fcdbg.c
+++ b/fontconfig/src/fcdbg.c
@@ -29,8 +29,6 @@
static void
_FcValuePrintFile (FILE *f, const FcValue v)
{
- FcRange r;
-
switch (v.type) {
case FcTypeUnknown:
fprintf (f, "");
@@ -64,8 +62,7 @@ _FcValuePrintFile (FILE *f, const FcValue v)
fprintf (f, "face");
break;
case FcTypeRange:
- r = FcRangeCanonicalize (v.u.r);
- fprintf (f, "(%g, %g)", r.u.d.begin, r.u.d.end);
+ fprintf (f, "[%g %g)", v.u.r->begin, v.u.r->end);
break;
}
}
@@ -213,6 +210,84 @@ FcPatternPrint (const FcPattern *p)
printf ("(ignore blanks)"); \
}
+void
+FcPatternPrint2 (FcPattern *pp1,
+ FcPattern *pp2,
+ const FcObjectSet *os)
+{
+ int i, j, k, pos;
+ FcPatternElt *e1, *e2;
+ FcPattern *p1, *p2;
+
+ if (os)
+ {
+ p1 = FcPatternFilter (pp1, os);
+ p2 = FcPatternFilter (pp2, os);
+ }
+ else
+ {
+ p1 = pp1;
+ p2 = pp2;
+ }
+ printf ("Pattern has %d elts (size %d), %d elts (size %d)\n",
+ p1->num, p1->size, p2->num, p2->size);
+ for (i = 0, j = 0; i < p1->num; i++)
+ {
+ e1 = &FcPatternElts(p1)[i];
+ e2 = &FcPatternElts(p2)[j];
+ if (!e2 || e1->object != e2->object)
+ {
+ pos = FcPatternPosition (p2, FcObjectName (e1->object));
+ if (pos >= 0)
+ {
+ for (k = j; k < pos; k++)
+ {
+ e2 = &FcPatternElts(p2)[k];
+ printf ("\t%s: (None) -> ", FcObjectName (e2->object));
+ FcValueListPrint (FcPatternEltValues (e2));
+ printf ("\n");
+ }
+ j = pos;
+ goto cont;
+ }
+ else
+ {
+ printf ("\t%s:", FcObjectName (e1->object));
+ FcValueListPrint (FcPatternEltValues (e1));
+ printf (" -> (None)\n");
+ }
+ }
+ else
+ {
+ cont:
+ printf ("\t%s:", FcObjectName (e1->object));
+ FcValueListPrint (FcPatternEltValues (e1));
+ printf (" -> ");
+ e2 = &FcPatternElts(p2)[j];
+ FcValueListPrint (FcPatternEltValues (e2));
+ printf ("\n");
+ j++;
+ }
+ }
+ if (j < p2->num)
+ {
+ for (k = j; k < p2->num; k++)
+ {
+ e2 = &FcPatternElts(p2)[k];
+ if (FcObjectName (e2->object))
+ {
+ printf ("\t%s: (None) -> ", FcObjectName (e2->object));
+ FcValueListPrint (FcPatternEltValues (e2));
+ printf ("\n");
+ }
+ }
+ }
+ if (p1 != pp1)
+ FcPatternDestroy (p1);
+ if (p2 != pp2)
+ FcPatternDestroy (p2);
+}
+
void
FcOpPrint (FcOp op_)
{
@@ -267,8 +342,6 @@ FcOpPrint (FcOp op_)
void
FcExprPrint (const FcExpr *expr)
{
- FcRange r;
-
if (!expr) printf ("none");
else switch (FC_OP_GET_OP (expr->op)) {
case FcOpInteger: printf ("%d", expr->u.ival); break;
@@ -286,8 +359,7 @@ FcExprPrint (const FcExpr *expr)
printf ("]");
break;
case FcOpRange:
- r = FcRangeCanonicalize (expr->u.rval);
- printf ("(%g, %g)", r.u.d.begin, r.u.d.end);
+ printf ("(%g, %g)", expr->u.rval->begin, expr->u.rval->end);
break;
case FcOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break;
case FcOpCharSet: printf ("charset\n"); break;
diff --git a/fontconfig/src/fcdefault.c b/fontconfig/src/fcdefault.c
index 7c16f4841..4643e46dc 100644
--- a/fontconfig/src/fcdefault.c
+++ b/fontconfig/src/fcdefault.c
@@ -38,6 +38,7 @@ static const struct {
{ FC_GLOBAL_ADVANCE_OBJECT, FcTrue }, /* !FC_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */
{ FC_EMBEDDED_BITMAP_OBJECT, FcTrue }, /* !FC_LOAD_NO_BITMAP */
{ FC_DECORATIVE_OBJECT, FcFalse },
+ { FC_SYMBOL_OBJECT, FcFalse },
};
#define NUM_FC_BOOL_DEFAULTS (int) (sizeof FcBoolDefaults / sizeof FcBoolDefaults[0])
diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c
index afbd9ac1e..809ff2992 100644
--- a/fontconfig/src/fcfreetype.c
+++ b/fontconfig/src/fcfreetype.c
@@ -1199,7 +1199,8 @@ FcFreeTypeQueryFace (const FT_Face face,
const char *tmp;
FcRange *r = NULL;
- double lower_size = 0.0L, upper_size = DBL_MAX;
+
+ FcBool symbol = FcFalse;
FcInitDebug (); /* We might be called with no initizalization whatsoever. */
@@ -1615,13 +1616,12 @@ FcFreeTypeQueryFace (const FT_Face face,
#if defined (HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE) && defined (HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE)
if (os2 && os2->version >= 0x0005 && os2->version != 0xffff)
{
+ double lower_size, upper_size;
+
/* usLowerPointSize and usUpperPointSize is actually twips */
lower_size = os2->usLowerOpticalPointSize / 20.0L;
upper_size = os2->usUpperOpticalPointSize / 20.0L;
- }
-#endif
- if (os2)
- {
+
r = FcRangeCreateDouble (lower_size, upper_size);
if (!FcPatternAddRange (pat, FC_SIZE, r))
{
@@ -1630,20 +1630,7 @@ FcFreeTypeQueryFace (const FT_Face face,
}
FcRangeDestroy (r);
}
- else
- {
- for (i = 0; i < face->num_fixed_sizes; i++)
- {
- double d = FcGetPixelSize (face, i);
- r = FcRangeCreateDouble (d, d);
- if (!FcPatternAddRange (pat, FC_SIZE, r))
- {
- FcRangeDestroy (r);
- goto bail1;
- }
- FcRangeDestroy (r);
- }
- }
+#endif
/*
* Type 1: Check for FontInfo dictionary information
@@ -1803,6 +1790,11 @@ FcFreeTypeQueryFace (const FT_Face face,
if (!cs)
goto bail1;
+ /* The FcFreeTypeCharSetAndSpacing() chose the encoding; test it for symbol. */
+ symbol = face->charmap && face->charmap->encoding == FT_ENCODING_MS_SYMBOL;
+ if (!FcPatternAddBool (pat, FC_SYMBOL, symbol))
+ goto bail1;
+
#if HAVE_FT_GET_BDF_PROPERTY
/* For PCF fonts, override the computed spacing with the one from
the property */
@@ -1835,9 +1827,18 @@ FcFreeTypeQueryFace (const FT_Face face,
if (!FcPatternAddCharSet (pat, FC_CHARSET, cs))
goto bail2;
- ls = FcFreeTypeLangSet (cs, exclusiveLang);
- if (!ls)
- goto bail2;
+ if (!symbol)
+ {
+ ls = FcFreeTypeLangSet (cs, exclusiveLang);
+ if (!ls)
+ goto bail2;
+ }
+ else
+ {
+ /* Symbol fonts don't cover any language, even though they
+ * claim to support Latin1 range. */
+ ls = FcLangSetCreate ();
+ }
if (!FcPatternAddLangSet (pat, FC_LANG, ls))
{
@@ -2093,6 +2094,22 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4)
glyphindex = FT_Get_Char_Index (face, (FT_ULong) ucs4);
if (glyphindex)
return glyphindex;
+ if (ucs4 < 0x100 && face->charmap &&
+ face->charmap->encoding == FT_ENCODING_MS_SYMBOL)
+ {
+ /* For symbol-encoded OpenType fonts, we duplicate the
+ * U+F000..F0FF range at U+0000..U+00FF. That's what
+ * Windows seems to do, and that's hinted about at:
+ * http://www.microsoft.com/typography/otspec/recom.htm
+ * under "Non-Standard (Symbol) Fonts".
+ *
+ * See thread with subject "Webdings and other MS symbol
+ * fonts don't display" on mailing list from May 2015.
+ */
+ glyphindex = FT_Get_Char_Index (face, (FT_ULong) ucs4 + 0xF000);
+ if (glyphindex)
+ return glyphindex;
+ }
}
#if HAVE_FT_HAS_PS_GLYPH_NAMES
/*
@@ -2253,6 +2270,23 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing
}
ucs4 = FT_Get_Next_Char (face, ucs4, &glyph);
}
+ if (fcFontEncodings[o] == FT_ENCODING_MS_SYMBOL)
+ {
+ /* For symbol-encoded OpenType fonts, we duplicate the
+ * U+F000..F0FF range at U+0000..U+00FF. That's what
+ * Windows seems to do, and that's hinted about at:
+ * http://www.microsoft.com/typography/otspec/recom.htm
+ * under "Non-Standard (Symbol) Fonts".
+ *
+ * See thread with subject "Webdings and other MS symbol
+ * fonts don't display" on mailing list from May 2015.
+ */
+ for (ucs4 = 0xF000; ucs4 < 0xF100; ucs4++)
+ {
+ if (FcCharSetHasChar (fcs, ucs4))
+ FcCharSetAddChar (fcs, ucs4 - 0xF000);
+ }
+ }
#ifdef CHECK
for (ucs4 = 0; ucs4 < 0x10000; ucs4++)
{
@@ -2267,6 +2301,8 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing
}
#endif
}
+
+ break;
}
#if HAVE_FT_HAS_PS_GLYPH_NAMES
/*
diff --git a/fontconfig/src/fcinit.c b/fontconfig/src/fcinit.c
index 6134ed40d..5e7c2f156 100644
--- a/fontconfig/src/fcinit.c
+++ b/fontconfig/src/fcinit.c
@@ -91,12 +91,23 @@ FcInitLoadOwnConfig (FcConfig *config)
{
FcChar8 *prefix, *p;
size_t plen;
+ FcBool have_own = FcFalse;
+ char *env_file, *env_path;
- fprintf (stderr,
- "Fontconfig warning: no elements found. Check configuration.\n");
- fprintf (stderr,
- "Fontconfig warning: adding %s\n",
- FC_CACHEDIR);
+ env_file = getenv ("FONTCONFIG_FILE");
+ env_path = getenv ("FONTCONFIG_PATH");
+ if ((env_file != NULL && env_file[0] != 0) ||
+ (env_path != NULL && env_path[0] != 0))
+ have_own = FcTrue;
+
+ if (!have_own)
+ {
+ fprintf (stderr,
+ "Fontconfig warning: no elements found. Check configuration.\n");
+ fprintf (stderr,
+ "Fontconfig warning: adding %s\n",
+ FC_CACHEDIR);
+ }
prefix = FcConfigXdgCacheHome ();
if (!prefix)
goto bail;
@@ -107,8 +118,9 @@ FcInitLoadOwnConfig (FcConfig *config)
prefix = p;
memcpy (&prefix[plen], FC_DIR_SEPARATOR_S "fontconfig", 11);
prefix[plen + 11] = 0;
- fprintf (stderr,
- "Fontconfig warning: adding fontconfig\n");
+ if (!have_own)
+ fprintf (stderr,
+ "Fontconfig warning: adding fontconfig\n");
if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR) ||
!FcConfigAddCacheDir (config, (FcChar8 *) prefix))
@@ -180,6 +192,8 @@ FcFini (void)
FcConfigFini ();
FcCacheFini ();
FcDefaultFini ();
+ FcObjectFini ();
+ FcConfigPathFini ();
}
/*
diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h
index 80205c950..15e22fdbc 100644
--- a/fontconfig/src/fcint.h
+++ b/fontconfig/src/fcint.h
@@ -87,6 +87,7 @@ extern pfnSHGetFolderPathA pSHGetFolderPathA;
#define FC_DBG_SCANV 256
#define FC_DBG_CONFIG 1024
#define FC_DBG_LANGSET 2048
+#define FC_DBG_MATCH2 4096
#define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] FC_UNUSED
#define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
@@ -96,11 +97,6 @@ extern pfnSHGetFolderPathA pSHGetFolderPathA;
#define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
#define FC_ABS(a) ((a) < 0 ? -(a) : (a))
-#define FcDoubleIsZero(a) (fabs ((a)) <= DBL_EPSILON)
-#define FcDoubleCmpEQ(a,b) (fabs ((a) - (b)) <= DBL_EPSILON)
-#define FcDoubleCmpGE(a,b) (FcDoubleCmpEQ (a, b) || (a) > (b))
-#define FcDoubleCmpLE(a,b) (FcDoubleCmpEQ (a, b) || (a) < (b))
-
/* slim_internal.h */
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
#define FcPrivate __attribute__((__visibility__("hidden")))
@@ -252,21 +248,9 @@ typedef struct _FcExprName {
FcMatchKind kind;
} FcExprName;
-typedef struct _FcRangeInt {
- FcChar32 begin;
- FcChar32 end;
-} FcRangeInt;
-typedef struct _FcRangeDouble {
+struct _FcRange {
double begin;
double end;
-} FcRangeDouble;
-struct _FcRange {
- FcBool is_double;
- FcBool is_inclusive;
- union {
- FcRangeInt i;
- FcRangeDouble d;
- } u;
};
@@ -378,7 +362,7 @@ typedef struct _FcStrBuf {
struct _FcCache {
unsigned int magic; /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
- int version; /* FC_CACHE_CONTENT_VERSION */
+ int version; /* FC_CACHE_VERSION_NUMBER */
intptr_t size; /* size of file */
intptr_t dir; /* offset to dir name */
intptr_t dirs; /* offset to subdirs */
@@ -470,7 +454,6 @@ typedef struct _FcCaseFold {
#define FC_CACHE_MAGIC_MMAP 0xFC02FC04
#define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
-#define FC_CACHE_CONTENT_VERSION 5
struct _FcAtomic {
FcChar8 *file; /* original file name */
@@ -811,6 +794,9 @@ FcSubstPrint (const FcSubst *subst);
FcPrivate void
FcCharSetPrint (const FcCharSet *c);
+FcPrivate void
+FcPatternPrint2 (FcPattern *p1, FcPattern *p2, const FcObjectSet *os);
+
extern FcPrivate int FcDebugVal;
#define FcDebug() (FcDebugVal)
@@ -880,6 +866,9 @@ FcPrivate FcConfig *
FcInitLoadOwnConfigAndFonts (FcConfig *config);
/* fcxml.c */
+FcPrivate void
+FcConfigPathFini (void);
+
FcPrivate void
FcTestDestroy (FcTest *test);
@@ -1054,6 +1043,9 @@ FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **
FcPrivate FcBool
FcPatternAppend (FcPattern *p, FcPattern *s);
+FcPrivate int
+FcPatternPosition (const FcPattern *p, const char *object);
+
FcPrivate FcChar32
FcStringHash (const FcChar8 *s);
@@ -1080,15 +1072,9 @@ FcMatrixFree (FcMatrix *mat);
/* fcrange.c */
-FcPrivate FcRange
-FcRangeCanonicalize (const FcRange *range);
-
FcPrivate FcRange *
FcRangePromote (double v, FcValuePromotionBuffer *vbuf);
-FcPrivate FcBool
-FcRangeIsZero (const FcRange *r);
-
FcPrivate FcBool
FcRangeIsInRange (const FcRange *a, const FcRange *b);
@@ -1192,6 +1178,9 @@ FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
/* fcobjs.c */
+FcPrivate void
+FcObjectFini (void);
+
FcPrivate FcObject
FcObjectLookupIdByName (const char *str);
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c
index 46d08bcc7..40efbd3f6 100644
--- a/fontconfig/src/fcmatch.c
+++ b/fontconfig/src/fcmatch.c
@@ -220,7 +220,7 @@ FcCompareSizeRange (FcValue *v1, FcValue *v2)
if (FcRangeIsInRange (r1, r2))
ret = 0.0;
else
- ret = FC_MIN (fabs (r1->u.d.end - r2->u.d.begin), fabs (r1->u.d.begin - r2->u.d.end));
+ ret = FC_MIN (fabs (r1->end - r2->begin), fabs (r1->begin - r2->end));
bail:
if (r1)
@@ -292,6 +292,7 @@ typedef enum _FcMatcherPriority {
PRI1(LANG),
PRI_FAMILY_WEAK,
PRI_POSTSCRIPT_NAME_WEAK,
+ PRI1(SYMBOL),
PRI1(SPACING),
PRI1(SIZE),
PRI1(PIXEL_SIZE),
@@ -688,6 +689,47 @@ FcFontSetMatchInternal (FcFontSet **sets,
printf ("\n");
FcPatternPrint (best);
}
+ if (FcDebug () & FC_DBG_MATCH2)
+ {
+ char *env = getenv ("FC_DBG_MATCH_FILTER");
+ FcObjectSet *os = NULL;
+
+ if (env)
+ {
+ char *ss, *s;
+ char *p;
+ FcBool f = FcTrue;
+
+ ss = s = strdup (env);
+ os = FcObjectSetCreate ();
+ while (f)
+ {
+ size_t len;
+ char *x;
+
+ if (!(p = strchr (s, ',')))
+ {
+ f = FcFalse;
+ len = strlen (s) + 1;
+ }
+ else
+ {
+ len = (p - s) + 1;
+ }
+ x = malloc (sizeof (char) * len);
+ strncpy (x, s, len - 1);
+ x[len - 1] = 0;
+ if (FcObjectFromName (x) > 0)
+ FcObjectSetAdd (os, x);
+ s = p + 1;
+ free (x);
+ }
+ free (ss);
+ }
+ FcPatternPrint2 (p, best, os);
+ if (os)
+ FcObjectSetDestroy (os);
+ }
/* assuming that 'result' is initialized with FcResultNoMatch
* outside this function */
if (best)
diff --git a/fontconfig/src/fcname.c b/fontconfig/src/fcname.c
index 1d8fe757c..8be36c70c 100644
--- a/fontconfig/src/fcname.c
+++ b/fontconfig/src/fcname.c
@@ -88,7 +88,9 @@ FcObjectValidType (FcObject object, FcType type)
return FcTrue;
break;
case FcTypeRange:
- if (type == FcTypeRange || type == FcTypeDouble)
+ if (type == FcTypeRange ||
+ type == FcTypeDouble ||
+ type == FcTypeInteger)
return FcTrue;
break;
default:
@@ -316,7 +318,7 @@ FcNameConvert (FcType type, FcChar8 *string)
v.type = FcTypeVoid;
break;
case FcTypeRange:
- if (sscanf ((char *) string, "(%lg %lg)", &b, &e) != 2)
+ if (sscanf ((char *) string, "[%lg %lg)", &b, &e) != 2)
{
v.u.d = strtod ((char *) string, &p);
if (p != NULL && p[0] != 0)
@@ -498,7 +500,6 @@ FcNameUnparseValue (FcStrBuf *buf,
{
FcChar8 temp[1024];
FcValue v = FcValueCanonicalize(v0);
- FcRange r;
switch (v.type) {
case FcTypeUnknown:
@@ -525,17 +526,8 @@ FcNameUnparseValue (FcStrBuf *buf,
case FcTypeFTFace:
return FcTrue;
case FcTypeRange:
- r = FcRangeCanonicalize (v.u.r);
- if (!FcDoubleIsZero (r.u.d.begin) || !FcDoubleIsZero (r.u.d.end))
- {
- if (FcDoubleCmpEQ (r.u.d.begin, r.u.d.end))
- sprintf ((char *) temp, "%g", r.u.d.begin);
- else
- sprintf ((char *) temp, "(%g %g)", r.u.d.begin, r.u.d.end);
- return FcNameUnparseString (buf, temp, 0);
- }
- else
- return FcTrue;
+ sprintf ((char *) temp, "[%g %g)", v.u.r->begin, v.u.r->end);
+ return FcNameUnparseString (buf, temp, 0);
}
return FcFalse;
}
diff --git a/fontconfig/src/fcobjs.c b/fontconfig/src/fcobjs.c
index bad9824d4..16ff31c47 100644
--- a/fontconfig/src/fcobjs.c
+++ b/fontconfig/src/fcobjs.c
@@ -44,6 +44,28 @@ struct FcObjectOtherTypeInfo {
FcObject id;
} *other_types;
+void
+FcObjectFini (void)
+{
+ struct FcObjectOtherTypeInfo *ots, *ot;
+
+retry:
+ ots = fc_atomic_ptr_get (&other_types);
+ if (!ots)
+ return;
+ if (!fc_atomic_ptr_cmpexch (&other_types, ots, NULL))
+ goto retry;
+
+ while (ots)
+ {
+ ot = ots->next;
+ if (ots->object.object)
+ free (ots->object.object);
+ free (ots);
+ ots = ot;
+ }
+}
+
static FcObjectType *
_FcObjectLookupOtherTypeByName (const char *str, FcObject *id)
{
@@ -62,12 +84,19 @@ retry:
if (!ot)
return NULL;
- ot->object.object = (const char *) FcStrdup (str);
+ ot->object.object = (char *) FcStrdup (str);
ot->object.type = FcTypeUnknown;
ot->id = fc_atomic_int_add (next_id, +1);
+ if (ot->id < (FC_MAX_BASE_OBJECT + FC_EXT_OBJ_INDEX))
+ {
+ fprintf (stderr, "Fontconfig error: No object ID to assign\n");
+ abort ();
+ }
ot->next = ots;
if (!fc_atomic_ptr_cmpexch (&other_types, ots, ot)) {
+ if (ot->object.object)
+ free (ot->object.object);
free (ot);
goto retry;
}
diff --git a/fontconfig/src/fcobjs.h b/fontconfig/src/fcobjs.h
index 573fa610d..1fc4f656b 100644
--- a/fontconfig/src/fcobjs.h
+++ b/fontconfig/src/fcobjs.h
@@ -69,4 +69,5 @@ FC_OBJECT (PRGNAME, FcTypeString, NULL)
FC_OBJECT (HASH, FcTypeString, NULL) /* deprecated */
FC_OBJECT (POSTSCRIPT_NAME, FcTypeString, FcComparePostScript)
FC_OBJECT (COLOR, FcTypeBool, FcCompareBool)
+FC_OBJECT (SYMBOL, FcTypeBool, FcCompareBool)
/* ^-------------- Add new objects here. */
diff --git a/fontconfig/src/fcpat.c b/fontconfig/src/fcpat.c
index 7e7d54a4e..3ef1ed212 100644
--- a/fontconfig/src/fcpat.c
+++ b/fontconfig/src/fcpat.c
@@ -425,6 +425,12 @@ FcPatternObjectPosition (const FcPattern *p, FcObject object)
return -(mid + 1);
}
+int
+FcPatternPosition (const FcPattern *p, const char *object)
+{
+ return FcPatternObjectPosition (p, FcObjectFromName (object));
+}
+
FcPatternElt *
FcPatternObjectFindElt (const FcPattern *p, FcObject object)
{
diff --git a/fontconfig/src/fcrange.c b/fontconfig/src/fcrange.c
index 9b1b67b82..f70226c55 100644
--- a/fontconfig/src/fcrange.c
+++ b/fontconfig/src/fcrange.c
@@ -32,10 +32,8 @@ FcRangeCreateDouble (double begin, double end)
if (ret)
{
- ret->is_double = FcTrue;
- ret->is_inclusive = FcDoubleCmpEQ (begin, end);
- ret->u.d.begin = begin;
- ret->u.d.end = end;
+ ret->begin = begin;
+ ret->end = end;
}
return ret;
@@ -48,10 +46,8 @@ FcRangeCreateInteger (FcChar32 begin, FcChar32 end)
if (ret)
{
- ret->is_double = FcFalse;
- ret->is_inclusive = (begin == end);
- ret->u.i.begin = begin;
- ret->u.i.end = end;
+ ret->begin = begin;
+ ret->end = end;
}
return ret;
@@ -66,14 +62,7 @@ FcRangeDestroy (FcRange *range)
FcRange *
FcRangeCopy (const FcRange *range)
{
- FcRange *ret;
-
- if (range->is_double)
- ret = FcRangeCreateDouble (range->u.d.begin, range->u.d.end);
- else
- ret = FcRangeCreateInteger (range->u.i.begin, range->u.i.end);
-
- return ret;
+ return FcRangeCreateDouble (range->begin, range->end);
}
FcBool
@@ -81,41 +70,14 @@ FcRangeGetDouble(const FcRange *range, double *begin, double *end)
{
if (!range)
return FcFalse;
- if (range->is_double)
- {
- if (begin)
- *begin = range->u.d.begin;
- if (end)
- *end = range->u.d.end;
- }
- else
- {
- if (begin)
- *begin = (double)range->u.i.begin;
- if (end)
- *end = (double)range->u.i.end;
- }
+ if (begin)
+ *begin = range->begin;
+ if (end)
+ *end = range->end;
return FcTrue;
}
-FcRange
-FcRangeCanonicalize (const FcRange *range)
-{
- FcRange new;
-
- if (range->is_double)
- new = *range;
- else
- {
- new.is_double = FcTrue;
- new.is_inclusive = range->is_inclusive;
- new.u.d.begin = (double)range->u.i.begin;
- new.u.d.end = (double)range->u.i.end;
- }
- return new;
-}
-
FcRange *
FcRangePromote (double v, FcValuePromotionBuffer *vbuf)
{
@@ -125,50 +87,24 @@ FcRangePromote (double v, FcValuePromotionBuffer *vbuf)
FcRangePromotionBuffer *buf = (FcRangePromotionBuffer *) vbuf;
FC_ASSERT_STATIC (sizeof (FcRangePromotionBuffer) <= sizeof (FcValuePromotionBuffer));
- buf->r.is_double = FcTrue;
- buf->r.is_inclusive = FcTrue;
- buf->r.u.d.begin = v;
- buf->r.u.d.end = v;
+ buf->r.begin = v;
+ buf->r.end = v;
return &buf->r;
}
-FcBool
-FcRangeIsZero (const FcRange *r)
-{
- FcRange c;
-
- if (!r)
- return FcFalse;
- c = FcRangeCanonicalize (r);
-
- return FcDoubleIsZero (c.u.d.begin) && FcDoubleIsZero (c.u.d.end);
-}
-
FcBool
FcRangeIsInRange (const FcRange *a, const FcRange *b)
{
- FcRange ca, cb;
- FcBool f;
-
if (!a || !b)
return FcFalse;
- ca = FcRangeCanonicalize (a);
- cb = FcRangeCanonicalize (b);
- if (ca.is_inclusive & cb.is_inclusive)
- f = ca.u.d.end <= cb.u.d.end;
- else
- f = ca.u.d.end < cb.u.d.end;
-
- return FcDoubleCmpGE (ca.u.d.begin, cb.u.d.begin) && f;
+ return a->begin >= b->begin && a->end <= b->end;
}
FcBool
FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b)
{
- FcRange ca, cb;
-
switch ((int) op) {
case FcOpEqual:
case FcOpContains:
@@ -178,21 +114,13 @@ FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b)
case FcOpNotContains:
return !FcRangeIsInRange (a, b);
case FcOpLess:
- ca = FcRangeCanonicalize (a);
- cb = FcRangeCanonicalize (b);
- return ca.u.d.begin < cb.u.d.begin;
+ return a->begin < b->begin;
case FcOpLessEqual:
- ca = FcRangeCanonicalize (a);
- cb = FcRangeCanonicalize (b);
- return FcDoubleCmpLE (ca.u.d.begin, cb.u.d.begin);
+ return a->begin <= b->begin;
case FcOpMore:
- ca = FcRangeCanonicalize (a);
- cb = FcRangeCanonicalize (b);
- return ca.u.d.end > cb.u.d.end;
+ return a->end > b->end;
case FcOpMoreEqual:
- ca = FcRangeCanonicalize (a);
- cb = FcRangeCanonicalize (b);
- return FcDoubleCmpGE (ca.u.d.end, cb.u.d.end);
+ return a->end >= b->end;
default:
break;
}
@@ -202,9 +130,8 @@ FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b)
FcChar32
FcRangeHash (const FcRange *r)
{
- FcRange c = FcRangeCanonicalize (r);
- int b = (int) (c.u.d.begin * 100);
- int e = FcDoubleCmpEQ (c.u.d.end, DBL_MAX) ? INT_MAX : (int) (c.u.d.end * 100);
+ int b = (int) (r->begin * 100);
+ int e = (int) (r->end * 100);
return b ^ (b << 1) ^ (e << 9);
}
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index 9a6f08d27..bad6b8193 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -57,6 +57,9 @@
extern FcChar8 fontconfig_instprefix[];
#endif
+static FcChar8 *__fc_userdir = NULL;
+static FcChar8 *__fc_userconf = NULL;
+
static void
FcExprDestroy (FcExpr *e);
@@ -79,6 +82,7 @@ FcRuleDestroy (FcRule *rule)
case FcRuleEdit:
FcEditDestroy (rule->u.edit);
break;
+ case FcRuleUnknown:
default:
break;
}
@@ -609,6 +613,7 @@ FcTypeName (FcType type)
return "langset";
case FcTypeRange:
return "range";
+ case FcTypeUnknown:
default:
return "unknown";
}
@@ -806,6 +811,7 @@ FcRuleCreate (FcRuleType type,
case FcRuleEdit:
r->u.edit = (FcEdit *) p;
break;
+ case FcRuleUnknown:
default:
free (r);
r = NULL;
@@ -1255,7 +1261,6 @@ FcParseBlank (FcConfigParse *parse)
{
int n = FcVStackElements (parse);
FcChar32 i, begin, end;
- FcRange r;
while (n-- > 0)
{
@@ -1272,9 +1277,8 @@ FcParseBlank (FcConfigParse *parse)
goto bail;
break;
case FcVStackRange:
- r = FcRangeCanonicalize (v->u.range);
- begin = (FcChar32)r.u.d.begin;
- end = (FcChar32)r.u.d.end;
+ begin = (FcChar32) v->u.range->begin;
+ end = (FcChar32) v->u.range->end;
if (begin <= end)
{
for (i = begin; i <= end; i++)
@@ -1587,7 +1591,6 @@ FcParseCharSet (FcConfigParse *parse)
FcVStack *vstack;
FcCharSet *charset = FcCharSetCreate ();
FcChar32 i, begin, end;
- FcRange r;
int n = 0;
while ((vstack = FcVStackPeek (parse)))
@@ -1602,9 +1605,8 @@ FcParseCharSet (FcConfigParse *parse)
n++;
break;
case FcVStackRange:
- r = FcRangeCanonicalize (vstack->u.range);
- begin = (FcChar32)r.u.d.begin;
- end = (FcChar32)r.u.d.end;
+ begin = (FcChar32) vstack->u.range->begin;
+ end = (FcChar32) vstack->u.range->end;
if (begin <= end)
{
@@ -2262,6 +2264,24 @@ FcParseCacheDir (FcConfigParse *parse)
FcStrFree (data);
}
+void
+FcConfigPathFini (void)
+{
+ FcChar8 *s;
+
+retry_dir:
+ s = fc_atomic_ptr_get (&__fc_userdir);
+ if (!fc_atomic_ptr_cmpexch (&__fc_userdir, s, NULL))
+ goto retry_dir;
+ free (s);
+
+retry_conf:
+ s = fc_atomic_ptr_get (&__fc_userconf);
+ if (!fc_atomic_ptr_cmpexch (&__fc_userconf, s, NULL))
+ goto retry_conf;
+ free (s);
+}
+
static void
FcParseInclude (FcConfigParse *parse)
{
@@ -2272,8 +2292,7 @@ FcParseInclude (FcConfigParse *parse)
FcBool deprecated = FcFalse;
#endif
FcChar8 *prefix = NULL, *p;
- static FcChar8 *userdir = NULL;
- static FcChar8 *userconf = NULL;
+ FcChar8 *userdir = NULL, *userconf = NULL;
s = FcStrBufDoneStatic (&parse->pstack->str);
if (!s)
@@ -2303,6 +2322,7 @@ FcParseInclude (FcConfigParse *parse)
{
size_t plen = strlen ((const char *)prefix);
size_t dlen = strlen ((const char *)s);
+ FcChar8 *u;
p = realloc (prefix, plen + 1 + dlen + 1);
if (!p)
@@ -2318,14 +2338,32 @@ FcParseInclude (FcConfigParse *parse)
if (FcFileIsDir (s))
{
userdir:
+ userdir = fc_atomic_ptr_get (&__fc_userdir);
if (!userdir)
- userdir = FcStrdup (s);
+ {
+ u = FcStrdup (s);
+ if (!fc_atomic_ptr_cmpexch (&__fc_userdir, userdir, u))
+ {
+ free (u);
+ goto userdir;
+ }
+ userdir = u;
+ }
}
else if (FcFileIsFile (s))
{
userconf:
+ userconf = fc_atomic_ptr_get (&__fc_userconf);
if (!userconf)
- userconf = FcStrdup (s);
+ {
+ u = FcStrdup (s);
+ if (!fc_atomic_ptr_cmpexch (&__fc_userconf, userconf, u))
+ {
+ free (u);
+ goto userconf;
+ }
+ userconf = u;
+ }
}
else
{
@@ -2349,6 +2387,7 @@ FcParseInclude (FcConfigParse *parse)
filename = FcConfigFilename(s);
if (deprecated == FcTrue &&
filename != NULL &&
+ userdir != NULL &&
!FcFileIsLink (filename))
{
if (FcFileIsDir (filename))
diff --git a/libX11/modules/im/ximcp/imLcPrs.c b/libX11/modules/im/ximcp/imLcPrs.c
index 9bb45ff31..60215c706 100644
--- a/libX11/modules/im/ximcp/imLcPrs.c
+++ b/libX11/modules/im/ximcp/imLcPrs.c
@@ -496,12 +496,12 @@ parseline(
token = nexttoken(fp, tokenbuf, &lastch);
if (token != KEY && token != STRING)
goto error;
- if ((filename = TransFileName(im, tokenbuf)) == NULL)
- goto error;
if (++depth > 100)
goto error;
+ if ((filename = TransFileName(im, tokenbuf)) == NULL)
+ goto error;
infp = _XFopenFile(filename, "r");
- Xfree(filename);
+ Xfree(filename);
if (infp == NULL)
goto error;
parsestringfile(infp, im, depth);
diff --git a/libX11/modules/om/generic/omGeneric.c b/libX11/modules/om/generic/omGeneric.c
index a835f00d7..53ca75c04 100644
--- a/libX11/modules/om/generic/omGeneric.c
+++ b/libX11/modules/om/generic/omGeneric.c
@@ -105,7 +105,7 @@ init_fontdata(
if(fd == (FontData) NULL)
return False;
- memset(fd, 0x00, sizeof(FontData) * font_data_count);
+ memset(fd, 0x00, sizeof(FontDataRec) * font_data_count);
for(i = 0 ; i < font_data_count ; i++)
fd[i] = font_data[i];
diff --git a/libX11/src/FontNames.c b/libX11/src/FontNames.c
index 6fc6b1272..21dcafea1 100644
--- a/libX11/src/FontNames.c
+++ b/libX11/src/FontNames.c
@@ -47,7 +47,7 @@ int *actualCount) /* RETURN */
int count = 0;
xListFontsReply rep;
register xListFontsReq *req;
- unsigned long rlen;
+ unsigned long rlen = 0;
LockDisplay(dpy);
GetReq(ListFonts, req);
diff --git a/libX11/src/GetFPath.c b/libX11/src/GetFPath.c
index 62ba01436..8c3f49c95 100644
--- a/libX11/src/GetFPath.c
+++ b/libX11/src/GetFPath.c
@@ -35,7 +35,7 @@ char **XGetFontPath(
int *npaths) /* RETURN */
{
xGetFontPathReply rep;
- unsigned long nbytes;
+ unsigned long nbytes = 0;
char **flist = NULL;
char *ch = NULL;
char *chend;
diff --git a/libX11/src/ListExt.c b/libX11/src/ListExt.c
index 431ae6784..be6b989a3 100644
--- a/libX11/src/ListExt.c
+++ b/libX11/src/ListExt.c
@@ -42,7 +42,7 @@ char **XListExtensions(
register unsigned i;
register int length;
register xReq *req;
- unsigned long rlen;
+ unsigned long rlen = 0;
LockDisplay(dpy);
GetEmptyReq (ListExtensions, req);
diff --git a/libxcb/src/c_client.py b/libxcb/src/c_client.py
index e55fc3c6b..70f842933 100644
--- a/libxcb/src/c_client.py
+++ b/libxcb/src/c_client.py
@@ -629,8 +629,7 @@ def _c_helper_resolve_field_names (prefix):
all_fields = {}
tmp_prefix = []
# look for fields in the remaining containers
- for idx, p in enumerate(prefix):
- name, sep, obj = p
+ for idx, (name, sep, obj) in enumerate(prefix):
if ''==sep:
# sep can be preset in prefix, if not, make a sensible guess
sep = '.' if (obj.is_switch or obj.is_case_or_bitcase) else '->'
@@ -1033,7 +1032,7 @@ def _c_serialize_helper_fields_fixed_size(context, self, field,
if not self.is_case_or_bitcase:
code_lines.append('%s /* %s.%s */' % (space, self.c_type, field.c_field_name))
else:
- scoped_name = [p[2].c_type if idx==0 else p[0] for idx, p in enumerate(prefix)]
+ scoped_name = [obj.c_type if idx==0 else name for idx, (name, _, obj) in enumerate(prefix)]
typename = ".".join(scoped_name)
code_lines.append('%s /* %s.%s */' % (space, typename, field.c_field_name))
@@ -1327,7 +1326,7 @@ def _c_serialize(context, self):
for p in params:
typespec, pointerspec, field_name = p
spacing = ' '*(maxtypelen-len(typespec)-len(pointerspec))
- param_str.append("%s%s%s %s%s /**< */" % (indent, typespec, spacing, pointerspec, field_name))
+ param_str.append("%s%s%s %s%s" % (indent, typespec, spacing, pointerspec, field_name))
# insert function name
param_str[0] = "%s (%s" % (func_name, param_str[0].strip())
param_str = ["%s," % x for x in param_str]
@@ -1520,9 +1519,9 @@ def _c_iterator(self, name):
_h(' * @brief %s', self.c_iterator_type)
_h(' **/')
_h('typedef struct %s {', self.c_iterator_type)
- _h(' %s *data; /**< */', self.c_type)
- _h(' int%s rem; /**< */', ' ' * (len(self.c_type) - 2))
- _h(' int%s index; /**< */', ' ' * (len(self.c_type) - 2))
+ _h(' %s *data;', self.c_type)
+ _h(' int%s rem;', ' ' * (len(self.c_type) - 2))
+ _h(' int%s index;', ' ' * (len(self.c_type) - 2))
# add additional params of the type "self" as fields to the iterator struct
# so that they can be passed to the sizeof-function by the iterator's next-function
params = _c_get_additional_type_params(self)
@@ -1546,8 +1545,8 @@ def _c_iterator(self, name):
_h(' */')
_c('')
_hc('void')
- _h('%s (%s *i /**< */);', self.c_next_name, self.c_iterator_type)
- _c('%s (%s *i /**< */)', self.c_next_name, self.c_iterator_type)
+ _h('%s (%s *i);', self.c_next_name, self.c_iterator_type)
+ _c('%s (%s *i)', self.c_next_name, self.c_iterator_type)
_c('{')
if not self.fixed_size():
@@ -1592,8 +1591,8 @@ def _c_iterator(self, name):
_h(' */')
_c('')
_hc('xcb_generic_iterator_t')
- _h('%s (%s i /**< */);', self.c_end_name, self.c_iterator_type)
- _c('%s (%s i /**< */)', self.c_end_name, self.c_iterator_type)
+ _h('%s (%s i);', self.c_end_name, self.c_iterator_type)
+ _c('%s (%s i)', self.c_end_name, self.c_iterator_type)
_c('{')
_c(' xcb_generic_iterator_t ret;')
@@ -1749,8 +1748,8 @@ def _c_accessors_field(self, field):
if field.type.is_simple:
_hc('')
_hc('%s', field.c_field_type)
- _h('%s (const %s *R /**< */);', field.c_accessor_name, c_type)
- _c('%s (const %s *R /**< */)', field.c_accessor_name, c_type)
+ _h('%s (const %s *R);', field.c_accessor_name, c_type)
+ _c('%s (const %s *R)', field.c_accessor_name, c_type)
_c('{')
if field.prev_varsized_field is None:
_c(' return (%s *) (R + 1);', field.c_field_type)
@@ -1767,8 +1766,8 @@ def _c_accessors_field(self, field):
return_type = '%s *' % field.c_field_type
_hc(return_type)
- _h('%s (const %s *R /**< */);', field.c_accessor_name, c_type)
- _c('%s (const %s *R /**< */)', field.c_accessor_name, c_type)
+ _h('%s (const %s *R);', field.c_accessor_name, c_type)
+ _c('%s (const %s *R)', field.c_accessor_name, c_type)
_c('{')
if field.prev_varsized_field is None:
_c(' return (%s) (R + 1);', return_type)
@@ -1867,7 +1866,7 @@ def _c_accessors_list(self, field):
if len(additional_params) == 0:
return ''
else:
- return (',\n' + indent).join([''] + ['%s %s /**< */' % p for p in additional_params])
+ return (',\n' + indent).join([''] + ['%s %s' % p for p in additional_params])
_h_setlevel(1)
_c_setlevel(1)
@@ -1876,8 +1875,8 @@ def _c_accessors_list(self, field):
_hc('')
_hc('%s *', field.c_field_type)
- _h('%s (%s /**< */);', field.c_accessor_name, params[idx][0])
- _c('%s (%s /**< */)', field.c_accessor_name, params[idx][0])
+ _h('%s (%s);', field.c_accessor_name, params[idx][0])
+ _c('%s (%s)', field.c_accessor_name, params[idx][0])
_c('{')
if switch_obj is not None:
@@ -1902,12 +1901,12 @@ def _c_accessors_list(self, field):
spacing = ' '*(len(field.c_length_name)+2)
add_param_str = additional_params_to_str(spacing)
if switch_obj is not None:
- _hc('%s (const %s *R /**< */,', field.c_length_name, R_obj.c_type)
- _h('%sconst %s *S /**< */%s);', spacing, S_obj.c_type, add_param_str)
- _c('%sconst %s *S /**< */%s)', spacing, S_obj.c_type, add_param_str)
+ _hc('%s (const %s *R,', field.c_length_name, R_obj.c_type)
+ _h('%sconst %s *S%s);', spacing, S_obj.c_type, add_param_str)
+ _c('%sconst %s *S%s)', spacing, S_obj.c_type, add_param_str)
else:
- _h('%s (const %s *R /**< */%s);', field.c_length_name, c_type, add_param_str)
- _c('%s (const %s *R /**< */%s)', field.c_length_name, c_type, add_param_str)
+ _h('%s (const %s *R%s);', field.c_length_name, c_type, add_param_str)
+ _c('%s (const %s *R%s)', field.c_length_name, c_type, add_param_str)
_c('{')
length = _c_accessor_get_expr(field.type.expr, fields)
_c(' return %s;', length)
@@ -1919,12 +1918,12 @@ def _c_accessors_list(self, field):
spacing = ' '*(len(field.c_end_name)+2)
add_param_str = additional_params_to_str(spacing)
if switch_obj is not None:
- _hc('%s (const %s *R /**< */,', field.c_end_name, R_obj.c_type)
- _h('%sconst %s *S /**< */%s);', spacing, S_obj.c_type, add_param_str)
- _c('%sconst %s *S /**< */%s)', spacing, S_obj.c_type, add_param_str)
+ _hc('%s (const %s *R,', field.c_end_name, R_obj.c_type)
+ _h('%sconst %s *S%s);', spacing, S_obj.c_type, add_param_str)
+ _c('%sconst %s *S%s)', spacing, S_obj.c_type, add_param_str)
else:
- _h('%s (const %s *R /**< */%s);', field.c_end_name, c_type, add_param_str)
- _c('%s (const %s *R /**< */%s)', field.c_end_name, c_type, add_param_str)
+ _h('%s (const %s *R%s);', field.c_end_name, c_type, add_param_str)
+ _c('%s (const %s *R%s)', field.c_end_name, c_type, add_param_str)
_c('{')
_c(' xcb_generic_iterator_t i;')
@@ -1952,12 +1951,12 @@ def _c_accessors_list(self, field):
spacing = ' '*(len(field.c_iterator_name)+2)
add_param_str = additional_params_to_str(spacing)
if switch_obj is not None:
- _hc('%s (const %s *R /**< */,', field.c_iterator_name, R_obj.c_type)
- _h('%sconst %s *S /**< */%s);', spacing, S_obj.c_type, add_param_str)
- _c('%sconst %s *S /**< */%s)', spacing, S_obj.c_type, add_param_str)
+ _hc('%s (const %s *R,', field.c_iterator_name, R_obj.c_type)
+ _h('%sconst %s *S%s);', spacing, S_obj.c_type, add_param_str)
+ _c('%sconst %s *S%s)', spacing, S_obj.c_type, add_param_str)
else:
- _h('%s (const %s *R /**< */%s);', field.c_iterator_name, c_type, add_param_str)
- _c('%s (const %s *R /**< */%s)', field.c_iterator_name, c_type, add_param_str)
+ _h('%s (const %s *R%s);', field.c_iterator_name, c_type, add_param_str)
+ _c('%s (const %s *R%s)', field.c_iterator_name, c_type, add_param_str)
_c('{')
_c(' %s i;', field.c_iterator_type)
@@ -2063,10 +2062,10 @@ def _c_complex(self, force_packed = False):
# necessary for unserialize to work
(self.is_switch and field.type.is_switch)):
spacing = ' ' * (maxtypelen - len(field.c_field_type))
- _h('%s %s%s %s%s; /**< */', space, field.c_field_type, spacing, field.c_field_name, field.c_subscript)
+ _h('%s %s%s %s%s;', space, field.c_field_type, spacing, field.c_field_name, field.c_subscript)
else:
spacing = ' ' * (maxtypelen - (len(field.c_field_type) + 1))
- _h('%s %s%s *%s%s; /**< */', space, field.c_field_type, spacing, field.c_field_name, field.c_subscript)
+ _h('%s %s%s *%s%s;', space, field.c_field_type, spacing, field.c_field_name, field.c_subscript)
if not self.is_switch:
for field in struct_fields:
@@ -2243,9 +2242,9 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
spacing = ' ' * (maxtypelen - len('xcb_connection_t'))
comma = ',' if len(param_fields) else ');'
- _h('%s (xcb_connection_t%s *c /**< */%s', func_name, spacing, comma)
+ _h('%s (xcb_connection_t%s *c%s', func_name, spacing, comma)
comma = ',' if len(param_fields) else ')'
- _c('%s (xcb_connection_t%s *c /**< */%s', func_name, spacing, comma)
+ _c('%s (xcb_connection_t%s *c%s', func_name, spacing, comma)
func_spacing = ' ' * (len(func_name) + 2)
count = len(param_fields)
@@ -2258,10 +2257,10 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
c_pointer = '*'
spacing = ' ' * (maxtypelen - len(c_field_const_type))
comma = ',' if count else ');'
- _h('%s%s%s %s%s /**< */%s', func_spacing, c_field_const_type,
+ _h('%s%s%s %s%s%s', func_spacing, c_field_const_type,
spacing, c_pointer, field.c_field_name, comma)
comma = ',' if count else ')'
- _c('%s%s%s %s%s /**< */%s', func_spacing, c_field_const_type,
+ _c('%s%s%s %s%s%s', func_spacing, c_field_const_type,
spacing, c_pointer, field.c_field_name, comma)
count = 2
@@ -2291,13 +2290,16 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
_c(' void *xcb_aux = 0;')
- for idx, f in enumerate(serial_fields):
+ for idx, _ in enumerate(serial_fields):
if aux:
_c(' void *xcb_aux%d = 0;' % (idx))
if list_with_var_size_elems:
_c(' unsigned int i;')
_c(' unsigned int xcb_tmp_len;')
_c(' char *xcb_tmp;')
+ num_fds = len([field for field in param_fields if field.isfd])
+ if num_fds > 0:
+ _c(' int fds[%d];' % (num_fds))
_c('')
# fixed size fields
@@ -2398,11 +2400,16 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
# no padding necessary - _serialize() keeps track of padding automatically
_c('')
+ fd_index = 0
for field in param_fields:
if field.isfd:
- _c(' xcb_send_fd(c, %s);', field.c_field_name)
+ _c(' fds[%d] = %s;', fd_index, field.c_field_name)
+ fd_index = fd_index + 1
- _c(' xcb_ret.sequence = xcb_send_request(c, %s, xcb_parts + 2, &xcb_req);', func_flags)
+ if num_fds == 0:
+ _c(' xcb_ret.sequence = xcb_send_request(c, %s, xcb_parts + 2, &xcb_req);', func_flags)
+ else:
+ _c(' xcb_ret.sequence = xcb_send_request_with_fds(c, %s, xcb_parts + 2, &xcb_req, %d, fds);', func_flags, num_fds)
# free dyn. all. data, if any
for f in free_calls:
@@ -2457,10 +2464,10 @@ def _c_reply(self, name):
_h(' */')
_c('')
_hc('%s *', self.c_reply_type)
- _hc('%s (xcb_connection_t%s *c /**< */,', self.c_reply_name, spacing1)
+ _hc('%s (xcb_connection_t%s *c,', self.c_reply_name, spacing1)
_hc('%s%s cookie /**< */,', spacing3, self.c_cookie_type)
- _h('%sxcb_generic_error_t%s **e /**< */);', spacing3, spacing2)
- _c('%sxcb_generic_error_t%s **e /**< */)', spacing3, spacing2)
+ _h('%sxcb_generic_error_t%s **e);', spacing3, spacing2)
+ _c('%sxcb_generic_error_t%s **e)', spacing3, spacing2)
_c('{')
if len(unserialize_fields)>0:
@@ -2515,8 +2522,8 @@ def _c_reply_fds(self, name):
_c('')
_hc('int *')
_hc('%s (xcb_connection_t%s *c /**< */,', self.c_reply_fds_name, spacing1)
- _h('%s%s *reply /**< */);', spacing3, self.c_reply_type)
- _c('%s%s *reply /**< */)', spacing3, self.c_reply_type)
+ _h('%s%s *reply);', spacing3, self.c_reply_type)
+ _c('%s%s *reply)', spacing3, self.c_reply_type)
_c('{')
_c(' return xcb_get_reply_fds(c, reply, sizeof(%s) + 4 * reply->length);', self.c_reply_type)
@@ -2543,7 +2550,7 @@ def _c_cookie(self, name):
_h(' * @brief %s', self.c_cookie_type)
_h(' **/')
_h('typedef struct %s {', self.c_cookie_type)
- _h(' unsigned int sequence; /**< */')
+ _h(' unsigned int sequence;')
_h('} %s;', self.c_cookie_type)
def _man_request(self, name, void, aux):
diff --git a/libxcb/src/xcb_in.c b/libxcb/src/xcb_in.c
index 623a0a803..322bed816 100644
--- a/libxcb/src/xcb_in.c
+++ b/libxcb/src/xcb_in.c
@@ -761,6 +761,7 @@ xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c,
if(!_xcb_conn_wait(c, &se->special_event_cond, 0, 0))
break;
+ _xcb_in_wake_up_next_reader(c);
pthread_mutex_unlock(&c->iolock);
return event;
}
diff --git a/libxcb/src/xcb_out.c b/libxcb/src/xcb_out.c
index 8cc5be868..3601a5fa4 100644
--- a/libxcb/src/xcb_out.c
+++ b/libxcb/src/xcb_out.c
@@ -177,15 +177,59 @@ uint32_t xcb_get_maximum_request_length(xcb_connection_t *c)
return c->out.maximum_request_length.value;
}
-uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req)
+static void close_fds(int *fds, unsigned int num_fds)
+{
+ for (unsigned int index = 0; index < num_fds; index++)
+ close(fds[index]);
+}
+
+static void send_fds(xcb_connection_t *c, int *fds, unsigned int num_fds)
+{
+#if HAVE_SENDMSG
+ /* Calling _xcb_out_flush_to() can drop the iolock and wait on a condition
+ * variable if another thread is currently writing (c->out.writing > 0).
+ * This call waits for writers to be done and thus _xcb_out_flush_to() will
+ * do the work itself (in which case we are a writer and
+ * prepare_socket_request() will wait for us to be done if another threads
+ * tries to send fds, too). Thanks to this, we can atomically write out FDs.
+ */
+ prepare_socket_request(c);
+
+ while (num_fds > 0) {
+ while (c->out.out_fd.nfd == XCB_MAX_PASS_FD && !c->has_error) {
+ /* XXX: if c->out.writing > 0, this releases the iolock and
+ * potentially allows other threads to interfere with their own fds.
+ */
+ _xcb_out_flush_to(c, c->out.request);
+
+ if (c->out.out_fd.nfd == XCB_MAX_PASS_FD) {
+ /* We need some request to send FDs with */
+ _xcb_out_send_sync(c);
+ }
+ }
+ if (c->has_error)
+ break;
+
+ c->out.out_fd.fd[c->out.out_fd.nfd++] = fds[0];
+ fds++;
+ num_fds--;
+ }
+#endif
+ close_fds(fds, num_fds);
+}
+
+uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iovec *vector,
+ const xcb_protocol_request_t *req, unsigned int num_fds, int *fds)
{
uint64_t request;
uint32_t prefix[2];
int veclen = req->count;
enum workarounds workaround = WORKAROUND_NONE;
- if(c->has_error)
+ if(c->has_error) {
+ close_fds(fds, num_fds);
return 0;
+ }
assert(c != 0);
assert(vector != 0);
@@ -204,6 +248,7 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
const xcb_query_extension_reply_t *extension = xcb_get_extension_data(c, req->ext);
if(!(extension && extension->present))
{
+ close_fds(fds, num_fds);
_xcb_conn_shutdown(c, XCB_CONN_CLOSED_EXT_NOTSUPPORTED);
return 0;
}
@@ -234,6 +279,7 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
}
else if(longlen > xcb_get_maximum_request_length(c))
{
+ close_fds(fds, num_fds);
_xcb_conn_shutdown(c, XCB_CONN_CLOSED_REQ_LEN_EXCEED);
return 0; /* server can't take this; maybe need BIGREQUESTS? */
}
@@ -264,6 +310,11 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
/* get a sequence number and arrange for delivery. */
pthread_mutex_lock(&c->iolock);
+ /* send FDs before establishing a good request number, because this might
+ * call send_sync(), too
+ */
+ send_fds(c, fds, num_fds);
+
prepare_socket_request(c);
/* send GetInputFocus (sync_req) when 64k-2 requests have been sent without
@@ -272,7 +323,7 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
* applications see sequence 0 as that is used to indicate
* an error in sending the request
*/
-
+
while ((req->isvoid && c->out.request == c->in.request_expected + (1 << 16) - 2) ||
(unsigned int) (c->out.request + 1) == 0)
{
@@ -286,6 +337,18 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
return request;
}
+/* request number are actually uint64_t internally but keep API compat with unsigned int */
+unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct iovec *vector,
+ const xcb_protocol_request_t *req, unsigned int num_fds, int *fds)
+{
+ return xcb_send_request_with_fds64(c, flags, vector, req, num_fds, fds);
+}
+
+uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req)
+{
+ return xcb_send_request_with_fds64(c, flags, vector, req, 0, NULL);
+}
+
/* request number are actually uint64_t internally but keep API compat with unsigned int */
unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req)
{
@@ -295,19 +358,15 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect
void
xcb_send_fd(xcb_connection_t *c, int fd)
{
-#if HAVE_SENDMSG
- if (c->has_error)
+ int fds[1] = { fd };
+
+ if (c->has_error) {
+ close(fd);
return;
- pthread_mutex_lock(&c->iolock);
- while (c->out.out_fd.nfd == XCB_MAX_PASS_FD) {
- _xcb_out_flush_to(c, c->out.request);
- if (c->has_error)
- break;
}
- if (!c->has_error)
- c->out.out_fd.fd[c->out.out_fd.nfd++] = fd;
+ pthread_mutex_lock(&c->iolock);
+ send_fds(c, &fds[0], 1);
pthread_mutex_unlock(&c->iolock);
-#endif
}
int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent)
diff --git a/libxcb/src/xcbext.h b/libxcb/src/xcbext.h
index b2575f7e3..44d789eee 100644
--- a/libxcb/src/xcbext.h
+++ b/libxcb/src/xcbext.h
@@ -68,13 +68,13 @@ enum xcb_send_request_flags_t {
*
* This function sends a new request to the X server. The data of the request is
* given as an array of @c iovecs in the @p vector argument. The length of that
- * array and the neccessary management information are given in the @p request
+ * array and the necessary management information are given in the @p request
* argument.
*
* When this function returns, the request might or might not be sent already.
* Use xcb_flush() to make sure that it really was sent.
*
- * Please note that this function is not the prefered way for sending requests.
+ * Please note that this function is not the preferred way for sending requests.
* It's better to use the generated wrapper functions.
*
* Please note that xcb might use index -1 and -2 of the @p vector array internally,
@@ -82,6 +82,37 @@ enum xcb_send_request_flags_t {
*/
unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request);
+/**
+ * @brief Send a request to the server.
+ * @param c: The connection to the X server.
+ * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param vector: Data to send; must have two iovecs before start for internal use.
+ * @param request: Information about the request to be sent.
+ * @param num_fds: Number of additional file descriptors to send to the server
+ * @param fds: Additional file descriptors that should be send to the server.
+ * @return The request's sequence number on success, 0 otherwise.
+ *
+ * This function sends a new request to the X server. The data of the request is
+ * given as an array of @c iovecs in the @p vector argument. The length of that
+ * array and the necessary management information are given in the @p request
+ * argument.
+ *
+ * If @p num_fds is non-zero, @p fds points to an array of file descriptors that
+ * will be sent to the X server along with this request. After this function
+ * returns, all file descriptors sent are owned by xcb and will be closed
+ * eventually.
+ *
+ * When this function returns, the request might or might not be sent already.
+ * Use xcb_flush() to make sure that it really was sent.
+ *
+ * Please note that this function is not the preferred way for sending requests.
+ *
+ * Please note that xcb might use index -1 and -2 of the @p vector array internally,
+ * so they must be valid!
+ */
+unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct iovec *vector,
+ const xcb_protocol_request_t *request, unsigned int num_fds, int *fds);
+
/**
* @brief Send a request to the server, with 64-bit sequence number returned.
* @param c: The connection to the X server.
@@ -92,13 +123,13 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect
*
* This function sends a new request to the X server. The data of the request is
* given as an array of @c iovecs in the @p vector argument. The length of that
- * array and the neccessary management information are given in the @p request
+ * array and the necessary management information are given in the @p request
* argument.
*
* When this function returns, the request might or might not be sent already.
* Use xcb_flush() to make sure that it really was sent.
*
- * Please note that this function is not the prefered way for sending requests.
+ * Please note that this function is not the preferred way for sending requests.
* It's better to use the generated wrapper functions.
*
* Please note that xcb might use index -1 and -2 of the @p vector array internally,
@@ -106,6 +137,38 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect
*/
uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request);
+/**
+ * @brief Send a request to the server, with 64-bit sequence number returned.
+ * @param c: The connection to the X server.
+ * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param vector: Data to send; must have two iovecs before start for internal use.
+ * @param request: Information about the request to be sent.
+ * @param num_fds: Number of additional file descriptors to send to the server
+ * @param fds: Additional file descriptors that should be send to the server.
+ * @return The request's sequence number on success, 0 otherwise.
+ *
+ * This function sends a new request to the X server. The data of the request is
+ * given as an array of @c iovecs in the @p vector argument. The length of that
+ * array and the necessary management information are given in the @p request
+ * argument.
+ *
+ * If @p num_fds is non-zero, @p fds points to an array of file descriptors that
+ * will be sent to the X server along with this request. After this function
+ * returns, all file descriptors sent are owned by xcb and will be closed
+ * eventually.
+ *
+ * When this function returns, the request might or might not be sent already.
+ * Use xcb_flush() to make sure that it really was sent.
+ *
+ * Please note that this function is not the preferred way for sending requests.
+ * It's better to use the generated wrapper functions.
+ *
+ * Please note that xcb might use index -1 and -2 of the @p vector array internally,
+ * so they must be valid!
+ */
+uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iovec *vector,
+ const xcb_protocol_request_t *request, unsigned int num_fds, int *fds);
+
/**
* @brief Send a file descriptor to the server in the next call to xcb_send_request.
* @param c: The connection to the X server.
@@ -114,9 +177,9 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
* After this function returns, the file descriptor given is owned by xcb and
* will be closed eventually.
*
- * FIXME: How the heck is this supposed to work in a thread-safe way? There is a
- * race between two threads doing xcb_send_fd(); xcb_send_request(); at the same
- * time.
+ * @deprecated This function cannot be used in a thread-safe way. Two threads
+ * that run xcb_send_fd(); xcb_send_request(); could mix up their file
+ * descriptors. Instead, xcb_send_request_with_fds() should be used.
*/
void xcb_send_fd(xcb_connection_t *c, int fd);
diff --git a/libxcb/xcb-proto/doc/xml-xcb.txt b/libxcb/xcb-proto/doc/xml-xcb.txt
index f8129ea9c..12c0881a9 100644
--- a/libxcb/xcb-proto/doc/xml-xcb.txt
+++ b/libxcb/xcb-proto/doc/xml-xcb.txt
@@ -218,13 +218,6 @@ enum; the value is restricted to one of the constants named in the enum.
of the list in terms of other fields in the structure. See the section
"Expressions" for details on the expression representation.
-
-
- This element represents a parameter in a request that is not sent over the
- wire. The field can be referenced in the length expressions of lists or in
- an exprfield. The type attribute declares the data type of the field, and
- the name attribute gives the name of the field.
-
expression
This element represents a field in a request that is calculated rather than
@@ -244,8 +237,8 @@ enum; the value is restricted to one of the constants named in the enum.
instead for new protocol definitions.
switch expression
- bitcase expression(s), fields
- case expression(s), fields
+ bitcase expression(s), fields
+ case expression(s), fields
This element represents conditional inclusion of fields. It can be viewed
diff --git a/libxcb/xcb-proto/src/present.xml b/libxcb/xcb-proto/src/present.xml
index 95fee0181..513388c1c 100644
--- a/libxcb/xcb-proto/src/present.xml
+++ b/libxcb/xcb-proto/src/present.xml
@@ -199,15 +199,7 @@ OF THIS SOFTWARE.
-
-
-
- length
- 18
-
- 2
-
-
+
diff --git a/libxcb/xcb-proto/src/xprint.xml b/libxcb/xcb-proto/src/xprint.xml
index dc23dd0da..4da49b0a9 100644
--- a/libxcb/xcb-proto/src/xprint.xml
+++ b/libxcb/xcb-proto/src/xprint.xml
@@ -178,9 +178,13 @@ authorization from the authors.
len_data
-
+
+ len_fmt
+
-
+
+ len_options
+
diff --git a/mesalib/Android.common.mk b/mesalib/Android.common.mk
index edf52d6fa..d662d6018 100644
--- a/mesalib/Android.common.mk
+++ b/mesalib/Android.common.mk
@@ -68,7 +68,16 @@ LOCAL_CFLAGS += \
endif
endif
+ifeq ($(MESA_ENABLE_LLVM),true)
+LOCAL_CFLAGS += \
+ -DHAVE_LLVM=0x0305 -DLLVM_VERSION_PATCH=2 \
+ -D__STDC_CONSTANT_MACROS \
+ -D__STDC_FORMAT_MACROS \
+ -D__STDC_LIMIT_MACROS
+endif
+
LOCAL_CPPFLAGS += \
+ $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-D_USING_LIBCXX) \
-Wno-error=non-virtual-dtor \
-Wno-non-virtual-dtor
diff --git a/mesalib/Android.mk b/mesalib/Android.mk
index b19419ba7..69e0d33f1 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 freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx
+# gallium drivers: swrast freedreno i915g ilo nouveau r300g r600g radeonsi vc4 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.
@@ -48,7 +48,7 @@ MESA_PYTHON2 := python
DRM_GRALLOC_TOP := hardware/drm_gralloc
classic_drivers := i915 i965
-gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx
+gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx vc4
MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
@@ -80,6 +80,8 @@ else
MESA_BUILD_GALLIUM := false
endif
+MESA_ENABLE_LLVM := $(if $(filter radeonsi,$(MESA_GPU_DRIVERS)),true,false)
+
# add subdirectories
ifneq ($(strip $(MESA_GPU_DRIVERS)),)
@@ -89,13 +91,9 @@ SUBDIRS := \
src/glsl \
src/mesa \
src/util \
- src/egl/main
-
-ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
-SUBDIRS += \
+ src/egl/main \
src/egl/drivers/dri2 \
src/mesa/drivers/dri
-endif
ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
SUBDIRS += src/gallium
diff --git a/mesalib/CleanSpec.mk b/mesalib/CleanSpec.mk
index 20681638e..d08b0def7 100644
--- a/mesalib/CleanSpec.mk
+++ b/mesalib/CleanSpec.mk
@@ -13,3 +13,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/libGLES_mesa_int
$(call add-clean-step, rm -rf $(HOST_OUT_release)/*/EXECUTABLES/mesa_*_intermediates)
$(call add-clean-step, rm -rf $(HOST_OUT_release)/*/EXECUTABLES/glsl_compiler_intermediates)
$(call add-clean-step, rm -rf $(HOST_OUT_release)/*/STATIC_LIBRARIES/libmesa_*_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/*_dri_intermediates)
diff --git a/mesalib/VERSION b/mesalib/VERSION
index 8d3030650..1edd8fc00 100644
--- a/mesalib/VERSION
+++ b/mesalib/VERSION
@@ -1 +1 @@
-10.6.0-devel
+10.7.0-devel
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 095e23e69..34d1ac988 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -649,6 +649,7 @@ if test "x$enable_asm" = xyes; then
fi
AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
+AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
dnl Check to see if dlopen is in default libraries (like Solaris, which
@@ -713,15 +714,15 @@ AC_ARG_ENABLE([opengl],
[enable_opengl="$enableval"],
[enable_opengl=yes])
AC_ARG_ENABLE([gles1],
- [AS_HELP_STRING([--enable-gles1],
- [enable support for OpenGL ES 1.x API @<:@default=disabled@:>@])],
+ [AS_HELP_STRING([--disable-gles1],
+ [disable support for OpenGL ES 1.x API @<:@default=enabled@:>@])],
[enable_gles1="$enableval"],
- [enable_gles1=no])
+ [enable_gles1=yes])
AC_ARG_ENABLE([gles2],
- [AS_HELP_STRING([--enable-gles2],
- [enable support for OpenGL ES 2.x API @<:@default=disabled@:>@])],
+ [AS_HELP_STRING([--disable-gles2],
+ [disable support for OpenGL ES 2.x API @<:@default=enabled@:>@])],
[enable_gles2="$enableval"],
- [enable_gles2=no])
+ [enable_gles2=yes])
AC_ARG_ENABLE([dri],
[AS_HELP_STRING([--enable-dri],
@@ -1920,10 +1921,7 @@ if test "x$enable_gallium_llvm" = xyes; then
AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required])
fi
- LLVM_COMPONENTS="engine bitwriter"
- if $LLVM_CONFIG --components | grep -qw 'mcjit'; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
- fi
+ LLVM_COMPONENTS="engine bitwriter mcjit mcdisassembler"
if test "x$enable_opencl" = xyes; then
llvm_check_version_for "3" "5" "0" "opencl"
@@ -2050,16 +2048,19 @@ require_egl_drm() {
}
radeon_llvm_check() {
+ if test ${LLVM_VERSION_INT} -lt 307; then
+ amdgpu_llvm_target_name='r600'
+ else
+ amdgpu_llvm_target_name='amdgpu'
+ fi
if test "x$enable_gallium_llvm" != "xyes"; then
AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
fi
llvm_check_version_for "3" "4" "2" $1
- if test true && $LLVM_CONFIG --targets-built | grep -qvw '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])
+ if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then
+ AC_MSG_ERROR([LLVM $amdgpu_llvm_target_name not enabled in your LLVM build.])
fi
- LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} $amdgpu_llvm_target_name bitreader ipo"
NEED_RADEON_LLVM=yes
if test "x$have_libelf" != xyes; then
AC_MSG_ERROR([$1 requires libelf when using llvm])
@@ -2352,7 +2353,6 @@ AC_CONFIG_FILES([Makefile
src/gallium/drivers/svga/Makefile
src/gallium/drivers/trace/Makefile
src/gallium/drivers/vc4/Makefile
- src/gallium/drivers/vc4/kernel/Makefile
src/gallium/state_trackers/clover/Makefile
src/gallium/state_trackers/dri/Makefile
src/gallium/state_trackers/glx/xlib/Makefile
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt
index c7009308a..f2d06f173 100644
--- a/mesalib/docs/GL3.txt
+++ b/mesalib/docs/GL3.txt
@@ -102,8 +102,8 @@ GL 4.0, GLSL 4.00:
- Dynamically uniform UBO array indices DONE (r600)
- Implicit signed -> unsigned conversions DONE
- Fused multiply-add DONE ()
- - Packing/bitfield/conversion functions DONE (r600, radeonsi)
- - Enhanced textureGather DONE (r600, radeonsi)
+ - Packing/bitfield/conversion functions DONE (r600, radeonsi, softpipe)
+ - Enhanced textureGather DONE (r600, radeonsi, softpipe)
- Geometry shader instancing DONE (r600)
- Geometry shader multiple streams DONE ()
- Enhanced per-sample shading DONE (r600, radeonsi)
@@ -115,7 +115,7 @@ GL 4.0, GLSL 4.00:
GL_ARB_tessellation_shader started (Chris, Ilia)
GL_ARB_texture_buffer_object_rgb32 DONE (i965, nvc0, r600, radeonsi, llvmpipe, softpipe)
GL_ARB_texture_cube_map_array DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
- GL_ARB_texture_gather DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe)
+ GL_ARB_texture_gather DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
GL_ARB_texture_query_lod DONE (i965, nv50, nvc0, r600, radeonsi)
GL_ARB_transform_feedback2 DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
GL_ARB_transform_feedback3 DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
@@ -153,7 +153,7 @@ GL 4.3, GLSL 4.30:
GL_ARB_ES3_compatibility DONE (all drivers that support GLSL 3.30)
GL_ARB_clear_buffer_object DONE (all drivers)
GL_ARB_compute_shader in progress (jljusten)
- GL_ARB_copy_image DONE (i965)
+ GL_ARB_copy_image DONE (i965) (gallium - in progress, VMware)
GL_KHR_debug DONE (all drivers)
GL_ARB_explicit_uniform_location DONE (all drivers that support GLSL)
GL_ARB_fragment_layer_viewport DONE (nv50, nvc0, r600, llvmpipe)
@@ -164,7 +164,7 @@ GL 4.3, GLSL 4.30:
GL_ARB_program_interface_query DONE (all drivers)
GL_ARB_robust_buffer_access_behavior not started
GL_ARB_shader_image_size in progress (Martin Peres)
- GL_ARB_shader_storage_buffer_object not started
+ GL_ARB_shader_storage_buffer_object in progress (Iago Toral, Samuel Iglesias)
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi, llvmpipe)
GL_ARB_texture_query_levels DONE (all drivers that support GLSL 1.30)
@@ -177,7 +177,7 @@ GL 4.4, GLSL 4.40:
GL_MAX_VERTEX_ATTRIB_STRIDE DONE (all drivers)
GL_ARB_buffer_storage DONE (i965, nv50, nvc0, r600, radeonsi)
- GL_ARB_clear_texture DONE (i965)
+ GL_ARB_clear_texture DONE (i965) (gallium - in progress, VMware)
GL_ARB_enhanced_layouts not started
GL_ARB_multi_bind DONE (all drivers)
GL_ARB_query_buffer_object not started
@@ -190,7 +190,7 @@ GL 4.5, GLSL 4.50:
GL_ARB_ES3_1_compatibility not started
GL_ARB_clip_control DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
GL_ARB_conditional_render_inverted DONE (i965, nv50, nvc0, llvmpipe, softpipe)
- GL_ARB_cull_distance not started
+ GL_ARB_cull_distance in progress (Tobias)
GL_ARB_derivative_control DONE (i965, nv50, nvc0, r600)
GL_ARB_direct_state_access DONE (all drivers)
- Transform Feedback object DONE
@@ -221,7 +221,7 @@ GLES3.1, GLSL ES 3.1
GL_ARB_shader_atomic_counters DONE (i965)
GL_ARB_shader_image_load_store in progress (curro)
GL_ARB_shader_image_size in progress (Martin Peres)
- GL_ARB_shader_storage_buffer_object not started
+ GL_ARB_shader_storage_buffer_object in progress (Iago Toral, Samuel Iglesias)
GL_ARB_shading_language_packing DONE (all drivers)
GL_ARB_separate_shader_objects DONE (all drivers)
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
diff --git a/mesalib/docs/devinfo.html b/mesalib/docs/devinfo.html
index 8d20eea3c..0da18b9b7 100644
--- a/mesalib/docs/devinfo.html
+++ b/mesalib/docs/devinfo.html
@@ -17,158 +17,240 @@
Development Notes
-
Adding Extensions
-
-
-To add a new GL extension to Mesa you have to do at least the following.
-
-
- If glext.h doesn't define the extension, edit include/GL/gl.h and add
- code like this:
-
- #ifndef GL_EXT_the_extension_name
- #define GL_EXT_the_extension_name 1
- /* declare the new enum tokens */
- /* prototype the new functions */
- /* TYPEDEFS for the new functions */
- #endif
-
-
-
- In the src/mapi/glapi/gen/ directory, add the new extension functions and
- enums to the gl_API.xml file.
- Then, a bunch of source files must be regenerated by executing the
- corresponding Python scripts.
-
-
- Add a new entry to the gl_extensions struct in mtypes.h
-
-
- Update the extensions.c file.
-
-
- From this point, the best way to proceed is to find another extension,
- similar to the new one, that's already implemented in Mesa and use it
- as an example.
-
-
- If the new extension adds new GL state, the functions in get.c, enable.c
- and attrib.c will most likely require new code.
-
-
- The dispatch tests check_table.cpp and dispatch_sanity.cpp
- should be updated with details about the new extensions functions. These
- tests are run using 'make check'
-
-Mesa's code style has changed over the years. Here's the latest.
+Mesa is over 20 years old and the coding style has evolved over time.
+Some old parts use a style that's a bit out of date.
+If the guidelines below don't cover something, try following the format of
+existing, neighboring code.
-Comment your code! It's extremely important that open-source code be
-well documented. Also, strive to write clean, easily understandable code.
+Basic formatting guidelines
-
-3-space indentation
-
+
+
3-space indentation, no tabs.
+
Limit lines to 78 or fewer characters. The idea is to prevent line
+wrapping in 80-column editors and terminals. There are exceptions, such
+as if you're defining a large, static table of information.
+
Opening braces go on the same line as the if/for/while statement.
+For example:
+
+ if (condition) {
+ foo;
+ } else {
+ bar;
+ }
+
-
-If you use tabs, set them to 8 columns
-
+
Put a space before/after operators. For example, a = b + c;
+and not a=b+c;
-
-Line width: the preferred width to fill comments and code in Mesa is 78
-columns. Exceptions are sometimes made for clarity (e.g. tabular data is
-sometimes filled to a much larger width so that extraneous carriage returns
-don't obscure the table).
-
+
This GNU indent command generally does the right thing for formatting:
+
Use comments wherever you think it would be helpful for other developers.
+Several specific cases and style examples follow. Note that we roughly
+follow Doxygen conventions.
+
+
+Single-line comments:
+
- if (condition) {
- foo;
- }
- else {
- bar;
- }
-
- switch (condition) {
- case 0:
- foo();
- break;
-
- case 1: {
- ...
- break;
- }
-
- default:
- ...
- break;
- }
+ /* If this is a new buffer object id, or one which was generated but
+ * never used before, allocate a buffer object now.
+ */
+
+We try to quote the OpenGL specification where prudent:
+
+ /* Page 38 of the PDF of the OpenGL ES 3.0 spec says:
+ *
+ * "An INVALID_OPERATION error is generated for any of the following
+ * conditions:
+ *
+ * * is zero."
+ *
+ * Additionally, page 94 of the PDF of the OpenGL 4.5 core spec
+ * (30.10.2014) also says this, so it's no longer allowed for desktop GL,
+ * either.
+ */
+
+Function comment example:
+
+ /**
+ * Create and initialize a new buffer object. Called via the
+ * ctx->Driver.CreateObject() driver callback function.
+ * \param name integer name of the object
+ * \param type one of GL_FOO, GL_BAR, etc.
+ * \return pointer to new object or NULL if error
+ */
+ struct gl_object *
+ _mesa_create_object(GLuint name, GLenum type)
+ {
+ /* function body */
+ }
-
-Here's the GNU indent command which will best approximate my preferred style:
-(Note that it won't format switch statements in the preferred way)
-
+
Put the function return type and qualifiers on one line and the function
+name and parameters on the next, as seen above. This makes it easy to use
+grep ^function_name dir/* to find function definitions. Also,
+the opening brace goes on the next line by itself (see above.)
+
+
Function names follow various conventions depending on the type of function:
- indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
+ glFooBar() - a public GL entry point (in glapi_dispatch.c)
+ _mesa_FooBar() - the internal immediate mode function
+ save_FooBar() - retained mode (display list) function in dlist.c
+ foo_bar() - a static (private) function
+ _mesa_foo_bar() - an internal non-static Mesa function
+
Constants, macros and enumerant names are ALL_UPPERCASE, with _ between
+words.
+
Mesa usually uses camel case for local variables (Ex: "localVarname")
+while gallium typically uses underscores (Ex: "local_var_name").
+
Global variables are almost never used because Mesa should be thread-safe.
-
-Local variable name example: localVarName (no underscores)
-
+
Booleans. Places that are not directly visible to the GL API
+should prefer the use of bool, true, and
+false over GLboolean, GL_TRUE, and
+GL_FALSE. In C code, this may mean that
+#include <stdbool.h> needs to be added. The
+try_emit_* methods in src/mesa/program/ir_to_mesa.cpp and
+src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
-
-Constants and macros are ALL_UPPERCASE, with _ between words
-
+
+
+
+
Submitting patches
-Global variables are not allowed.
+The basic guidelines for submitting patches are:
+
+
Patches should be sufficiently tested before submitting.
+
Code patches should follow Mesa coding conventions.
+
Whenever possible, patches should only effect individual Mesa/Gallium
+components.
+
Patches should never introduce build breaks and should be bisectable (see
+git bisect.)
+
Patches should be properly formatted (see below).
+
Patches should be submitted to mesa-dev for review using
+git send-email.
+
Patches should not mix code changes with code formatting changes (except,
+perhaps, in very trivial cases.)
+
+
+
Patch formatting
+
-Function name examples:
+The basic rules for patch formatting are:
+
+
+
Lines should be limited to 75 characters or less so that git logs
+displayed in 80-column terminals avoid line wrapping. Note that git
+log uses 4 spaces of indentation (4 + 75 < 80).
+
The first line should be a short, concise summary of the change prefixed
+with a module name. Examples:
+
+ mesa: Add support for querying GL_VERTEX_ATTRIB_ARRAY_LONG
+
+ gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERY
+
+ i965: Fix missing type in local variable declaration.
+
+
Subsequent patch comments should describe the change in more detail,
+if needed. For example:
+
+ i965: Remove end-of-thread SEND alignment code.
+
+ This was present in Eric's initial implementation of the compaction code
+ for Sandybridge (commit 077d01b6). There is no documentation saying this
+ is necessary, and removing it causes no regressions in piglit on any
+ platform.
+
+
A "Signed-off-by:" line is not required, but not discouraged either.
+
If a patch address a bugzilla issue, that should be noted in the
+patch comment. For example:
+
If there have been several revisions to a patch during the review
+process, they should be noted such as in this example:
- glFooBar() - a public GL entry point (in glapi_dispatch.c)
- _mesa_FooBar() - the internal immediate mode function
- save_FooBar() - retained mode (display list) function in dlist.c
- foo_bar() - a static (private) function
- _mesa_foo_bar() - an internal non-static Mesa function
+ st/mesa: add ARB_texture_stencil8 support (v4)
+
+ if we support stencil texturing, enable texture_stencil8
+ there is no requirement to support native S8 for this,
+ the texture can be converted to x24s8 fine.
+
+ v2: fold fixes from Marek in:
+ a) put S8 last in the list
+ b) fix renderable to always test for d/s renderable
+ fixup the texture case to use a stencil only format
+ for picking the format for the texture view.
+ v3: hit fallback for getteximage
+ v4: put s8 back in front, it shouldn't get picked now (Ilia)
+
If someone tested your patch, document it with a line like this:
+
+ Tested-by: Joe Hacker <jhacker@foo.com>
+
+
If the patch was reviewed (usually the case) or acked by someone,
+that should be documented with:
+
+ Reviewed-by: Joe Hacker <jhacker@foo.com>
+ Acked-by: Joe Hacker <jhacker@foo.com>
+
+
+
+
+
+
Testing Patches
-Places that are not directly visible to the GL API should prefer the use
-of bool, true, and
-false over GLboolean, GL_TRUE, and
-GL_FALSE. In C code, this may mean that
-#include <stdbool.h> needs to be added. The
-try_emit_* methods in src/mesa/program/ir_to_mesa.cpp and
-src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
+It should go without saying that patches must be tested. In general,
+do whatever testing is prudent.
-
Submitting patches
-
-You should always run the Mesa Testsuite before submitting patches.
-The Testsuite can be run using the 'make check' command. All tests
+You should always run the Mesa test suite before submitting patches.
+The test suite can be run using the 'make check' command. All tests
must pass before patches will be accepted, this may mean you have
to update the tests themselves.
+
+Whenever possible and applicable, test the patch with
+Piglit to
+check for regressions.
+
+
+
+
Mailing Patches
+
Patches should be sent to the Mesa mailing list for review.
When submitting a patch make sure to use git send-email rather than attaching
@@ -184,7 +266,32 @@ re-sending the whole series). Using --in-reply-to makes
it harder for reviewers to accidentally review old patches.
-
Marking a commit as a candidate for a stable branch
+
Reviewing Patches
+
+
+When you've reviewed a patch on the mailing list, please be unambiguous
+about your review. That is, state either
+
+ Reviewed-by: Joe Hacker <jhacker@foo.com>
+
+or
+
+ Acked-by: Joe Hacker <jhacker@foo.com>
+
+Rather than saying just "LGTM" or "Seems OK".
+
+
+
+If small changes are suggested, it's OK to say something like:
+
+ With the above fixes, Reviewed-by: Joe Hacker <jhacker@foo.com>
+
+which tells the patch author that the patch can be committed, as long
+as the issues are resolved first.
+
+
+
+
Marking a commit as a candidate for a stable branch
If you want a commit to be applied to a stable branch,
@@ -221,7 +328,7 @@ the upcoming stable release can always be seen on the
Mesa Stable Queue
page.
-
Criteria for accepting patches to the stable branch
+
Criteria for accepting patches to the stable branch
Mesa has a designated release manager for each stable branch, and the release
manager is the only developer that should be pushing changes to these
@@ -306,7 +413,8 @@ be rejected:
regression that is unaacceptable for the stable branch.
-
Making a New Mesa Release
+
+
Making a New Mesa Release
These are the instructions for making a new Mesa release.
@@ -456,7 +564,7 @@ Edit docs/relnotes/X.Y.Z.html to add the sha256sums printed as part of "make
tarballs" in the previous step. Commit this change.
-
Push all commits and the tag creates above
+
Push all commits and the tag created above
This is the first step that cannot easily be undone. The release is going
@@ -483,7 +591,7 @@ signatures to the freedesktop.org server:
mv ~/MesaLib-X.Y.Z* .
-
Back on mesa master, andd the new release notes into the tree
+
Back on mesa master, add the new release notes into the tree
Something like the following steps will do the trick:
@@ -543,6 +651,56 @@ release announcement:
+
+
Adding Extensions
+
+
+To add a new GL extension to Mesa you have to do at least the following.
+
+
+
+ If glext.h doesn't define the extension, edit include/GL/gl.h and add
+ code like this:
+
+ #ifndef GL_EXT_the_extension_name
+ #define GL_EXT_the_extension_name 1
+ /* declare the new enum tokens */
+ /* prototype the new functions */
+ /* TYPEDEFS for the new functions */
+ #endif
+
+
+
+ In the src/mapi/glapi/gen/ directory, add the new extension functions and
+ enums to the gl_API.xml file.
+ Then, a bunch of source files must be regenerated by executing the
+ corresponding Python scripts.
+
+
+ Add a new entry to the gl_extensions struct in mtypes.h
+
+
+ Update the extensions.c file.
+
+
+ From this point, the best way to proceed is to find another extension,
+ similar to the new one, that's already implemented in Mesa and use it
+ as an example.
+
+
+ If the new extension adds new GL state, the functions in get.c, enable.c
+ and attrib.c will most likely require new code.
+
+
+ The dispatch tests check_table.cpp and dispatch_sanity.cpp
+ should be updated with details about the new extensions functions. These
+ tests are run using 'make check'
+