diff options
55 files changed, 871 insertions, 509 deletions
diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c index cdb8c0f25..fe69eecd7 100644 --- a/fontconfig/src/fccfg.c +++ b/fontconfig/src/fccfg.c @@ -722,6 +722,16 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf) v.u.l = FcLangSetPromote (v.u.s, buf); v.type = FcTypeLangSet; } + else if (v.type == FcTypeVoid && u.type == FcTypeLangSet) + { + v.u.l = FcLangSetPromote (NULL, buf); + v.type = FcTypeLangSet; + } + else if (v.type == FcTypeVoid && u.type == FcTypeCharSet) + { + v.u.c = FcCharSetPromote (buf); + v.type = FcTypeCharSet; + } if (buf && v.type == FcTypeDouble && u.type == FcTypeRange) { v.u.r = FcRangePromote (v.u.d, buf); diff --git a/fontconfig/src/fccharset.c b/fontconfig/src/fccharset.c index c9f928cd4..43a3cc00a 100644 --- a/fontconfig/src/fccharset.c +++ b/fontconfig/src/fccharset.c @@ -43,6 +43,21 @@ FcCharSetCreate (void) } FcCharSet * +FcCharSetPromote (FcValuePromotionBuffer *vbuf) +{ + FcCharSet *fcs = (FcCharSet *) vbuf; + + FC_ASSERT_STATIC (sizeof (FcCharSet) <= sizeof (FcValuePromotionBuffer)); + + FcRefSetConst (&fcs->ref); + fcs->num = 0; + fcs->leaves_offset = 0; + fcs->numbers_offset = 0; + + return fcs; +} + +FcCharSet * FcCharSetNew (void) { return FcCharSetCreate (); diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c index 988913ba2..ae19ae91b 100644 --- a/fontconfig/src/fcfreetype.c +++ b/fontconfig/src/fcfreetype.c @@ -1104,9 +1104,6 @@ FcFreeTypeQueryFace (const FT_Face face, char psname[256]; const char *tmp; - FcChar8 *hashstr = NULL; - FT_Error err; - FT_ULong len = 0, alen; FcRange *r = NULL; double lower_size = 0.0L, upper_size = DBL_MAX; @@ -1324,7 +1321,7 @@ FcFreeTypeQueryFace (const FT_Face face, ++nstyle; } - if (!nfamily) + if (!nfamily && file && *file) { FcChar8 *start, *end; FcChar8 *family; @@ -1398,7 +1395,7 @@ FcFreeTypeQueryFace (const FT_Face face, if (!FcPatternAddString (pat, FC_POSTSCRIPT_NAME, (const FcChar8 *)psname)) goto bail1; - if (!FcPatternAddString (pat, FC_FILE, file)) + if (file && *file && !FcPatternAddString (pat, FC_FILE, file)) goto bail1; if (!FcPatternAddInteger (pat, FC_INDEX, id)) @@ -1699,46 +1696,55 @@ FcFreeTypeQueryFace (const FT_Face face, if (!FcPatternAddBool (pat, FC_DECORATIVE, decorative)) goto bail1; - err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len); - if (err == FT_Err_Ok) + + /* + * Compute hash digest for the font + */ { - char *fontdata; - - alen = (len + 63) & ~63; - fontdata = malloc (alen); - if (!fontdata) - goto bail3; - err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len); - if (err != FT_Err_Ok) + FcChar8 *hashstr = NULL; + FcHashDigest digest; + + FcHashInitDigest (digest); + + if (face->stream->read == NULL) { - free (fontdata); - goto bail3; + const char *data = (const char *) face->stream->base; + size_t total_len = face->stream->size; + size_t len = total_len; + + while (len >= 64) + { + FcHashDigestAddBlock (digest, data); + data += 64; + len -= 64; + } + FcHashDigestFinish (digest, data, total_len); + } else { + char data[64]; + size_t total_len = 0; + size_t len = 0; + + while ((len = face->stream->read (face->stream, total_len, (unsigned char *) data, sizeof(data))) == 64) + { + FcHashDigestAddBlock (digest, data); + total_len += 64; + } + total_len += len; + FcHashDigestFinish (digest, data, total_len); } - memset (&fontdata[len], 0, alen - len); - hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len); - free (fontdata); - } - else if (err == FT_Err_Invalid_Face_Handle) - { - /* font may not support SFNT. falling back to - * read the font data from file directly - */ - hashstr = FcHashGetSHA256DigestFromFile (file); - } - else - { - goto bail3; - } - if (hashstr) - { - if (!FcPatternAddString (pat, FC_HASH, hashstr)) + + hashstr = FcHashToString (digest); + if (hashstr) { + if (!FcPatternAddString (pat, FC_HASH, hashstr)) + { + free (hashstr); + goto bail1; + } free (hashstr); - goto bail1; } - free (hashstr); } -bail3: + /* * Compute the unicode coverage for the font diff --git a/fontconfig/src/fchash.c b/fontconfig/src/fchash.c index 38300028c..1526cfd2b 100644 --- a/fontconfig/src/fchash.c +++ b/fontconfig/src/fchash.c @@ -3,7 +3,9 @@ * * Copyright © 2003 Keith Packard * Copyright © 2013 Red Hat, Inc. + * Copyright © 2014 Google, Inc. * Red Hat Author(s): Akira TAGOH + * Google Author(s): Behdad Esfahbod * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -27,6 +29,9 @@ #include <stdio.h> #include <string.h> +/* SHA256 */ + + #define ROTRN(w, v, n) ((((FcChar32)v) >> n) | (((FcChar32)v) << (w - n))) #define ROTR32(v, n) ROTRN(32, v, n) #define SHR(v, n) (v >> n) @@ -38,28 +43,21 @@ #define ss1(x) (ROTR32(x, 17) ^ ROTR32(x, 19) ^ SHR(x, 10)) -static FcChar32 * -FcHashInitSHA256Digest (void) + +void +FcHashInitDigest (FcHashDigest digest) { - int i; - static const FcChar32 h[] = { + static const FcHashDigest init = { 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL, 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL }; - FcChar32 *ret = malloc (sizeof (FcChar32) * 8); - if (!ret) - return NULL; - - for (i = 0; i < 8; i++) - ret[i] = h[i]; - - return ret; + memcpy (digest, init, sizeof (FcHashDigest)); } -static void -FcHashComputeSHA256Digest (FcChar32 *hash, - const char *block) +void +FcHashDigestAddBlock (FcHashDigest digest, + const char block[64]) { static const FcChar32 k[] = { 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, @@ -82,7 +80,7 @@ FcHashComputeSHA256Digest (FcChar32 *hash, FcChar32 w[64], i, j, t1, t2; FcChar32 a, b, c, d, e, f, g, h; -#define H(n) (hash[n]) +#define H(n) (digest[n]) a = H(0); b = H(1); @@ -130,188 +128,62 @@ FcHashComputeSHA256Digest (FcChar32 *hash, #undef H } -static FcChar8 * -FcHashSHA256ToString (FcChar32 *hash) -{ - FcChar8 *ret = NULL; - static const char hex[] = "0123456789abcdef"; - int i, j; - - if (hash) - { - ret = malloc (sizeof (FcChar8) * (8 * 8 + 7 + 1)); - if (!ret) - return NULL; - memcpy (ret, "sha256:", 7); -#define H(n) hash[n] - for (i = 0; i < 8; i++) - { - FcChar32 v = H(i); - - for (j = 0; j < 8; j++) - ret[7 + (i * 8) + j] = hex[(v >> (28 - j * 4)) & 0xf]; - } - ret[7 + i * 8] = 0; -#undef H - free (hash); - } - - return ret; -} - -FcChar8 * -FcHashGetSHA256Digest (const FcChar8 *input_strings, - size_t len) -{ - size_t i, round_len = len / 64; - char block[64]; - FcChar32 *ret = FcHashInitSHA256Digest (); - - if (!ret) - return NULL; - - for (i = 0; i < round_len; i++) - { - FcHashComputeSHA256Digest (ret, (const char *)&input_strings[i * 64]); - } - /* padding */ - if ((len % 64) != 0) - memcpy (block, &input_strings[len / 64], len % 64); - memset (&block[len % 64], 0, 64 - (len % 64)); - block[len % 64] = 0x80; - if ((64 - (len % 64)) < 9) - { - /* process a block once */ - FcHashComputeSHA256Digest (ret, block); - memset (block, 0, 64); - } - /* set input size at the end */ - len *= 8; - block[63 - 0] = (uint64_t)len & 0xff; - block[63 - 1] = ((uint64_t)len >> 8) & 0xff; - block[63 - 2] = ((uint64_t)len >> 16) & 0xff; - block[63 - 3] = ((uint64_t)len >> 24) & 0xff; - block[63 - 4] = ((uint64_t)len >> 32) & 0xff; - block[63 - 5] = ((uint64_t)len >> 40) & 0xff; - block[63 - 6] = ((uint64_t)len >> 48) & 0xff; - block[63 - 7] = ((uint64_t)len >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, block); - - return FcHashSHA256ToString (ret); -} - -FcChar8 * -FcHashGetSHA256DigestFromFile (const FcChar8 *filename) +void +FcHashDigestFinish (FcHashDigest digest, + const char *residual, /* < 64 bytes */ + size_t total_len) { - FILE *fp = fopen ((const char *)filename, "rb"); char ibuf[64]; - FcChar32 *ret; - size_t len; - struct stat st; - - if (!fp) - return NULL; + unsigned int len = total_len % 64; + uint64_t v; - if (FcStat (filename, &st)) - goto bail0; + if (!len) + return; - ret = FcHashInitSHA256Digest (); - if (!ret) - goto bail0; + memcpy (ibuf, residual, len); + memset (ibuf + len, 0, 64 - len); + ibuf[len] = 0x80; - while (!feof (fp)) + if ((64 - len) < 9) { - if ((len = fread (ibuf, sizeof (char), 64, fp)) < 64) - { - uint64_t v; - - /* add a padding */ - memset (&ibuf[len], 0, 64 - len); - ibuf[len] = 0x80; - if ((64 - len) < 9) - { - /* process a block once */ - FcHashComputeSHA256Digest (ret, ibuf); - memset (ibuf, 0, 64); - } - /* set input size at the end */ - v = (long)st.st_size * 8; - ibuf[63 - 0] = v & 0xff; - ibuf[63 - 1] = (v >> 8) & 0xff; - ibuf[63 - 2] = (v >> 16) & 0xff; - ibuf[63 - 3] = (v >> 24) & 0xff; - ibuf[63 - 4] = (v >> 32) & 0xff; - ibuf[63 - 5] = (v >> 40) & 0xff; - ibuf[63 - 6] = (v >> 48) & 0xff; - ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, ibuf); - break; - } - else - { - FcHashComputeSHA256Digest (ret, ibuf); - } + FcHashDigestAddBlock (digest, ibuf); + memset (ibuf, 0, 64); } - fclose (fp); - - return FcHashSHA256ToString (ret); - -bail0: - fclose (fp); - return NULL; + /* set input size at the end */ + v = (uint64_t) total_len * 8; + ibuf[63 - 0] = v & 0xff; + ibuf[63 - 1] = (v >> 8) & 0xff; + ibuf[63 - 2] = (v >> 16) & 0xff; + ibuf[63 - 3] = (v >> 24) & 0xff; + ibuf[63 - 4] = (v >> 32) & 0xff; + ibuf[63 - 5] = (v >> 40) & 0xff; + ibuf[63 - 6] = (v >> 48) & 0xff; + ibuf[63 - 7] = (v >> 56) & 0xff; + FcHashDigestAddBlock (digest, ibuf); } FcChar8 * -FcHashGetSHA256DigestFromMemory (const char *fontdata, - size_t length) +FcHashToString (const FcHashDigest digest) { - char ibuf[64]; - FcChar32 *ret; - size_t i = 0; + FcChar8 *ret = NULL; + static const char hex[] = "0123456789abcdef"; + int i, j; - ret = FcHashInitSHA256Digest (); + ret = malloc (sizeof (FcChar8) * (8 * 8 + 7 + 1)); if (!ret) return NULL; - - while (i <= length) + memcpy (ret, "sha256:", 7); +#define H(n) digest[n] + for (i = 0; i < 8; i++) { - if ((length - i) < 64) - { - uint64_t v; - size_t n; + FcChar32 v = H(i); - /* add a padding */ - n = length - i; - if (n > 0) - memcpy (ibuf, &fontdata[i], n); - memset (&ibuf[n], 0, 64 - n); - ibuf[n] = 0x80; - if ((64 - n) < 9) - { - /* process a block once */ - FcHashComputeSHA256Digest (ret, ibuf); - memset (ibuf, 0, 64); - } - /* set input size at the end */ - v = length * 8; - ibuf[63 - 0] = v & 0xff; - ibuf[63 - 1] = (v >> 8) & 0xff; - ibuf[63 - 2] = (v >> 16) & 0xff; - ibuf[63 - 3] = (v >> 24) & 0xff; - ibuf[63 - 4] = (v >> 32) & 0xff; - ibuf[63 - 5] = (v >> 40) & 0xff; - ibuf[63 - 6] = (v >> 48) & 0xff; - ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, ibuf); - break; - } - else - { - FcHashComputeSHA256Digest (ret, &fontdata[i]); - } - i += 64; + for (j = 0; j < 8; j++) + ret[7 + (i * 8) + j] = hex[(v >> (28 - j * 4)) & 0xf]; } + ret[7 + i * 8] = 0; +#undef H - return FcHashSHA256ToString (ret); + return ret; } diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h index dd26fd89a..3d41b0cb2 100644 --- a/fontconfig/src/fcint.h +++ b/fontconfig/src/fcint.h @@ -720,6 +720,9 @@ FcPrivate FcLangSet * FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l); /* fccharset.c */ +FcPrivate FcCharSet * +FcCharSetPromote (FcValuePromotionBuffer *vbuf); + FcPrivate void FcLangCharSetPopulate (void); @@ -864,16 +867,23 @@ FcPrivate FcFontSet * FcFontSetDeserialize (const FcFontSet *set); /* fchash.c */ -FcPrivate FcChar8 * -FcHashGetSHA256Digest (const FcChar8 *input_strings, - size_t len); -FcPrivate FcChar8 * -FcHashGetSHA256DigestFromFile (const FcChar8 *filename); +typedef FcChar32 FcHashDigest[8]; + +FcPrivate void +FcHashInitDigest (FcHashDigest digest); + +FcPrivate void +FcHashDigestAddBlock (FcHashDigest digest, + const char block[64]); + +FcPrivate void +FcHashDigestFinish (FcHashDigest digest, + const char *residual, /* < 64 bytes */ + size_t total_len); FcPrivate FcChar8 * -FcHashGetSHA256DigestFromMemory (const char *fontdata, - size_t length); +FcHashToString (const FcHashDigest digest); /* fcinit.c */ FcPrivate FcConfig * diff --git a/fontconfig/src/fclang.c b/fontconfig/src/fclang.c index 9f685f6fd..b1fd1bcae 100644 --- a/fontconfig/src/fclang.c +++ b/fontconfig/src/fclang.c @@ -720,19 +720,22 @@ FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *vbuf) memset (buf->ls.map, '\0', sizeof (buf->ls.map)); buf->ls.map_size = NUM_LANG_SET_MAP; buf->ls.extra = 0; - id = FcLangSetIndex (lang); - if (id > 0) + if (lang) { - FcLangSetBitSet (&buf->ls, id); - } - else - { - buf->ls.extra = &buf->strs; - buf->strs.num = 1; - buf->strs.size = 1; - buf->strs.strs = &buf->str; - FcRefInit (&buf->strs.ref, 1); - buf->str = (FcChar8 *) lang; + id = FcLangSetIndex (lang); + if (id > 0) + { + FcLangSetBitSet (&buf->ls, id); + } + else + { + buf->ls.extra = &buf->strs; + buf->strs.num = 1; + buf->strs.size = 1; + buf->strs.strs = &buf->str; + FcRefInit (&buf->strs.ref, 1); + buf->str = (FcChar8 *) lang; + } } return &buf->ls; } diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 99a761a42..4e4d76155 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -332,6 +332,19 @@ LDFLAGS=$save_LDFLAGS AC_SUBST([GC_SECTIONS]) dnl +dnl OpenBSD does not have DT_NEEDED entries for libc by design +dnl so when these flags are passed to ld via libtool the checks will fail +dnl +case "$host_os" in +openbsd*) + LD_NO_UNDEFINED="" ;; +*) + LD_NO_UNDEFINED="-Wl,--no-undefined" ;; +esac + +AC_SUBST([LD_NO_UNDEFINED]) + +dnl dnl compatibility symlinks dnl case "$host_os" in @@ -1624,6 +1637,12 @@ if test "x$enable_gallium_llvm" = xyes; then LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'` fi + LLVM_REQUIRED_VERSION_MAJOR="3" + LLVM_REQUIRED_VERSION_MINOR="1" + if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then + AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required]) + fi + LLVM_COMPONENTS="engine bitwriter" if $LLVM_CONFIG --components | grep -qw 'mcjit'; then LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit" @@ -1948,6 +1967,8 @@ AM_CONDITIONAL(HAVE_GALLIUM_ILO, test "x$HAVE_GALLIUM_ILO" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_R300, test "x$HAVE_GALLIUM_R300" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_R600, test "x$HAVE_GALLIUM_R600" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_RADEONSI, test "x$HAVE_GALLIUM_RADEONSI" = xyes) +AM_CONDITIONAL(HAVE_GALLIUM_RADEON_COMMON, test "x$HAVE_GALLIUM_R600" = xyes -o \ + "x$HAVE_GALLIUM_RADEONSI" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes) diff --git a/mesalib/docs/relnotes/10.1.3.html b/mesalib/docs/relnotes/10.1.3.html new file mode 100644 index 000000000..84130cf9b --- /dev/null +++ b/mesalib/docs/relnotes/10.1.3.html @@ -0,0 +1,90 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>Mesa Release Notes</title> + <link rel="stylesheet" type="text/css" href="../mesa.css"> +</head> +<body> + +<div class="header"> + <h1>The Mesa 3D Graphics Library</h1> +</div> + +<iframe src="../contents.html"></iframe> +<div class="content"> + +<h1>Mesa 10.1.3 Release Notes / (May 9, 2014)</h1> + +<p> +Mesa 10.1.3 is a bug fix release which fixes bugs found since the 10.1.2 release. +</p> + +<p> +Note: Mesa 10.1.3 is being released sooner than originally scheduled to make +available a fix for a performance rgression that was inadvertently introduced +to Mesa 10.1.2. The performance regression is reported to make vmware +swapbuffers fall back to software. +</p> + +<p> +Mesa 10.1.3 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is <strong>only</strong> available if requested at context creation +because compatibility contexts are not supported. +</p> + + +<h2>MD5 checksums</h2> +<pre> +665fe1656aaa2c37b32042068aff92cb MesaLib-10.1.3.tar.gz +ba6dbe2b9cab0b4de840c996b9b6a3ad MesaLib-10.1.3.tar.bz2 +4e6f26330a63d3c47e62ac4bdead39e8 MesaLib-10.1.3.zip +</pre> + + +<h2>New features</h2> +<p>None</p> + +<h2>Bug fixes</h2> + +<p>This list is likely incomplete.</p> + +<ul> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77245">Bug 77245</a> - Bogus GL_ARB_explicit_attrib_location layout identifier warnings</li> + +</ul> + + +<h2>Changes</h2> + +<p>Carl Worth (3):</p> +<ul> + <li>docs: Add MD5 sums for Mesa 10.1.2</li> + <li>get-pick-list.sh: Require explicit "10.1" for nominating stable patches</li> + <li>VERSION: Update to 10.1.3</li> +</ul> + +<p>Kenneth Graunke (2):</p> +<ul> + <li>mesa: Fix MaxNumLayers for 1D array textures.</li> + <li>i965: Fix depth (array slices) computation for 1D_ARRAY render targets.</li> +</ul> + +<p>Tapani Pälli (1):</p> +<ul> + <li>glsl: fix bogus layout qualifier warnings</li> +</ul> + +<p>Thomas Hellstrom (1):</p> +<ul> + <li>st/xa: Fix performance regression introduced by commit "Cache render target surface"</li> +</ul> + + +</div> +</body> +</html> diff --git a/mesalib/docs/relnotes/10.2.html b/mesalib/docs/relnotes/10.2.html index 9bbaf887b..af44ca107 100644 --- a/mesalib/docs/relnotes/10.2.html +++ b/mesalib/docs/relnotes/10.2.html @@ -67,6 +67,25 @@ TBD. <h2>Changes</h2> <ul> +<li>Renamed <i>--with-llvm-shared-libs</i> to <i>--enable-llvm-shared-libs</i></li> +<p> +The option is used to control how mesa is linked against LLVM, and now +defaults to enabled (shared linking). +</p> + +<li>Split <i>libxatracker.so</i> into a standalone library which can be used +with any gallium driver.</li> +<p> +Previously the library was linked statically against vmware's virtual gpu +driver(svga), whereas now it loads a shared pipe_*.so driver. Provide the +following options during configure, if you would like support for svga driver +<i>--enable-xa --with-gallium-drivers=svga</i> +</p> + +<p> +Note: The files are installed in $(libdir)/gallium-pipe/ and the interface +between them and libxatracker.so is <strong>not</strong> stable. +</p> </ul> </div> diff --git a/mesalib/scons/llvm.py b/mesalib/scons/llvm.py index 134a0728e..cdfbe4370 100644 --- a/mesalib/scons/llvm.py +++ b/mesalib/scons/llvm.py @@ -37,6 +37,9 @@ import SCons.Errors import SCons.Util +required_llvm_version = '3.1' + + def generate(env): env['llvm'] = False @@ -84,6 +87,9 @@ def generate(env): if llvm_version is None: print 'scons: could not determine the LLVM version from %s' % llvm_config return + if llvm_version < distutils.version.LooseVersion(required_llvm_version): + print 'scons: LLVM version %s found, but %s is required' % (llvm_version, required_llvm_version) + return env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')]) env.AppendUnique(CPPDEFINES = [ @@ -104,8 +110,8 @@ def generate(env): 'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore', 'LLVMSupport', 'LLVMRuntimeDyld', 'LLVMObject' ]) - elif llvm_version >= distutils.version.LooseVersion('3.0'): - # 3.0 + else: + # 3.1 env.Prepend(LIBS = [ 'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser', 'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG', @@ -116,46 +122,6 @@ def generate(env): 'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore', 'LLVMSupport' ]) - elif llvm_version >= distutils.version.LooseVersion('2.9'): - # 2.9 - env.Prepend(LIBS = [ - 'LLVMObject', 'LLVMMCJIT', 'LLVMMCDisassembler', - 'LLVMLinker', 'LLVMipo', 'LLVMInterpreter', - 'LLVMInstrumentation', 'LLVMJIT', 'LLVMExecutionEngine', - 'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser', - 'LLVMMCParser', 'LLVMX86AsmPrinter', 'LLVMX86CodeGen', - 'LLVMSelectionDAG', 'LLVMX86Utils', 'LLVMX86Info', 'LLVMAsmPrinter', - 'LLVMCodeGen', 'LLVMScalarOpts', 'LLVMInstCombine', - 'LLVMTransformUtils', 'LLVMipa', 'LLVMAsmParser', - 'LLVMArchive', 'LLVMBitReader', 'LLVMAnalysis', 'LLVMTarget', - 'LLVMCore', 'LLVMMC', 'LLVMSupport', - ]) - elif llvm_version >= distutils.version.LooseVersion('2.7'): - # 2.7 - env.Prepend(LIBS = [ - 'LLVMLinker', 'LLVMipo', 'LLVMInterpreter', - 'LLVMInstrumentation', 'LLVMJIT', 'LLVMExecutionEngine', - 'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser', - 'LLVMMCParser', 'LLVMX86AsmPrinter', 'LLVMX86CodeGen', - 'LLVMSelectionDAG', 'LLVMX86Info', 'LLVMAsmPrinter', - 'LLVMCodeGen', 'LLVMScalarOpts', 'LLVMInstCombine', - 'LLVMTransformUtils', 'LLVMipa', 'LLVMAsmParser', - 'LLVMArchive', 'LLVMBitReader', 'LLVMAnalysis', 'LLVMTarget', - 'LLVMMC', 'LLVMCore', 'LLVMSupport', 'LLVMSystem', - ]) - else: - # 2.6 - env.Prepend(LIBS = [ - 'LLVMX86AsmParser', 'LLVMX86AsmPrinter', 'LLVMX86CodeGen', - 'LLVMX86Info', 'LLVMLinker', 'LLVMipo', 'LLVMInterpreter', - 'LLVMInstrumentation', 'LLVMJIT', 'LLVMExecutionEngine', - 'LLVMDebugger', 'LLVMBitWriter', 'LLVMAsmParser', - 'LLVMArchive', 'LLVMBitReader', 'LLVMSelectionDAG', - 'LLVMAsmPrinter', 'LLVMCodeGen', 'LLVMScalarOpts', - 'LLVMTransformUtils', 'LLVMipa', 'LLVMAnalysis', - 'LLVMTarget', 'LLVMMC', 'LLVMCore', 'LLVMSupport', - 'LLVMSystem', - ]) env.Append(LIBS = [ 'imagehlp', 'psapi', @@ -180,6 +146,10 @@ def generate(env): llvm_version = env.backtick('llvm-config --version').rstrip() llvm_version = distutils.version.LooseVersion(llvm_version) + if llvm_version < distutils.version.LooseVersion(required_llvm_version): + print 'scons: LLVM version %s found, but %s is required' % (llvm_version, required_llvm_version) + return + try: # Treat --cppflags specially to prevent NDEBUG from disabling # assertion failures in debug builds. @@ -197,8 +167,7 @@ def generate(env): components = ['engine', 'bitwriter', 'x86asmprinter'] - if llvm_version >= distutils.version.LooseVersion('3.1'): - components.append('mcjit') + components.append('mcjit') env.ParseConfig('llvm-config --libs ' + ' '.join(components)) env.ParseConfig('llvm-config --ldflags') diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index 7516c33e1..0128b3f4e 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -799,11 +799,10 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, "assignment to %s", non_lvalue_description); error_emitted = true; - } else if (lhs->variable_referenced() != NULL - && lhs->variable_referenced()->data.read_only) { + } else if (lhs_var != NULL && lhs_var->data.read_only) { _mesa_glsl_error(&lhs_loc, state, "assignment to read-only variable '%s'", - lhs->variable_referenced()->name); + lhs_var->name); error_emitted = true; } else if (lhs->type->is_array() && !state->check_version(120, 300, &lhs_loc, diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp index 704458115..89c4b0834 100755 --- a/mesalib/src/glsl/builtin_functions.cpp +++ b/mesalib/src/glsl/builtin_functions.cpp @@ -62,11 +62,9 @@ #include "program/prog_instruction.h" #include <limits> -#define f(x) join(x) -#define join(x) x ## f -#define M_PIf ((float)M_PI) -#define M_PI_2f (M_PIf/2.0f) -#define M_PI_4f (M_PIf/4.0f) +#define M_PIf ((float) M_PI) +#define M_PI_2f ((float) M_PI_2) +#define M_PI_4f ((float) M_PI_4) using namespace ir_builder; diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h index 6c7c60a27..ef4a12d60 100644 --- a/mesalib/src/glsl/ir.h +++ b/mesalib/src/glsl/ir.h @@ -2348,6 +2348,9 @@ extern "C" { extern void _mesa_print_ir(FILE *f, struct exec_list *instructions, struct _mesa_glsl_parse_state *state); +extern void +fprint_ir(FILE *f, const void *instruction); + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp index 6f370b971..0a7695ae1 100644 --- a/mesalib/src/glsl/ir_print_visitor.cpp +++ b/mesalib/src/glsl/ir_print_visitor.cpp @@ -76,6 +76,13 @@ _mesa_print_ir(FILE *f, exec_list *instructions, fprintf(f, "\n)"); } +void +fprint_ir(FILE *f, const void *instruction) +{ + const ir_instruction *ir = (const ir_instruction *)instruction; + ir->fprint(f); +} + } /* extern "C" */ ir_print_visitor::ir_print_visitor(FILE *f) diff --git a/mesalib/src/glsl/link_uniforms.cpp b/mesalib/src/glsl/link_uniforms.cpp index 2ea221944..95a0c1ac6 100644 --- a/mesalib/src/glsl/link_uniforms.cpp +++ b/mesalib/src/glsl/link_uniforms.cpp @@ -308,8 +308,7 @@ private: */ const unsigned values = values_for_type(type); if (type->contains_sampler()) { - this->num_shader_samplers += - type->is_array() ? type->array_size() : 1; + this->num_shader_samplers += values; } else if (type->contains_image()) { this->num_shader_images += values; diff --git a/mesalib/src/glsl/ralloc.h b/mesalib/src/glsl/ralloc.h index 4581a7a4e..1fe53573f 100644 --- a/mesalib/src/glsl/ralloc.h +++ b/mesalib/src/glsl/ralloc.h @@ -38,10 +38,9 @@ * Tridgell's talloc, but ralloc is an independent implementation * released under the MIT license and tuned for Mesa. * - * The talloc implementation is available under the GNU Lesser - * General Public License (GNU LGPL), version 3 or later. It is - * more sophisticated than ralloc in that it includes reference - * counting and debugging features. See: http://talloc.samba.org/ + * talloc is more sophisticated than ralloc in that it includes reference + * counting and useful debugging features. However, it is released under + * a non-permissive open source license. */ #ifndef RALLOC_H diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index b4c30564f..3ef3f7971 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -204,6 +204,31 @@ _mesa_meta_link_program_with_debug(struct gl_context *ctx, GLuint program) return 0; } +void +_mesa_meta_compile_and_link_program(struct gl_context *ctx, + const char *vs_source, + const char *fs_source, + const char *name, + GLuint *program) +{ + GLuint vs = _mesa_meta_compile_shader_with_debug(ctx, GL_VERTEX_SHADER, + vs_source); + GLuint fs = _mesa_meta_compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, + fs_source); + + *program = _mesa_CreateProgram(); + _mesa_AttachShader(*program, fs); + _mesa_DeleteShader(fs); + _mesa_AttachShader(*program, vs); + _mesa_DeleteShader(vs); + _mesa_BindAttribLocation(*program, 0, "position"); + _mesa_BindAttribLocation(*program, 1, "texcoords"); + _mesa_meta_link_program_with_debug(ctx, *program); + _mesa_ObjectLabel(GL_PROGRAM, *program, -1, name); + + _mesa_UseProgram(*program); +} + /** * Generate a generic shader to blit from a texture to a framebuffer * @@ -219,10 +244,8 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx, { const char *vs_source; char *fs_source; - GLuint vs, fs; void *const mem_ctx = ralloc_context(NULL); struct blit_shader *shader = choose_blit_shader(target, table); - char *name; assert(shader != NULL); @@ -282,22 +305,12 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx, shader->texcoords); } - vs = _mesa_meta_compile_shader_with_debug(ctx, GL_VERTEX_SHADER, vs_source); - fs = _mesa_meta_compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, fs_source); - shader->shader_prog = _mesa_CreateProgram(); - _mesa_AttachShader(shader->shader_prog, fs); - _mesa_DeleteShader(fs); - _mesa_AttachShader(shader->shader_prog, vs); - _mesa_DeleteShader(vs); - _mesa_BindAttribLocation(shader->shader_prog, 0, "position"); - _mesa_BindAttribLocation(shader->shader_prog, 1, "texcoords"); - _mesa_meta_link_program_with_debug(ctx, shader->shader_prog); - name = ralloc_asprintf(mem_ctx, "%s blit", shader->type); - _mesa_ObjectLabel(GL_PROGRAM, shader->shader_prog, -1, name); + _mesa_meta_compile_and_link_program(ctx, vs_source, fs_source, + ralloc_asprintf(mem_ctx, "%s blit", + shader->type), + &shader->shader_prog); ralloc_free(mem_ctx); - - _mesa_UseProgram(shader->shader_prog); } /** diff --git a/mesalib/src/mesa/drivers/common/meta.h b/mesalib/src/mesa/drivers/common/meta.h index 32b71fae7..2186a39f8 100644 --- a/mesalib/src/mesa/drivers/common/meta.h +++ b/mesalib/src/mesa/drivers/common/meta.h @@ -267,6 +267,13 @@ struct blit_state bool no_ctsi_fallback; }; +struct fb_tex_blit_state +{ + GLint baseLevelSave, maxLevelSave; + GLuint sampler, samplerSave; + GLuint tempTex; +}; + /** * State for glClear() @@ -396,6 +403,26 @@ extern GLboolean _mesa_meta_in_progress(struct gl_context *ctx); extern void +_mesa_meta_fb_tex_blit_begin(const struct gl_context *ctx, + struct fb_tex_blit_state *blit); + +extern void +_mesa_meta_fb_tex_blit_end(const struct gl_context *ctx, GLenum target, + struct fb_tex_blit_state *blit); + +extern GLboolean +_mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx, + struct gl_renderbuffer *rb, + GLuint *tex, + struct gl_texture_object **texObj, + GLenum *target); + +GLuint +_mesa_meta_setup_sampler(struct gl_context *ctx, + const struct gl_texture_object *texObj, + GLenum target, GLenum filter, GLuint srcLevel); + +extern void _mesa_meta_BlitFramebuffer(struct gl_context *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, @@ -455,6 +482,13 @@ _mesa_meta_compile_shader_with_debug(struct gl_context *ctx, GLenum target, GLuint _mesa_meta_link_program_with_debug(struct gl_context *ctx, GLuint program); +void +_mesa_meta_compile_and_link_program(struct gl_context *ctx, + const char *vs_source, + const char *fs_source, + const char *name, + GLuint *program); + GLboolean _mesa_meta_alloc_texture(struct temp_texture *tex, GLsizei width, GLsizei height, GLenum intFormat); diff --git a/mesalib/src/mesa/drivers/common/meta_blit.c b/mesalib/src/mesa/drivers/common/meta_blit.c index c3dc14614..e5a0a9ad0 100644 --- a/mesalib/src/mesa/drivers/common/meta_blit.c +++ b/mesalib/src/mesa/drivers/common/meta_blit.c @@ -62,7 +62,6 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, { const char *vs_source; char *fs_source; - GLuint vs, fs; void *mem_ctx; enum blit_msaa_shader shader_index; bool dst_is_msaa = false; @@ -314,21 +313,10 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, sample_resolve); } - vs = _mesa_meta_compile_shader_with_debug(ctx, GL_VERTEX_SHADER, vs_source); - fs = _mesa_meta_compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, fs_source); - - blit->msaa_shaders[shader_index] = _mesa_CreateProgram(); - _mesa_AttachShader(blit->msaa_shaders[shader_index], fs); - _mesa_DeleteShader(fs); - _mesa_AttachShader(blit->msaa_shaders[shader_index], vs); - _mesa_DeleteShader(vs); - _mesa_BindAttribLocation(blit->msaa_shaders[shader_index], 0, "position"); - _mesa_BindAttribLocation(blit->msaa_shaders[shader_index], 1, "texcoords"); - _mesa_meta_link_program_with_debug(ctx, blit->msaa_shaders[shader_index]); - _mesa_ObjectLabel(GL_PROGRAM, blit->msaa_shaders[shader_index], -1, name); - ralloc_free(mem_ctx); + _mesa_meta_compile_and_link_program(ctx, vs_source, fs_source, name, + &blit->msaa_shaders[shader_index]); - _mesa_UseProgram(blit->msaa_shaders[shader_index]); + ralloc_free(mem_ctx); } static void @@ -368,19 +356,14 @@ blitframebuffer_texture(struct gl_context *ctx, const struct gl_renderbuffer_attachment *readAtt = &readFb->Attachment[att_index]; struct blit_state *blit = &ctx->Meta->Blit; + struct fb_tex_blit_state fb_tex_blit; const GLint dstX = MIN2(dstX0, dstX1); const GLint dstY = MIN2(dstY0, dstY1); const GLint dstW = abs(dstX1 - dstX0); const GLint dstH = abs(dstY1 - dstY0); struct gl_texture_object *texObj; GLuint srcLevel; - GLint baseLevelSave; - GLint maxLevelSave; GLenum target; - GLuint sampler, samplerSave = - ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler ? - ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler->Name : 0; - GLuint tempTex = 0; struct gl_renderbuffer *rb = readAtt->Renderbuffer; struct temp_texture *meta_temp_texture; @@ -392,6 +375,8 @@ blitframebuffer_texture(struct gl_context *ctx, filter = GL_LINEAR; } + _mesa_meta_fb_tex_blit_begin(ctx, &fb_tex_blit); + if (readAtt->Texture && (readAtt->Texture->Target == GL_TEXTURE_2D || readAtt->Texture->Target == GL_TEXTURE_RECTANGLE || @@ -404,38 +389,16 @@ blitframebuffer_texture(struct gl_context *ctx, texObj = readAtt->Texture; target = texObj->Target; } else if (!readAtt->Texture && ctx->Driver.BindRenderbufferTexImage) { - /* Otherwise, we need the driver to be able to bind a renderbuffer as - * a texture image. - */ - struct gl_texture_image *texImage; - - if (rb->NumSamples > 1) - target = GL_TEXTURE_2D_MULTISAMPLE; - else - target = GL_TEXTURE_2D; - - _mesa_GenTextures(1, &tempTex); - _mesa_BindTexture(target, tempTex); - srcLevel = 0; - texObj = _mesa_lookup_texture(ctx, tempTex); - texImage = _mesa_get_tex_image(ctx, texObj, target, srcLevel); - - if (!ctx->Driver.BindRenderbufferTexImage(ctx, rb, texImage)) { - _mesa_DeleteTextures(1, &tempTex); + if (!_mesa_meta_bind_rb_as_tex_image(ctx, rb, &fb_tex_blit.tempTex, + &texObj, &target)) return false; - } else { - if (ctx->Driver.FinishRenderTexture && - !rb->NeedsFinishRenderTexture) { - rb->NeedsFinishRenderTexture = true; - ctx->Driver.FinishRenderTexture(ctx, rb); - } - if (_mesa_is_winsys_fbo(readFb)) { - GLint temp = srcY0; - srcY0 = rb->Height - srcY1; - srcY1 = rb->Height - temp; - flipY = -flipY; - } + srcLevel = 0; + if (_mesa_is_winsys_fbo(readFb)) { + GLint temp = srcY0; + srcY0 = rb->Height - srcY1; + srcY1 = rb->Height - temp; + flipY = -flipY; } } else { GLenum tex_base_format; @@ -476,8 +439,8 @@ blitframebuffer_texture(struct gl_context *ctx, srcY1 = srcH; } - baseLevelSave = texObj->BaseLevel; - maxLevelSave = texObj->MaxLevel; + fb_tex_blit.baseLevelSave = texObj->BaseLevel; + fb_tex_blit.maxLevelSave = texObj->MaxLevel; if (glsl_version) { setup_glsl_blit_framebuffer(ctx, blit, rb, target); @@ -488,25 +451,14 @@ blitframebuffer_texture(struct gl_context *ctx, 2); } - _mesa_GenSamplers(1, &sampler); - _mesa_BindSampler(ctx->Texture.CurrentUnit, sampler); - /* printf("Blit from texture!\n"); printf(" srcAtt %p dstAtt %p\n", readAtt, drawAtt); printf(" srcTex %p dstText %p\n", texObj, drawAtt->Texture); */ - /* Prepare src texture state */ - _mesa_BindTexture(target, texObj->Name); - _mesa_SamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, filter); - _mesa_SamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, filter); - if (target != GL_TEXTURE_RECTANGLE_ARB) { - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); - } - _mesa_SamplerParameteri(sampler, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - _mesa_SamplerParameteri(sampler, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + fb_tex_blit.sampler = _mesa_meta_setup_sampler(ctx, texObj, target, filter, + srcLevel); /* Always do our blits with no net sRGB decode or encode. * @@ -527,11 +479,12 @@ blitframebuffer_texture(struct gl_context *ctx, if (ctx->Extensions.EXT_texture_sRGB_decode) { if (_mesa_get_format_color_encoding(rb->Format) == GL_SRGB && ctx->DrawBuffer->Visual.sRGBCapable) { - _mesa_SamplerParameteri(sampler, GL_TEXTURE_SRGB_DECODE_EXT, - GL_DECODE_EXT); + _mesa_SamplerParameteri(fb_tex_blit.sampler, + GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT); _mesa_set_framebuffer_srgb(ctx, GL_TRUE); } else { - _mesa_SamplerParameteri(sampler, GL_TEXTURE_SRGB_DECODE_EXT, + _mesa_SamplerParameteri(fb_tex_blit.sampler, + GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT); /* set_framebuffer_srgb was set by _mesa_meta_begin(). */ } @@ -598,23 +551,95 @@ blitframebuffer_texture(struct gl_context *ctx, _mesa_DepthFunc(GL_ALWAYS); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); + _mesa_meta_fb_tex_blit_end(ctx, target, &fb_tex_blit); + + return true; +} +void +_mesa_meta_fb_tex_blit_begin(const struct gl_context *ctx, + struct fb_tex_blit_state *blit) +{ + blit->samplerSave = + ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler ? + ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler->Name : 0; + blit->tempTex = 0; +} + +void +_mesa_meta_fb_tex_blit_end(const struct gl_context *ctx, GLenum target, + struct fb_tex_blit_state *blit) +{ /* Restore texture object state, the texture binding will * be restored by _mesa_meta_end(). */ if (target != GL_TEXTURE_RECTANGLE_ARB) { - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, blit->baseLevelSave); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, blit->maxLevelSave); } - _mesa_BindSampler(ctx->Texture.CurrentUnit, samplerSave); - _mesa_DeleteSamplers(1, &sampler); - if (tempTex) - _mesa_DeleteTextures(1, &tempTex); + _mesa_BindSampler(ctx->Texture.CurrentUnit, blit->samplerSave); + _mesa_DeleteSamplers(1, &blit->sampler); + if (blit->tempTex) + _mesa_DeleteTextures(1, &blit->tempTex); +} + +GLboolean +_mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx, + struct gl_renderbuffer *rb, + GLuint *tex, + struct gl_texture_object **texObj, + GLenum *target) +{ + struct gl_texture_image *texImage; + + if (rb->NumSamples > 1) + *target = GL_TEXTURE_2D_MULTISAMPLE; + else + *target = GL_TEXTURE_2D; + + _mesa_GenTextures(1, tex); + _mesa_BindTexture(*target, *tex); + *texObj = _mesa_lookup_texture(ctx, *tex); + texImage = _mesa_get_tex_image(ctx, *texObj, *target, 0); + + if (!ctx->Driver.BindRenderbufferTexImage(ctx, rb, texImage)) { + _mesa_DeleteTextures(1, tex); + return false; + } + + if (ctx->Driver.FinishRenderTexture && !rb->NeedsFinishRenderTexture) { + rb->NeedsFinishRenderTexture = true; + ctx->Driver.FinishRenderTexture(ctx, rb); + } return true; } +GLuint +_mesa_meta_setup_sampler(struct gl_context *ctx, + const struct gl_texture_object *texObj, + GLenum target, GLenum filter, GLuint srcLevel) +{ + GLuint sampler; + + _mesa_GenSamplers(1, &sampler); + _mesa_BindSampler(ctx->Texture.CurrentUnit, sampler); + + /* Prepare src texture state */ + _mesa_BindTexture(target, texObj->Name); + _mesa_SamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, filter); + _mesa_SamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, filter); + if (target != GL_TEXTURE_RECTANGLE_ARB) { + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); + } + _mesa_SamplerParameteri(sampler, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + _mesa_SamplerParameteri(sampler, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + + return sampler; +} + /** * Meta implementation of ctx->Driver.BlitFramebuffer() in terms * of texture mapping and polygon rendering. @@ -707,7 +732,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, _mesa_meta_end(ctx); fallback: - if (mask) { + if (mask && !ctx->Meta->Blit.no_ctsi_fallback) { _swrast_BlitFramebuffer(ctx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } diff --git a/mesalib/src/mesa/main/arbprogram.c b/mesalib/src/mesa/main/arbprogram.c index 247b49253..fe8cd6bbc 100644 --- a/mesalib/src/mesa/main/arbprogram.c +++ b/mesalib/src/mesa/main/arbprogram.c @@ -38,6 +38,7 @@ #include "main/arbprogram.h" #include "program/arbprogparse.h" #include "program/program.h" +#include "program/prog_print.h" /** @@ -308,6 +309,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid *string) { struct gl_program *base; + bool failed; GET_CURRENT_CONTEXT(ctx); FLUSH_VERTICES(ctx, _NEW_PROGRAM); @@ -341,13 +343,36 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, return; } - if (ctx->Program.ErrorPos == -1) { + failed = ctx->Program.ErrorPos != -1; + + if (!failed) { /* finally, give the program to the driver for translation/checking */ if (!ctx->Driver.ProgramStringNotify(ctx, target, base)) { + failed = true; _mesa_error(ctx, GL_INVALID_OPERATION, "glProgramStringARB(rejected by driver"); } } + + if (ctx->_Shader->Flags & GLSL_DUMP) { + const char *shader_type = + target == GL_FRAGMENT_PROGRAM_ARB ? "fragment" : "vertex"; + + fprintf(stderr, "ARB_%s_program source for program %d:\n", + shader_type, base->Id); + fprintf(stderr, "%s\n", (const char *) string); + + if (failed) { + fprintf(stderr, "ARB_%s_program %d failed to compile.\n", + shader_type, base->Id); + } else { + fprintf(stderr, "Mesa IR for ARB_%s_program %d:\n", + shader_type, base->Id); + _mesa_print_program(base); + fprintf(stderr, "\n"); + } + fflush(stderr); + } } diff --git a/mesalib/src/mesa/state_tracker/st_cb_blit.c b/mesalib/src/mesa/state_tracker/st_cb_blit.c index a5a0d2d8d..9c33f4eb9 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_blit.c +++ b/mesalib/src/mesa/state_tracker/st_cb_blit.c @@ -187,6 +187,7 @@ st_BlitFramebuffer(struct gl_context *ctx, } blit.filter = pFilter; + blit.render_condition_enable = TRUE; if (mask & GL_COLOR_BUFFER_BIT) { struct gl_renderbuffer_attachment *srcAtt = diff --git a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c index b92147847..3f7bbd973 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c +++ b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c @@ -165,6 +165,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, goto fallback; } + memset(&blit, 0, sizeof(blit)); blit.src.resource = src; blit.src.level = strb->surface->u.tex.level; blit.src.format = src_format; diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index 97bba8b7d..aa6b05f0b 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -765,6 +765,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, _mesa_unmap_teximage_pbo(ctx, unpack); /* Blit. */ + memset(&blit, 0, sizeof(blit)); blit.src.resource = src; blit.src.level = 0; blit.src.format = src_format; @@ -998,6 +999,7 @@ st_GetTexImage(struct gl_context * ctx, height = 1; } + memset(&blit, 0, sizeof(blit)); blit.src.resource = src; blit.src.level = texImage->Level; blit.src.format = src_format; diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index bdee1f4eb..739e1089e 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -325,6 +325,7 @@ public: struct gl_context *ctx; struct gl_program *prog; struct gl_shader_program *shader_program; + struct gl_shader *shader; struct gl_shader_compiler_options *options; int next_temp; @@ -459,8 +460,7 @@ public: int get_last_temp_write(int index); void copy_propagate(void); - void eliminate_dead_code(void); - int eliminate_dead_code_advanced(void); + int eliminate_dead_code(void); void merge_registers(void); void renumber_registers(void); @@ -1671,30 +1671,82 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) case ir_unop_any: { assert(ir->operands[0]->type->is_vector()); - /* After the dot-product, the value will be an integer on the - * range [0,4]. Zero stays zero, and positive values become 1.0. - */ - glsl_to_tgsi_instruction *const dp = - emit_dp(ir, result_dst, op[0], op[0], - ir->operands[0]->type->vector_elements); - if (this->prog->Target == GL_FRAGMENT_PROGRAM_ARB && - result_dst.type == GLSL_TYPE_FLOAT) { - /* The clamping to [0,1] can be done for free in the fragment - * shader with a saturate. - */ - dp->saturate = true; - } else if (result_dst.type == GLSL_TYPE_FLOAT) { - /* Negating the result of the dot-product gives values on the range - * [-4, 0]. Zero stays zero, and negative values become 1.0. This - * is achieved using SLT. - */ - st_src_reg slt_src = result_src; - slt_src.negate = ~slt_src.negate; - emit(ir, TGSI_OPCODE_SLT, result_dst, slt_src, st_src_reg_for_float(0.0)); - } - else { - /* Use SNE 0 if integers are being used as boolean values. */ - emit(ir, TGSI_OPCODE_SNE, result_dst, result_src, st_src_reg_for_int(0)); + if (native_integers) { + int dst_swizzle = 0, op0_swizzle, i; + st_src_reg accum = op[0]; + + op0_swizzle = op[0].swizzle; + accum.swizzle = MAKE_SWIZZLE4(GET_SWZ(op0_swizzle, 0), + GET_SWZ(op0_swizzle, 0), + GET_SWZ(op0_swizzle, 0), + GET_SWZ(op0_swizzle, 0)); + for (i = 0; i < 4; i++) { + if (result_dst.writemask & (1 << i)) { + dst_swizzle = MAKE_SWIZZLE4(i, i, i, i); + break; + } + } + assert(i != 4); + assert(ir->operands[0]->type->is_boolean()); + + /* OR all the components together, since they should be either 0 or ~0 + */ + switch (ir->operands[0]->type->vector_elements) { + case 4: + op[0].swizzle = MAKE_SWIZZLE4(GET_SWZ(op0_swizzle, 3), + GET_SWZ(op0_swizzle, 3), + GET_SWZ(op0_swizzle, 3), + GET_SWZ(op0_swizzle, 3)); + emit(ir, TGSI_OPCODE_OR, result_dst, accum, op[0]); + accum = st_src_reg(result_dst); + accum.swizzle = dst_swizzle; + /* fallthrough */ + case 3: + op[0].swizzle = MAKE_SWIZZLE4(GET_SWZ(op0_swizzle, 2), + GET_SWZ(op0_swizzle, 2), + GET_SWZ(op0_swizzle, 2), + GET_SWZ(op0_swizzle, 2)); + emit(ir, TGSI_OPCODE_OR, result_dst, accum, op[0]); + accum = st_src_reg(result_dst); + accum.swizzle = dst_swizzle; + /* fallthrough */ + case 2: + op[0].swizzle = MAKE_SWIZZLE4(GET_SWZ(op0_swizzle, 1), + GET_SWZ(op0_swizzle, 1), + GET_SWZ(op0_swizzle, 1), + GET_SWZ(op0_swizzle, 1)); + emit(ir, TGSI_OPCODE_OR, result_dst, accum, op[0]); + break; + default: + assert(!"Unexpected vector size"); + break; + } + } else { + /* After the dot-product, the value will be an integer on the + * range [0,4]. Zero stays zero, and positive values become 1.0. + */ + glsl_to_tgsi_instruction *const dp = + emit_dp(ir, result_dst, op[0], op[0], + ir->operands[0]->type->vector_elements); + if (this->prog->Target == GL_FRAGMENT_PROGRAM_ARB && + result_dst.type == GLSL_TYPE_FLOAT) { + /* The clamping to [0,1] can be done for free in the fragment + * shader with a saturate. + */ + dp->saturate = true; + } else if (result_dst.type == GLSL_TYPE_FLOAT) { + /* Negating the result of the dot-product gives values on the range + * [-4, 0]. Zero stays zero, and negative values become 1.0. This + * is achieved using SLT. + */ + st_src_reg slt_src = result_src; + slt_src.negate = ~slt_src.negate; + emit(ir, TGSI_OPCODE_SLT, result_dst, slt_src, st_src_reg_for_float(0.0)); + } + else { + /* Use SNE 0 if integers are being used as boolean values. */ + emit(ir, TGSI_OPCODE_SNE, result_dst, result_src, st_src_reg_for_int(0)); + } } break; } @@ -3103,6 +3155,7 @@ glsl_to_tgsi_visitor::glsl_to_tgsi_visitor() ctx = NULL; prog = NULL; shader_program = NULL; + shader = NULL; options = NULL; } @@ -3672,7 +3725,8 @@ glsl_to_tgsi_visitor::copy_propagate(void) } /* - * Tracks available PROGRAM_TEMPORARY registers for dead code elimination. + * On a basic block basis, tracks available PROGRAM_TEMPORARY registers for dead + * code elimination. * * The glsl_to_tgsi_visitor lazily produces code assuming that this pass * will occur. As an example, a TXP production after copy propagation but @@ -3685,48 +3739,9 @@ glsl_to_tgsi_visitor::copy_propagate(void) * and after this pass: * * 0: TXP TEMP[2], INPUT[4].xyyw, texture[0], 2D; - * - * FIXME: assumes that all functions are inlined (no support for BGNSUB/ENDSUB) - * FIXME: doesn't eliminate all dead code inside of loops; it steps around them - */ -void -glsl_to_tgsi_visitor::eliminate_dead_code(void) -{ - int i; - - for (i=0; i < this->next_temp; i++) { - int last_read = get_last_temp_read(i); - int j = 0; - - foreach_list_safe(node, &this->instructions) { - glsl_to_tgsi_instruction *inst = (glsl_to_tgsi_instruction *) node; - - if (inst->dst.file == PROGRAM_TEMPORARY && inst->dst.index == i && - j > last_read) - { - inst->remove(); - delete inst; - } - - j++; - } - } -} - -/* - * On a basic block basis, tracks available PROGRAM_TEMPORARY registers for dead - * code elimination. This is less primitive than eliminate_dead_code(), as it - * is per-channel and can detect consecutive writes without a read between them - * as dead code. However, there is some dead code that can be eliminated by - * eliminate_dead_code() but not this function - for example, this function - * cannot eliminate an instruction writing to a register that is never read and - * is the only instruction writing to that register. - * - * The glsl_to_tgsi_visitor lazily produces code assuming that this pass - * will occur. */ int -glsl_to_tgsi_visitor::eliminate_dead_code_advanced(void) +glsl_to_tgsi_visitor::eliminate_dead_code(void) { glsl_to_tgsi_instruction **writes = rzalloc_array(mem_ctx, glsl_to_tgsi_instruction *, @@ -3974,6 +3989,7 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp, v->ctx = original->ctx; v->prog = prog; v->shader_program = NULL; + v->shader = NULL; v->glsl_version = original->glsl_version; v->native_integers = original->native_integers; v->options = original->options; @@ -4104,6 +4120,7 @@ get_bitmap_visitor(struct st_fragment_program *fp, v->ctx = original->ctx; v->prog = prog; v->shader_program = NULL; + v->shader = NULL; v->glsl_version = original->glsl_version; v->native_integers = original->native_integers; v->options = original->options; @@ -5083,11 +5100,11 @@ st_translate_program( } } - if (program->shader_program) { - unsigned num_ubos = program->shader_program->NumUniformBlocks; + if (program->shader) { + unsigned num_ubos = program->shader->NumUniformBlocks; for (i = 0; i < num_ubos; i++) { - ureg_DECL_constant2D(t->ureg, 0, program->shader_program->UniformBlocks[i].UniformBufferSize / 4, i + 1); + ureg_DECL_constant2D(t->ureg, 0, program->shader->UniformBlocks[i].UniformBufferSize / 4, i + 1); } } @@ -5208,6 +5225,7 @@ get_mesa_program(struct gl_context *ctx, v->ctx = ctx; v->prog = prog; v->shader_program = shader_program; + v->shader = shader; v->options = options; v->glsl_version = ctx->Const.GLSLVersion; v->native_integers = ctx->Const.NativeIntegers; @@ -5270,9 +5288,8 @@ get_mesa_program(struct gl_context *ctx, /* Perform optimizations on the instructions in the glsl_to_tgsi_visitor. */ v->simplify_cmp(); v->copy_propagate(); - while (v->eliminate_dead_code_advanced()); + while (v->eliminate_dead_code()); - v->eliminate_dead_code(); v->merge_registers(); v->renumber_registers(); diff --git a/tools/plink/winsecur.c b/tools/plink/winsecur.c index d04e88a92..df93a74c5 100644 --- a/tools/plink/winsecur.c +++ b/tools/plink/winsecur.c @@ -187,6 +187,12 @@ int make_private_security_descriptor(DWORD permissions, goto cleanup; } + if (!SetSecurityDescriptorOwner(*psd, usersid, FALSE)) { + *error = dupprintf("unable to set owner in security descriptor: %s", + win_strerror(GetLastError())); + goto cleanup; + } + if (!SetSecurityDescriptorDacl(*psd, TRUE, *acl, FALSE)) { *error = dupprintf("unable to set DACL in security descriptor: %s", win_strerror(GetLastError())); diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 33a280d3f..5b50fd58e 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1471,7 +1471,7 @@ static void DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev) { - InternalEvent motion; + DeviceEvent motion; if (ti->num_listeners) { ClientPtr client; @@ -1483,11 +1483,11 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, ti->listeners[0].type != LISTENER_POINTER_GRAB) return; - motion = *ev; - motion.any.type = ET_TouchUpdate; - motion.device_event.detail.button = 0; + motion = ev->device_event; + motion.type = ET_TouchUpdate; + motion.detail.button = 0; - if (!RetrieveTouchDeliveryData(dev, ti, &motion, + if (!RetrieveTouchDeliveryData(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], &client, &win, &grab, &mask)) return; @@ -1502,18 +1502,18 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, } } - DeliverTouchEmulatedEvent(dev, ti, &motion, &ti->listeners[0], client, + DeliverTouchEmulatedEvent(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], client, win, grab, mask); } else { InternalEvent button; int converted; - converted = TouchConvertToPointerEvent(ev, &motion, &button); + converted = TouchConvertToPointerEvent(ev, (InternalEvent*)&motion, &button); BUG_WARN(converted == 0); if (converted) - ProcessOtherEvent(&motion, dev); + ProcessOtherEvent((InternalEvent*)&motion, dev); } } diff --git a/xorg-server/config/config.c b/xorg-server/config/config.c index 97b621b89..52fc80836 100644 --- a/xorg-server/config/config.c +++ b/xorg-server/config/config.c @@ -250,8 +250,6 @@ config_odev_free_attributes(struct OdevAttributes *attribs) free(iter); } - if (fd != -1) { - systemd_logind_release_fd(major, minor); - close(fd); - } + if (fd != -1) + systemd_logind_release_fd(major, minor, fd); } diff --git a/xorg-server/glamor/glamor_priv.h b/xorg-server/glamor/glamor_priv.h index 96635be39..c56c55973 100644 --- a/xorg-server/glamor/glamor_priv.h +++ b/xorg-server/glamor/glamor_priv.h @@ -30,9 +30,6 @@ #include "dix-config.h" #include <xorg-server.h> -#ifndef DEBUG -#define NDEBUG -#endif #include "glamor.h" #include <epoxy/gl.h> diff --git a/xorg-server/glamor/glamor_segment.c b/xorg-server/glamor/glamor_segment.c index 84b27acce..53f7da0cb 100644 --- a/xorg-server/glamor/glamor_segment.c +++ b/xorg-server/glamor/glamor_segment.c @@ -26,14 +26,19 @@ Bool glamor_poly_segment_nf(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *seg) { - return FALSE; + if (glamor_ddx_fallback_check_pixmap(drawable) && + glamor_ddx_fallback_check_gc(gc)) { + return FALSE; + } + + miPolySegment(drawable, gc, nseg, seg); + + return TRUE; } void glamor_poly_segment(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *seg) { - if (glamor_poly_segment_nf(drawable, gc, nseg, seg)) - return; miPolySegment(drawable, gc, nseg, seg); } diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index 507c57dbc..b3b3f8cc5 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -81,7 +81,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) if (drv->platformProbe != NULL) { foundScreen = xf86platformProbeDev(drv); } - if (ServerIsNotSeat0()) + if (ServerIsNotSeat0() && foundScreen) return foundScreen; #endif @@ -201,7 +201,7 @@ xf86BusProbe(void) { #ifdef XSERVER_PLATFORM_BUS xf86platformProbe(); - if (ServerIsNotSeat0()) + if (ServerIsNotSeat0() && xf86_num_platform_devices > 0) return; #endif #ifdef XSERVER_LIBPCIACCESS diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 542d5abf6..2adef44c3 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -232,6 +232,18 @@ xf86ValidateFontPath(char *path) return tmp_path; } +#define FIND_SUITABLE(pointertype, listhead, ptr) \ + do { \ + pointertype _l, _p; \ + \ + for (_l = (listhead), _p = NULL; !_p && _l; _l = (pointertype)_l->list.next) { \ + if (!_l->match_seat || (SeatId && xf86nameCompare(_l->match_seat, SeatId) == 0)) \ + _p = _l; \ + } \ + \ + (ptr) = _p; \ + } while(0) + /* * use the datastructure that the parser provides and pick out the parts * that we need at this point @@ -1580,8 +1592,11 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, * config file, or - if it is NULL - configScreen autogenerates one for * us */ if (!count) { + XF86ConfScreenPtr screen; + + FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen); slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); - if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst, + if (!configScreen(slp[0].screen, screen, 0, X_CONFIG)) { free(slp[0].screen); free(slp); @@ -1821,7 +1836,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, * set it to NULL so that the section can be autoconfigured later */ screenp->device = xnfcalloc(1, sizeof(GDevRec)); if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) { - conf_screen->scrn_device = xf86configptr->conf_device_lst; + FIND_SUITABLE (XF86ConfDevicePtr, xf86configptr->conf_device_lst, conf_screen->scrn_device); xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n" "\tUsing the first device section listed.\n", screenp->id); } @@ -2354,6 +2369,7 @@ xf86HandleConfigFile(Bool autoconfig) const char *scanptr; Bool singlecard = 0; Bool implicit_layout = FALSE; + XF86ConfLayoutPtr layout; if (!autoconfig) { char *filename, *dirname, *sysdirname; @@ -2429,14 +2445,17 @@ xf86HandleConfigFile(Bool autoconfig) */ /* First check if a layout section is present, and if it is valid. */ + FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst, layout); + if (layout == NULL || xf86ScreenName != NULL) { + XF86ConfScreenPtr screen; - if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) { if (xf86ScreenName == NULL) { xf86Msg(X_DEFAULT, "No Layout section. Using the first Screen section.\n"); } + FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen); if (!configImpliedLayout(&xf86ConfigLayout, - xf86configptr->conf_screen_lst, + screen, xf86configptr)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; @@ -2451,16 +2470,13 @@ xf86HandleConfigFile(Bool autoconfig) if (optlist && xf86FindOption(optlist, "defaultserverlayout")) dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL); - if (!configLayout - (&xf86ConfigLayout, xf86configptr->conf_layout_lst, - dfltlayout)) { + if (!configLayout(&xf86ConfigLayout, layout, dfltlayout)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } } else { - if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst, - NULL)) { + if (!configLayout(&xf86ConfigLayout, layout, NULL)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index bc6b73f91..4e8060b0f 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -770,10 +770,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) FreeInputAttributes(pInp->attrs); - if (pInp->flags & XI86_SERVER_FD) { - systemd_logind_release_fd(pInp->major, pInp->minor); - close(pInp->fd); - } + if (pInp->flags & XI86_SERVER_FD) + systemd_logind_release_fd(pInp->major, pInp->minor, pInp->fd); /* Remove the entry from the list. */ if (pInp == xf86InputDevs) @@ -873,8 +871,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) sizeof(pInfo) * (new_input_devices_count + 1)); new_input_devices[new_input_devices_count] = pInfo; new_input_devices_count++; - systemd_logind_release_fd(pInfo->major, pInfo->minor); - close(fd); + systemd_logind_release_fd(pInfo->major, pInfo->minor, fd); return BadMatch; } pInfo->fd = fd; diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c index 4e80f9ee3..dd118a285 100644 --- a/xorg-server/hw/xfree86/common/xf86platformBus.c +++ b/xorg-server/hw/xfree86/common/xf86platformBus.c @@ -340,8 +340,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, fd = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_FD, -1); major = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_MAJOR, 0); minor = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_MINOR, 0); - systemd_logind_release_fd(major, minor); - close(fd); + systemd_logind_release_fd(major, minor, fd); config_odev_add_int_attribute(dev->attribs, ODEV_ATTRIB_FD, -1); dev->flags &= ~XF86_PDEV_SERVER_FD; } diff --git a/xorg-server/hw/xfree86/man/xorg.conf.man b/xorg-server/hw/xfree86/man/xorg.conf.man index 6d2652e84..cadd87b7b 100644 --- a/xorg-server/hw/xfree86/man/xorg.conf.man +++ b/xorg-server/hw/xfree86/man/xorg.conf.man @@ -1378,6 +1378,14 @@ for the regular text mode. The frequency is specified in MHz. This is rarely used. .TP 7 +.BI "MatchSeat " "seat\-id" +Only apply this +.B Device +section if X server was started with +.B -seat +.I seat\-id +option. +.TP 7 .BI "Option \*qModeDebug\*q \*q" boolean \*q Enable printing of additional debugging information about modesetting to the server log. @@ -1900,6 +1908,14 @@ The only case where there is even a choice in this value is for depth 24, where some hardware supports both a packed 24 bit framebuffer layout and a sparse 32 bit framebuffer layout. .TP 7 +.BI "MatchSeat " "seat\-id" +Only apply this +.B Screen +section if X server was started with +.B -seat +.I seat\-id +option. +.TP 7 .B Options Various .B Option @@ -2295,6 +2311,14 @@ and the first two should normally be used to indicate the core pointer and core keyboard devices respectively. .RE .TP 7 +.BI "MatchSeat " "seat\-id" +Only apply this +.B ServerLayout +section if X server was started with +.B -seat +.I seat\-id +option. +.TP 7 .B Options In addition to the following, any option permitted in the .B ServerFlags diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c b/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c index dbd7aa0aa..308275ab4 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c @@ -37,7 +37,7 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) if (paused) { LogMessage(X_ERROR, "Error systemd-logind returned paused fd for drm node\n"); - systemd_logind_release_fd(major, minor); + systemd_logind_release_fd(major, minor, -1); return FALSE; } config_odev_add_int_attribute(attribs, ODEV_ATTRIB_FD, fd); diff --git a/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c b/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c index ed670a88c..73a8d55bf 100644 --- a/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c +++ b/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c @@ -162,7 +162,7 @@ cleanup: } void -systemd_logind_release_fd(int _major, int _minor) +systemd_logind_release_fd(int _major, int _minor, int fd) { struct systemd_logind_info *info = &logind_info; InputInfoPtr pInfo; @@ -174,7 +174,7 @@ systemd_logind_release_fd(int _major, int _minor) int matches = 0; if (!info->session || major == 0) - return; + goto close; /* Only release the fd if there is only 1 InputInfo left for this major * and minor, otherwise other InputInfo's are still referencing the fd. */ @@ -218,6 +218,9 @@ cleanup: if (reply) dbus_message_unref(reply); dbus_error_free(&error); +close: + if (fd != -1) + close(fd); } int diff --git a/xorg-server/hw/xfree86/parser/Device.c b/xorg-server/hw/xfree86/parser/Device.c index 073171f22..d3ac29351 100644 --- a/xorg-server/hw/xfree86/parser/Device.c +++ b/xorg-server/hw/xfree86/parser/Device.c @@ -71,6 +71,7 @@ xf86ConfigSymTabRec DeviceTab[] = { {RAMDAC, "ramdac"}, {DACSPEED, "dacspeed"}, {CLOCKS, "clocks"}, + {MATCHSEAT, "matchseat"}, {OPTION, "option"}, {VIDEORAM, "videoram"}, {BIOSBASE, "biosbase"}, @@ -216,6 +217,11 @@ xf86parseDeviceSection(void) Error(NUMBER_MSG, "TextClockFreq"); ptr->dev_textclockfreq = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); break; + case MATCHSEAT: + if (xf86getSubToken(&(ptr->dev_comment)) != STRING) + Error(QUOTE_MSG, "MatchSeat"); + ptr->match_seat = xf86_lex_val.str; + break; case OPTION: ptr->dev_option_lst = xf86parseOption(ptr->dev_option_lst); break; diff --git a/xorg-server/hw/xfree86/parser/Layout.c b/xorg-server/hw/xfree86/parser/Layout.c index 7be746f04..994b31ae4 100644 --- a/xorg-server/hw/xfree86/parser/Layout.c +++ b/xorg-server/hw/xfree86/parser/Layout.c @@ -70,6 +70,7 @@ static xf86ConfigSymTabRec LayoutTab[] = { {ENDSECTION, "endsection"}, {SCREEN, "screen"}, {IDENTIFIER, "identifier"}, + {MATCHSEAT, "matchseat"}, {INACTIVE, "inactive"}, {INPUTDEVICE, "inputdevice"}, {OPTION, "option"}, @@ -109,6 +110,11 @@ xf86parseLayoutSection(void) ptr->lay_identifier = xf86_lex_val.str; has_ident = TRUE; break; + case MATCHSEAT: + if (xf86getSubToken(&(ptr->lay_comment)) != STRING) + Error(QUOTE_MSG, "MatchSeat"); + ptr->match_seat = xf86_lex_val.str; + break; case INACTIVE: { XF86ConfInactivePtr iptr; diff --git a/xorg-server/hw/xfree86/parser/Screen.c b/xorg-server/hw/xfree86/parser/Screen.c index fecd57c0c..0e9746ae5 100644 --- a/xorg-server/hw/xfree86/parser/Screen.c +++ b/xorg-server/hw/xfree86/parser/Screen.c @@ -198,6 +198,7 @@ xf86parseDisplaySubSection(void) static xf86ConfigSymTabRec ScreenTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, + {MATCHSEAT, "matchseat"}, {OBSDRIVER, "driver"}, {MDEVICE, "device"}, {MONITOR, "monitor"}, @@ -236,6 +237,11 @@ xf86parseScreenSection(void) Error(ONLY_ONE_MSG, "Identifier or Driver"); has_ident = TRUE; break; + case MATCHSEAT: + if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) + Error(QUOTE_MSG, "MatchSeat"); + ptr->match_seat = xf86_lex_val.str; + break; case OBSDRIVER: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Driver"); diff --git a/xorg-server/hw/xfree86/parser/xf86Parser.h b/xorg-server/hw/xfree86/parser/xf86Parser.h index 8f855ac09..c95423a1f 100644 --- a/xorg-server/hw/xfree86/parser/xf86Parser.h +++ b/xorg-server/hw/xfree86/parser/xf86Parser.h @@ -224,6 +224,7 @@ typedef struct { int dev_screen; XF86OptionPtr dev_option_lst; char *dev_comment; + char *match_seat; } XF86ConfDeviceRec, *XF86ConfDevicePtr; typedef struct { @@ -275,6 +276,7 @@ typedef struct { XF86OptionPtr scrn_option_lst; char *scrn_comment; int scrn_virtualX, scrn_virtualY; + char *match_seat; } XF86ConfScreenRec, *XF86ConfScreenPtr; typedef struct { @@ -366,6 +368,7 @@ typedef struct { XF86ConfInactivePtr lay_inactive_lst; XF86ConfInputrefPtr lay_input_lst; XF86OptionPtr lay_option_lst; + char *match_seat; char *lay_comment; } XF86ConfLayoutRec, *XF86ConfLayoutPtr; diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h index f751b7b0e..5c01ce701 100644 --- a/xorg-server/hw/xfree86/parser/xf86tokens.h +++ b/xorg-server/hw/xfree86/parser/xf86tokens.h @@ -87,6 +87,7 @@ typedef enum { VENDOR, DASH, COMMA, + MATCHSEAT, OPTION, COMMENT, diff --git a/xorg-server/include/systemd-logind.h b/xorg-server/include/systemd-logind.h index 06dd03134..a4067d097 100644 --- a/xorg-server/include/systemd-logind.h +++ b/xorg-server/include/systemd-logind.h @@ -30,14 +30,14 @@ int systemd_logind_init(void); void systemd_logind_fini(void); int systemd_logind_take_fd(int major, int minor, const char *path, Bool *paus); -void systemd_logind_release_fd(int major, int minor); +void systemd_logind_release_fd(int major, int minor, int fd); int systemd_logind_controls_session(void); void systemd_logind_vtenter(void); #else #define systemd_logind_init() #define systemd_logind_fini() #define systemd_logind_take_fd(major, minor, path, paus) -1 -#define systemd_logind_release_fd(major, minor) +#define systemd_logind_release_fd(major, minor, fd) close(fd) #define systemd_logind_controls_session() 0 #define systemd_logind_vtenter() #endif diff --git a/xorg-server/mi/miwindow.c b/xorg-server/mi/miwindow.c index c6f0e5315..3ee83d7c0 100644 --- a/xorg-server/mi/miwindow.c +++ b/xorg-server/mi/miwindow.c @@ -766,7 +766,7 @@ miSpriteTrace(SpritePtr pSprite, int x, int y) WindowPtr pWin; BoxRec box; - pWin = DeepestSpriteWin(pSprite); + pWin = DeepestSpriteWin(pSprite)->firstChild; while (pWin) { if ((pWin->mapped) && (x >= pWin->drawable.x - wBorderWidth(pWin)) && diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c index 76d24f60a..7c59293fe 100644 --- a/xorg-server/randr/rrcrtc.c +++ b/xorg-server/randr/rrcrtc.c @@ -477,7 +477,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen, xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) { rrScrPrivPtr slave_priv = rrGetScrPriv(slave); - for (c = 0; c < slave_priv->numCrtcs; c++) + for (c = 0; c < slave_priv->numCrtcs; c++) { if (slave_priv->crtcs[c] == rr_crtc) { newbox.x1 = x; newbox.x2 = x + w; @@ -492,8 +492,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen, newbox.y1 = slave_priv->crtcs[c]->y; newbox.y2 = slave_priv->crtcs[c]->y + slave_priv->crtcs[c]->mode->mode.height; } - RegionInit(&new_crtc_region, &newbox, 1); - RegionUnion(&total_region, &total_region, &new_crtc_region); + RegionInit(&new_crtc_region, &newbox, 1); + RegionUnion(&total_region, &total_region, &new_crtc_region); + } } newsize = RegionExtents(&total_region); diff --git a/xorg-server/xkeyboard-config/rules/base.extras.xml.in b/xorg-server/xkeyboard-config/rules/base.extras.xml.in index dd7339390..9107c03f2 100644 --- a/xorg-server/xkeyboard-config/rules/base.extras.xml.in +++ b/xorg-server/xkeyboard-config/rules/base.extras.xml.in @@ -120,6 +120,12 @@ <_description>German (Sun Type 6/7)</_description> </configItem> </variant> + <variant> + <configItem> + <name>adnw</name> + <_description>German (Aus der Neo-Welt)</_description> + </configItem> + </variant> </variantList> </layout> <layout> @@ -689,6 +695,12 @@ <variantList> <variant> <configItem> + <name>dvorak_a5</name> + <_description>Swedish (Dvorak A5)</_description> + </configItem> + </variant> + <variant> + <configItem> <name>sun_type6</name> <_description>Swedish (Sun Type 6/7)</_description> </configItem> diff --git a/xorg-server/xkeyboard-config/rules/base.xml.in b/xorg-server/xkeyboard-config/rules/base.xml.in index 3b32e2209..0b0c1482c 100644 --- a/xorg-server/xkeyboard-config/rules/base.xml.in +++ b/xorg-server/xkeyboard-config/rules/base.xml.in @@ -1584,7 +1584,14 @@ <iso639Id>alb</iso639Id> </languageList> </configItem> - <variantList/> + <variantList> + <variant> + <configItem> + <name>plisi-d1</name> + <_description>Albanian (Plisi D1)</_description> + </configItem> + </variant> + </variantList> </layout> <layout> <configItem> @@ -6604,7 +6611,7 @@ </option> <option> <configItem> - <name>grab:debug_actions</name> + <name>grab:debug</name> <_description>Allow grab and window tree logging</_description> </configItem> </option> diff --git a/xorg-server/xkeyboard-config/rules/compat/base.l1v1_c.part b/xorg-server/xkeyboard-config/rules/compat/base.l1v1_c.part index 9d274dff1..9e2158767 100644 --- a/xorg-server/xkeyboard-config/rules/compat/base.l1v1_c.part +++ b/xorg-server/xkeyboard-config/rules/compat/base.l1v1_c.part @@ -1,2 +1,3 @@ de neo = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de adnw = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) jp $sun_compat = complete+japan(kana_lock) diff --git a/xorg-server/xkeyboard-config/rules/compat/base.l2v2_c.part b/xorg-server/xkeyboard-config/rules/compat/base.l2v2_c.part index b7d6e309a..28fb80b8a 100644 --- a/xorg-server/xkeyboard-config/rules/compat/base.l2v2_c.part +++ b/xorg-server/xkeyboard-config/rules/compat/base.l2v2_c.part @@ -1,2 +1,3 @@ de neo = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 + de adnw = +caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2 jp $sun_compat = +complete+japan(kana_lock):2 diff --git a/xorg-server/xkeyboard-config/rules/compat/base.l3v3_c.part b/xorg-server/xkeyboard-config/rules/compat/base.l3v3_c.part index 360b4c425..db62b75e1 100644 --- a/xorg-server/xkeyboard-config/rules/compat/base.l3v3_c.part +++ b/xorg-server/xkeyboard-config/rules/compat/base.l3v3_c.part @@ -1,2 +1,3 @@ de neo = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 + de adnw = +caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3 jp $sun_compat = +complete+japan(kana_lock):3 diff --git a/xorg-server/xkeyboard-config/rules/compat/base.l4v4_c.part b/xorg-server/xkeyboard-config/rules/compat/base.l4v4_c.part index 6633312c2..1df202f99 100644 --- a/xorg-server/xkeyboard-config/rules/compat/base.l4v4_c.part +++ b/xorg-server/xkeyboard-config/rules/compat/base.l4v4_c.part @@ -1,2 +1,3 @@ de neo = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 + de adnw = +caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4 jp $sun_compat = +complete+japan(kana_lock):4 diff --git a/xorg-server/xkeyboard-config/rules/compat/base.lv_c.part b/xorg-server/xkeyboard-config/rules/compat/base.lv_c.part index 927ff06b2..45b94b422 100644 --- a/xorg-server/xkeyboard-config/rules/compat/base.lv_c.part +++ b/xorg-server/xkeyboard-config/rules/compat/base.lv_c.part @@ -1,2 +1,3 @@ de neo = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) + de adnw = +caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock) jp $sun_compat = complete+japan(kana_lock) diff --git a/xorg-server/xkeyboard-config/symbols/al b/xorg-server/xkeyboard-config/symbols/al index a8d6ec715..a6d58bfb7 100644 --- a/xorg-server/xkeyboard-config/symbols/al +++ b/xorg-server/xkeyboard-config/symbols/al @@ -39,3 +39,67 @@ xkb_symbols "basic" { include "level3(ralt_switch)" }; + + +partial alphanumeric_keys +xkb_symbols "plisi-d1" { + + include "us" + + name[Group1]= "Albanian (Plisi D1)"; + + key <TLDE> { [ grave, asciitilde ] }; + key <AE01> { [ 1, exclam ] }; + key <AE02> { [ 2, at ] }; + key <AE03> { [ 3, numbersign ] }; + key <AE04> { [ 4, dollar, EuroSign ] }; + key <AE05> { [ 5, percent ] }; + key <AE06> { [ 6, asciicircum ] }; + key <AE07> { [ 7, ampersand, braceleft ] }; + key <AE08> { [ 8, asterisk, braceright ] }; + key <AE09> { [ 9, parenleft, bracketleft ] }; + key <AE10> { [ 0, parenright, bracketright ] }; + key <AE11> { [ minus, underscore ] }; + key <AE12> { [ equal, plus ] }; + + key <AD01> { [ q, Q ] }; + key <AD02> { [ w, W ] }; + key <AD03> { [ e, E ] }; + key <AD04> { [ r, R ] }; + key <AD05> { [ t, T ] }; + key <AD06> { [ y, Y ] }; + key <AD07> { [ u, U ] }; + key <AD08> { [ i, I ] }; + key <AD09> { [ o, O ] }; + key <AD10> { [ p, P ] }; + key <AD11> { [ ccedilla, Ccedilla ] }; + key <AD12> { [ greater, less ] }; + + key <AC01> { [ a, A ] }; + key <AC02> { [ s, S ] }; + key <AC03> { [ d, D ] }; + key <AC04> { [ f, F ] }; + key <AC05> { [ g, G ] }; + key <AC06> { [ h, H ] }; + key <AC07> { [ j, J ] }; + key <AC08> { [ k, K ] }; + key <AC09> { [ l, L ] }; + key <AC10> { [ ediaeresis, Ediaeresis ] }; + key <AC11> { [ apostrophe, quotedbl ] }; + + key <AB01> { [ z, Z ] }; + key <AB02> { [ x, X ] }; + key <AB03> { [ c, C ] }; + key <AB04> { [ v, V ] }; + key <AB05> { [ b, B ] }; + key <AB06> { [ n, N ] }; + key <AB07> { [ m, M ] }; + key <AB08> { [ comma, semicolon ] }; + key <AB09> { [ period, colon ] }; + key <AB10> { [ slash, question ] }; + + key <BKSL> { [ backslash, bar ] }; + + include "level3(ralt_switch)" +}; + diff --git a/xorg-server/xkeyboard-config/symbols/de b/xorg-server/xkeyboard-config/symbols/de index 150c081c9..368456c52 100644 --- a/xorg-server/xkeyboard-config/symbols/de +++ b/xorg-server/xkeyboard-config/symbols/de @@ -748,3 +748,59 @@ partial alphanumeric_keys xkb_symbols "sun_type6" { include "sun_vndr/de(sun_type6)" }; + +partial alphanumeric_keys +xkb_symbols "adnw_base" { + include "de(neo_base)" + + key.type[Group1] = "EIGHT_LEVEL"; + key <AD04> { [ period, enfilledcircbullet, NoSymbol, U03D1, NoSymbol, NoSymbol, U21A6, NoSymbol ] }; + key <AB04> { [ comma, endash, NoSymbol, U03F1, NoSymbol, NoSymbol, U21D2, NoSymbol ] }; + + key.type[Group1] = "EIGHT_LEVEL_SEMIALPHABETIC"; + key <AD01> { [ k, K, NoSymbol, Greek_kappa, NoSymbol, NoSymbol, multiply, NoSymbol ] }; + key <AD02> { [ u, U, NoSymbol, NoSymbol, NoSymbol, NoSymbol, includedin, NoSymbol ] }; + key <AD03> { [ udiaeresis, Udiaeresis, NoSymbol, NoSymbol, NoSymbol, NoSymbol, union, NoSymbol ] }; + key <AD05> { [ adiaeresis, Adiaeresis, NoSymbol, Greek_eta, NoSymbol, NoSymbol, U2135, NoSymbol ] }; + key <AD06> { [ v, V, NoSymbol, NoSymbol, NoSymbol, NoSymbol, radical, NoSymbol ] }; + key <AD07> { [ g, G, NoSymbol, Greek_gamma, NoSymbol, NoSymbol, Greek_GAMMA, NoSymbol ] }; + key <AD08> { [ c, C, NoSymbol, Greek_chi, NoSymbol, NoSymbol, U2102, NoSymbol ] }; + key <AD09> { [ l, L, NoSymbol, Greek_lambda, NoSymbol, NoSymbol, Greek_LAMBDA, NoSymbol ] }; + key <AD10> { [ j, J, NoSymbol, Greek_theta, NoSymbol, NoSymbol, Greek_THETA, NoSymbol ] }; + key <AD11> { [ f, F, NoSymbol, Greek_phi, NoSymbol, NoSymbol, Greek_PHI, NoSymbol ] }; + key <AC01> { [ h, H, NoSymbol, Greek_psi, NoSymbol, NoSymbol, Greek_PSI, NoSymbol ] }; + key <AC02> { [ i, I, NoSymbol, Greek_iota, NoSymbol, NoSymbol, integral, NoSymbol ] }; + key <AC03> { [ e, E, NoSymbol, Greek_epsilon, NoSymbol, NoSymbol, U2203, NoSymbol ] }; + key <AC04> { [ a, A, NoSymbol, Greek_alpha, NoSymbol, NoSymbol, U2200, NoSymbol ] }; + key <AC05> { [ o, O, NoSymbol, Greek_omicron, NoSymbol, NoSymbol, elementof, NoSymbol ] }; + key <AC06> { [ d, D, NoSymbol, Greek_delta, NoSymbol, NoSymbol, Greek_DELTA, NoSymbol ] }; + key <AC07> { [ t, T, NoSymbol, Greek_tau, NoSymbol, NoSymbol, partialderivative, NoSymbol ] }; + key <AC08> { [ r, R, NoSymbol, Greek_rho, NoSymbol, NoSymbol, U211D, NoSymbol ] }; + key <AC09> { [ n, N, NoSymbol, Greek_nu, NoSymbol, NoSymbol, U2115, NoSymbol ] }; + key <AC10> { [ s, S, NoSymbol, Greek_sigma, NoSymbol, NoSymbol, Greek_SIGMA, NoSymbol ] }; + key <AC11> { [ ssharp, U1E9E, NoSymbol, Greek_finalsmallsigma, NoSymbol, NoSymbol, jot, NoSymbol ] }; + key <AB01> { [ x, X, NoSymbol, Greek_xi, NoSymbol, NoSymbol, Greek_XI, NoSymbol ] }; + key <AB02> { [ y, Y, NoSymbol, Greek_upsilon, NoSymbol, NoSymbol, nabla, NoSymbol ] }; + key <AB03> { [ odiaeresis, odiaeresis, NoSymbol, U03F5, NoSymbol, NoSymbol, intersection, NoSymbol ] }; + key <AB05> { [ q, Q, NoSymbol, U03D5, NoSymbol, NoSymbol, U211A, NoSymbol ] }; + key <AB06> { [ b, B, NoSymbol, Greek_beta, NoSymbol, NoSymbol, U21D0, NoSymbol ] }; + key <AB07> { [ p, P, NoSymbol, Greek_pi, NoSymbol, NoSymbol, Greek_PI, NoSymbol ] }; + key <AB08> { [ w, W, NoSymbol, Greek_omega, NoSymbol, NoSymbol, Greek_OMEGA, NoSymbol ] }; + key <AB09> { [ m, M, NoSymbol, Greek_mu, NoSymbol, NoSymbol, ifonlyif, NoSymbol ] }; + key <AB10> { [ z, Z, NoSymbol, Greek_zeta, NoSymbol, NoSymbol, U2124, NoSymbol ] }; +}; + +partial alphanumeric_keys modifier_keys keypad_keys +xkb_symbols "adnw" { + + include "de(adnw_base)" + + name[Group1]= "German (Aus der Neo-Welt)"; + + include "shift(both_capslock)" + include "level3(caps_switch)" + include "level3(bksl_switch)" + include "level5(lsgt_switch)" + include "level5(ralt_switch)" +}; + diff --git a/xorg-server/xkeyboard-config/symbols/ru b/xorg-server/xkeyboard-config/symbols/ru index fd1cc0ec5..64c862b26 100644 --- a/xorg-server/xkeyboard-config/symbols/ru +++ b/xorg-server/xkeyboard-config/symbols/ru @@ -156,6 +156,8 @@ xkb_symbols "typewriter-legacy" { partial alphanumeric_keys xkb_symbols "phonetic" { + name[Group1]= "Russian (phonetic)"; + key <AE01> { [ 1, exclam ] }; key <AE02> { [ 2, at ] }; key <AE03> { [ 3, Cyrillic_io ] }; diff --git a/xorg-server/xkeyboard-config/symbols/sun_vndr/de b/xorg-server/xkeyboard-config/symbols/sun_vndr/de index 7736088bb..d95b07952 100644 --- a/xorg-server/xkeyboard-config/symbols/sun_vndr/de +++ b/xorg-server/xkeyboard-config/symbols/sun_vndr/de @@ -121,6 +121,16 @@ partial alphanumeric_keys }; partial alphanumeric_keys + xkb_symbols "adnw" { + include "de(adnw)" +}; + +partial alphanumeric_keys + xkb_symbols "adnw_base" { + include "de(adnw_base)" +}; + +partial alphanumeric_keys xkb_symbols "neo" { include "de(neo)" }; |