diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/ChangeLog mesa-10.6.3~git20150727+10.6.ccef8901/ChangeLog --- mesa-10.6.2~git20150716+10.6.89cbd91b/ChangeLog 2015-07-16 07:08:21.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/ChangeLog 2015-07-27 05:58:10.000000000 +0000 @@ -1,9 +1,254 @@ -commit 0e0233eac3ae3dd29d19f7758b457f924da6aea0 +commit 8f2d65f7e730b48d1d045bcb5fc2f5e6e03c8915 Author: Rico Tzschichholz -Date: Thu Jul 16 09:06:17 2015 +0200 +Date: Mon Jul 27 07:57:14 2015 +0200 Add debian tree from origin/ubuntu+1 +commit ccef8901de421eae5dcc8affa14218d46cc06593 +Author: Emil Velikov +Date: Sun Jul 26 15:18:24 2015 +0100 + + docs: Add checksums for mesa 10.6.3 tarballs + + Signed-off-by: Emil Velikov + +commit ddc976368fef367e464472ebcc2ac4fd89eb9fd8 +Author: Emil Velikov +Date: Sun Jul 26 14:38:58 2015 +0100 + + Add release notes for 10.6.3 + + Signed-off-by: Emil Velikov + +commit 2eef0b7d8608faeecd7cf71b386d64edd7a08e24 +Author: Emil Velikov +Date: Sun Jul 26 14:33:29 2015 +0100 + + Update version to 10.6.3 + + Signed-off-by: Emil Velikov + +commit 954c18fb5c95c125ef43a88b55af620dca32e829 +Author: Ilia Mirkin +Date: Mon Jul 20 00:19:56 2015 -0400 + + nv50: fix max level clamping on G80 + + It appears that the G80 did not have support for the sampler view + first/last clamping. Put the view's last level in the place of the + texture's so that it doesn't go past what the sampler view allows. + + Signed-off-by: Ilia Mirkin + Cc: mesa-stable@lists.freedesktop.org + (cherry picked from commit 801d41fa43eba996c6bd7c071282ad15e51609d3) + +commit 2a77b82a92494d91e90b516ad5fed8e6e0a10a6b +Author: Ilia Mirkin +Date: Sat Jul 18 19:02:29 2015 -0400 + + gm107/ir: fix indirect txq emission + + Signed-off-by: Ilia Mirkin + Cc: mesa-stable@lists.freedesktop.org + (cherry picked from commit 8c8a71f0d125bb655b17a32914ffecf8d159593b) + +commit 7efc693ef26c91c545c78f4b751432e43011b541 +Author: Ilia Mirkin +Date: Sat Jul 18 18:38:42 2015 -0400 + + nvc0/ir: don't worry about sampler in txq handling + + There's no need to deal with samplers for texture size queries. That + code also was accidentally setting an invalid sIndirectSrc position, but + it can now just be removed. + + Signed-off-by: Ilia Mirkin + Cc: mesa-stable@lists.freedesktop.org + (cherry picked from commit 346ce0b98832e33d5411200002571b3edea9e2bb) + +commit 440f465f5f38c0f522eea3a79d94663954b63864 +Author: Ilia Mirkin +Date: Sat Jul 18 16:43:17 2015 -0400 + + nvc0/ir: fix txq on indirect samplers + + Signed-off-by: Ilia Mirkin + Cc: mesa-stable@lists.freedesktop.org + (cherry picked from commit 20e484afa4874e87cd18daffd66286bb893cf3fb) + +commit 9656b34faef3a262ad0354a3194ed1ee1edd1e16 +Author: Kenneth Graunke +Date: Sat Jul 4 19:15:16 2015 -0700 + + program: Allow redundant OPTION ARB_fog_* directives. + + A fragment program from "Pixel Piracy" contains redundant OPTION + directives: + + !!ARBfp1.0 + OPTION ARB_precision_hint_fastest; + OPTION ARB_fog_exp2; + OPTION ARB_precision_hint_fastest; + OPTION ARB_fog_exp2; + ... + + We already allow redundant ARB_precision_hint_fastest directives, but + disallow the redundant (yet consistent) ARB_fog_exp2 directives, failing + to compile the program. + + The specification seems to contradict itself - the main text says that + only one fog application option may be specified, but then backpedals, + indicating the intent is to disallow /contradictory/ flags. One of the + issues suggests that specifying contradictory ones is stupid, but + allowed, and only the last one should take effect. + + Accepting multiple redundant (but consistent) directives seems harmless, + and like a reasonable interpretation of the specification. It also + fixes a fragment program found in the wild. + + Cc: mesa-stable@lists.freedesktop.org + Signed-off-by: Kenneth Graunke + Reviewed-by: Ian Romanick + (cherry picked from commit 4b17f0d9f58637300b0748d1fb702a7e4d51979f) + +commit 329763791b2a869f30a39b8d1f94b95dcb2c9e8e +Author: Francisco Jerez +Date: Wed Jul 1 16:32:24 2015 +0300 + + i965/gen9: Use custom MOCS entries set up by the kernel. + + Instead of relying on hardware defaults the i915 kernel driver is + going program custom MOCS tables system-wide on Gen9 hardware. The + "WT" entry previously used for renderbuffers had a number of problems: + It disabled caching on eLLC, it used a reserved L3 cacheability + setting, and it used to override the PTE controls making renderbuffers + always WT on LLC regardless of the kernel's setting. Instead use an + entry from the new MOCS tables with parameters: TC=LLC/eLLC, LeCC=PTE, + L3CC=WB. + + The "WB" entry previously used for anything other than renderbuffers + has moved to a different index in the new MOCS tables but it should + have the same caching semantics as the old entry. + + Even though the corresponding kernel change ("drm/i915: Added + Programming of the MOCS") is in a way an ABI break it doesn't seem + necessary to check that the kernel is recent enough because the change + should only affect Gen9 which is still unreleased hardware. + + v2: Update MOCS values for the new Android-incompatible tables + introduced in v7 of the kernel patch. + + Cc: 10.6 + Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-July/071080.html + Reviewed-by: Ben Widawsky + (cherry picked from commit af768922cafa3eb3e78a2fdfee90380a74c79460) + Signed-off-by: Emil Velikov + + Conflicts: + src/mesa/drivers/dri/i965/brw_defines.h + +commit 8132c7ac41f07857368aef25cbc4a26979784ba4 +Author: Brian Paul +Date: Wed Jul 15 06:15:06 2015 -0600 + + osmesa: fix OSMesaPixelsStore typo + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91337 + Cc: 10.6 + + Reviewed-by: Emil Velikov + (cherry picked from commit 141e1eb29fe80ad341e718147a1277cc3b1b9c11) + +commit da8bc1673936b9c9ba83c3d60fd03ce383bc8e85 +Author: Emil Velikov +Date: Fri Jul 10 21:27:13 2015 +0100 + + auxiliary/vl: use the correct screen index + + Inspired (copied) from Marek's commit for egl/x11 + commit 0b56e23e7f3(egl/dri2: use the correct screen index) + + v2: Fix copy/pasta errors. + + Cc: 10.6 + Signed-off-by: Emil Velikov + Reviewed-by: Marek Olšák + (cherry picked from commit 7a50bf6c7f7729f5eee3ddf7aa9b38a81873f2c6) + +commit 6012eeca0b44240b5ddc40650266eeaeb076d6fa +Author: Ilia Mirkin +Date: Fri Jul 10 16:42:18 2015 -0400 + + nv50, nvc0: enable at least one color RT if alphatest is enabled + + Fixes the following piglits: + fbo-alphatest-nocolor + fbo-alphatest-nocolor-ff + + Signed-off-by: Ilia Mirkin + Cc: mesa-stable@lists.freedesktop.org + (cherry picked from commit 1bfa25e88d21f95b9e176232bb091af77c294578) + +commit 9c7f5947058b17d2fd117e475a0395a6a1f745af +Author: Chad Versace +Date: Thu Jul 9 18:46:21 2015 -0700 + + mesa: Fix generation of git_sha1.h.tmp for gitlinks + + Don't assume that $(top_srcdir)/.git is a directory. It may be a + gitlink file [1] if $(top_srcdir) is a submodule checkout or a linked + worktree [2]. + + [1] A "gitlink" is a text file that specifies the real location of + the gitdir. + [2] Linked worktrees are a new feature in Git 2.5. + + Cc: "10.6, 10.5" + Reviewed-by: Iago Toral Quiroga + (cherry picked from commit 75784243df1f5bb0652fb243b37d69f36d493a86) + +commit 9e62e1a1d3023fa2834c6715c6bed72c3f11dac6 +Author: Rob Clark +Date: Wed Jul 8 13:30:22 2015 -0400 + + xa: don't leak fences + + XA was never unref'ing last_fence in the various call paths to + pipe->flush(). Add this to xa_context_flush() and update the other + open-coded calls to pipe->flush() to use xa_context_flush() instead. + + This fixes a memory leak reported with xf86-video-freedreno. + + Reported-by: Nicolas Dechesne + Cc: "10.5 10.6" + Signed-off-by: Rob Clark + (cherry picked from commit 0a8af6361eecaba0f34a668328746924b61caa6a) + +commit 4a3d6d04e10db6e756ecc8f09e737958fab7246b +Author: Christian König +Date: Mon Jun 29 10:19:36 2015 +0200 + + st/vdpau: fix mixer size checks + + We need to check what the 3D pipe is able to handle for the mixer, not what + the decoder is able to decode. This fixes output of resolutions like 720x1280. + + Signed-off-by: Christian König + CC: mesa-stable@lists.freedesktop.org + (cherry picked from commit 2cfa64e159a68998b76bdbcd20f8c7810379fce0) + +commit 9850b9ca73056dc4e606b8cdfcd0d97659d25861 +Author: Christian König +Date: Fri May 29 15:10:31 2015 +0200 + + vl: cleanup video buffer private when the decoder is destroyed + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90728 + + Signed-off-by: Christian König + CC: mesa-stable@lists.freedesktop.org + (cherry picked from commit bbfdf5c17b695c31915e293e1ec858cbcb340894) + commit 89cbd91b17989ec7eb1cb93ac427a84dca56cd79 Author: Emil Velikov Date: Sat Jul 11 20:33:16 2015 +0100 diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/debian/changelog mesa-10.6.3~git20150727+10.6.ccef8901/debian/changelog --- mesa-10.6.2~git20150716+10.6.89cbd91b/debian/changelog 2015-07-27 06:08:27.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/debian/changelog 2015-07-27 06:08:28.000000000 +0000 @@ -1,7 +1,7 @@ -mesa (10.6.2~git20150716+10.6.89cbd91b-0ubuntu0ricotz~trusty) trusty; urgency=medium +mesa (10.6.3~git20150727+10.6.ccef8901-0ubuntu0ricotz~trusty) trusty; urgency=medium - * Checkout from git 20150716 (10.6 branch) up to commit - 89cbd91b17989ec7eb1cb93ac427a84dca56cd79 + * Checkout from git 20150727 (10.6 branch) up to commit + ccef8901de421eae5dcc8affa14218d46cc06593 * Only added debian/ tree from origin/ubuntu+1 * hook: Disable MIR support. * hook: Relax symbols check. @@ -10,7 +10,7 @@ (upstream) * hook: update symbols. - -- Rico Tzschichholz Thu, 16 Jul 2015 09:08:22 +0200 + -- Rico Tzschichholz Mon, 27 Jul 2015 07:58:11 +0200 mesa (10.6.1-0ubuntu1) UNRELEASED; urgency=medium diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/docs/relnotes/10.6.3.html mesa-10.6.3~git20150727+10.6.ccef8901/docs/relnotes/10.6.3.html --- mesa-10.6.2~git20150716+10.6.89cbd91b/docs/relnotes/10.6.3.html 1970-01-01 00:00:00.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/docs/relnotes/10.6.3.html 2015-07-27 05:57:14.000000000 +0000 @@ -0,0 +1,106 @@ + + + + + Mesa Release Notes + + + + +
+

The Mesa 3D Graphics Library

+
+ + +
+ +

Mesa 10.6.3 Release Notes / July 26, 2015

+ +

+Mesa 10.6.3 is a bug fix release which fixes bugs found since the 10.6.2 release. +

+

+Mesa 10.6.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 only available if requested at context creation +because compatibility contexts are not supported. +

+ + +

SHA256 checksums

+
+c27e1e33798e69a6d2d2425aee8ac7b4c0b243066a65dd76cbb182ea31b1c7f2  mesa-10.6.3.tar.gz
+58592e07c350cd2e8969b73fa83048c657a39fe2f13f3b88f5e5818fe2e4676d  mesa-10.6.3.tar.xz
+
+ + +

New features

+

None

+ +

Bug fixes

+ +

This list is likely incomplete.

+
    + +
  • Bug 90728 - dvd playback with vlc and vdpau causes segmentation fault
  • + +
  • Bug 91337 - OSMesaGetProcAdress("OSMesaPixelStore") returns nil
  • + +
+ + +

Changes

+ +

Brian Paul (1):

+
    +
  • osmesa: fix OSMesaPixelsStore typo
  • +
+ +

Chad Versace (1):

+
    +
  • mesa: Fix generation of git_sha1.h.tmp for gitlinks
  • +
+ +

Christian König (2):

+
    +
  • vl: cleanup video buffer private when the decoder is destroyed
  • +
  • st/vdpau: fix mixer size checks
  • +
+ +

Emil Velikov (3):

+
    +
  • docs: Add sha256 checksums for the 10.6.2 release
  • +
  • auxiliary/vl: use the correct screen index
  • +
  • Update version to 10.6.3
  • +
+ +

Francisco Jerez (1):

+
    +
  • i965/gen9: Use custom MOCS entries set up by the kernel.
  • +
+ +

Ilia Mirkin (5):

+
    +
  • nv50, nvc0: enable at least one color RT if alphatest is enabled
  • +
  • nvc0/ir: fix txq on indirect samplers
  • +
  • nvc0/ir: don't worry about sampler in txq handling
  • +
  • gm107/ir: fix indirect txq emission
  • +
  • nv50: fix max level clamping on G80
  • +
+ +

Kenneth Graunke (1):

+
    +
  • program: Allow redundant OPTION ARB_fog_* directives.
  • +
+ +

Rob Clark (1):

+
    +
  • xa: don't leak fences
  • +
+ + +
+ + diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/.lastcommit mesa-10.6.3~git20150727+10.6.ccef8901/.lastcommit --- mesa-10.6.2~git20150716+10.6.89cbd91b/.lastcommit 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/.lastcommit 2015-07-27 05:57:14.000000000 +0000 @@ -1 +1 @@ -commit 89cbd91b17989ec7eb1cb93ac427a84dca56cd79 +commit ccef8901de421eae5dcc8affa14218d46cc06593 diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c 2014-04-29 19:36:58.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c 2015-07-27 05:57:14.000000000 +0000 @@ -84,6 +84,9 @@ struct video_buffer_private { + struct list_head list; + struct pipe_video_buffer *video_buffer; + struct pipe_sampler_view *sampler_view_planes[VL_NUM_COMPONENTS]; struct pipe_surface *surfaces[VL_MAX_SURFACES]; @@ -99,6 +102,8 @@ struct video_buffer_private *priv = private; unsigned i; + list_del(&priv->list); + for (i = 0; i < VL_NUM_COMPONENTS; ++i) pipe_sampler_view_reference(&priv->sampler_view_planes[i], NULL); @@ -126,6 +131,9 @@ priv = CALLOC_STRUCT(video_buffer_private); + list_add(&priv->list, &dec->buffer_privates); + priv->video_buffer = buf; + sv = buf->get_sampler_view_planes(buf); for (i = 0; i < VL_NUM_COMPONENTS; ++i) if (sv[i]) @@ -141,6 +149,18 @@ return priv; } +static void +free_video_buffer_privates(struct vl_mpeg12_decoder *dec) +{ + struct video_buffer_private *priv, *next; + + LIST_FOR_EACH_ENTRY_SAFE(priv, next, &dec->buffer_privates, list) { + struct pipe_video_buffer *buf = priv->video_buffer; + + vl_video_buffer_set_associated_data(buf, &dec->base, NULL, NULL); + } +} + static bool init_zscan_buffer(struct vl_mpeg12_decoder *dec, struct vl_mpeg12_buffer *buffer) { @@ -464,6 +484,8 @@ assert(decoder); + free_video_buffer_privates(dec); + /* Asserted in softpipe_delete_fs_state() for some reason */ dec->context->bind_vs_state(dec->context, NULL); dec->context->bind_fs_state(dec->context, NULL); @@ -1187,6 +1209,8 @@ if (!init_pipe_state(dec)) goto error_pipe_state; + list_inithead(&dec->buffer_privates); + return &dec->base; error_pipe_state: diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h 2014-04-20 07:52:19.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h 2015-07-27 05:57:14.000000000 +0000 @@ -30,6 +30,8 @@ #include "pipe/p_video_codec.h" +#include "util/list.h" + #include "vl_mpeg12_bitstream.h" #include "vl_zscan.h" #include "vl_idct.h" @@ -77,6 +79,8 @@ unsigned current_buffer; struct vl_mpeg12_buffer *dec_buffers[4]; + + struct list_head buffer_privates; }; struct vl_mpeg12_buffer diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/auxiliary/vl/vl_winsys_dri.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/auxiliary/vl/vl_winsys_dri.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/auxiliary/vl/vl_winsys_dri.c 2015-01-14 13:02:07.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/auxiliary/vl/vl_winsys_dri.c 2015-07-27 05:57:14.000000000 +0000 @@ -293,6 +293,16 @@ return vscreen; } +static xcb_screen_t * +get_xcb_screen(xcb_screen_iterator_t iter, int screen) +{ + for (; iter.rem; --screen, xcb_screen_next(&iter)) + if (screen == 0) + return iter.data; + + return NULL; +} + struct vl_screen* vl_screen_create(Display *display, int screen) { @@ -334,8 +344,7 @@ goto free_query; s = xcb_setup_roots_iterator(xcb_get_setup(scrn->conn)); - while (screen--) - xcb_screen_next(&s); + driverType = XCB_DRI2_DRIVER_TYPE_DRI; #ifdef DRI2DriverPrimeShift { @@ -351,7 +360,7 @@ } #endif - connect_cookie = xcb_dri2_connect_unchecked(scrn->conn, s.data->root, driverType); + connect_cookie = xcb_dri2_connect_unchecked(scrn->conn, get_xcb_screen(s, screen)->root, driverType); connect = xcb_dri2_connect_reply(scrn->conn, connect_cookie, NULL); if (connect == NULL || connect->driver_name_length + connect->device_name_length == 0) goto free_connect; @@ -370,7 +379,7 @@ if (drmGetMagic(fd, &magic)) goto free_connect; - authenticate_cookie = xcb_dri2_authenticate_unchecked(scrn->conn, s.data->root, magic); + authenticate_cookie = xcb_dri2_authenticate_unchecked(scrn->conn, get_xcb_screen(s, screen)->root, magic); authenticate = xcb_dri2_authenticate_reply(scrn->conn, authenticate_cookie, NULL); if (authenticate == NULL || !authenticate->authenticated) diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp 2015-07-27 05:57:14.000000000 +0000 @@ -2437,8 +2437,14 @@ break; } - emitInsn (0xdf4a0000); - emitField(0x24, 13, insn->tex.r); + if (insn->tex.rIndirectSrc >= 0) { + emitInsn (0xdf500000); + } else { + emitInsn (0xdf480000); + emitField(0x24, 13, insn->tex.r); + } + + emitField(0x31, 1, insn->tex.liveOnly); emitField(0x1f, 4, insn->tex.mask); emitField(0x16, 6, type); emitGPR (0x08, insn->src(0)); diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp 2015-07-27 05:57:14.000000000 +0000 @@ -1739,7 +1739,7 @@ } tex->setSrc((c = 0), fetchSrc(0, 0)); // mip level - setTexRS(tex, c, 1, -1); + setTexRS(tex, ++c, 1, -1); bb->insertTail(tex); } diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp 2015-07-27 05:57:14.000000000 +0000 @@ -956,7 +956,47 @@ bool NVC0LoweringPass::handleTXQ(TexInstruction *txq) { - // TODO: indirect resource/sampler index + if (txq->tex.rIndirectSrc < 0) + return true; + + Value *ticRel = txq->getIndirectR(); + const int chipset = prog->getTarget()->getChipset(); + + txq->setIndirectS(NULL); + txq->tex.sIndirectSrc = -1; + + assert(ticRel); + + if (chipset < NVISA_GK104_CHIPSET) { + LValue *src = new_LValue(func, FILE_GPR); // 0xttxsaaaa + + txq->setSrc(txq->tex.rIndirectSrc, NULL); + if (txq->tex.r) + ticRel = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getScratch(), + ticRel, bld.mkImm(txq->tex.r)); + + bld.mkOp2(OP_SHL, TYPE_U32, src, ticRel, bld.mkImm(0x17)); + + txq->moveSources(0, 1); + txq->setSrc(0, src); + } else { + Value *hnd = loadTexHandle( + bld.mkOp2v(OP_SHL, TYPE_U32, bld.getSSA(), + txq->getIndirectR(), bld.mkImm(2)), + txq->tex.r); + txq->tex.r = 0xff; + txq->tex.s = 0x1f; + + if (chipset < NVISA_GM107_CHIPSET) { + txq->setIndirectR(NULL); + txq->moveSources(0, 1); + txq->setSrc(0, hnd); + txq->tex.rIndirectSrc = 0; + } else { + txq->setIndirectR(hnd); + } + } + return true; } diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c 2015-07-27 05:57:14.000000000 +0000 @@ -296,6 +296,23 @@ nv50_fp_linkage_validate(nv50); } +/* alpha test is disabled if there are no color RTs, so make sure we have at + * least one if alpha test is enabled. Note that this must run after + * nv50_validate_fb, otherwise that will override the RT count setting. + */ +static void +nv50_validate_derived_2(struct nv50_context *nv50) +{ + struct nouveau_pushbuf *push = nv50->base.pushbuf; + + if (nv50->zsa && nv50->zsa->pipe.alpha.enabled && + nv50->framebuffer.nr_cbufs == 0) { + nv50_fb_set_null_rt(push, 0); + BEGIN_NV04(push, NV50_3D(RT_CONTROL), 1); + PUSH_DATA (push, (076543210 << 4) | 1); + } +} + static void nv50_validate_clip(struct nv50_context *nv50) { @@ -456,6 +473,7 @@ { nv50_gp_linkage_validate, NV50_NEW_GMTYPROG | NV50_NEW_VERTPROG }, { nv50_validate_derived_rs, NV50_NEW_FRAGPROG | NV50_NEW_RASTERIZER | NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG }, + { nv50_validate_derived_2, NV50_NEW_ZSA | NV50_NEW_FRAMEBUFFER }, { nv50_validate_clip, NV50_NEW_CLIP | NV50_NEW_RASTERIZER | NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG }, { nv50_constbufs_validate, NV50_NEW_CONSTBUF }, diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/nv50/nv50_tex.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/nv50/nv50_tex.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/nv50/nv50_tex.c 2015-01-14 13:02:07.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/nv50/nv50_tex.c 2015-07-27 05:57:14.000000000 +0000 @@ -71,6 +71,7 @@ uint32_t flags, enum pipe_texture_target target) { + const uint32_t class_3d = nouveau_context(pipe)->screen->class_3d; const struct util_format_description *desc; uint64_t addr; uint32_t *tic; @@ -201,11 +202,17 @@ tic[5] = (mt->base.base.height0 << mt->ms_y) & 0xffff; tic[5] |= depth << 16; - tic[5] |= mt->base.base.last_level << NV50_TIC_5_LAST_LEVEL__SHIFT; + if (class_3d > NV50_3D_CLASS) + tic[5] |= mt->base.base.last_level << NV50_TIC_5_LAST_LEVEL__SHIFT; + else + tic[5] |= view->pipe.u.tex.last_level << NV50_TIC_5_LAST_LEVEL__SHIFT; tic[6] = (mt->ms_x > 1) ? 0x88000000 : 0x03000000; /* sampling points */ - tic[7] = (view->pipe.u.tex.last_level << 4) | view->pipe.u.tex.first_level; + if (class_3d > NV50_3D_CLASS) + tic[7] = (view->pipe.u.tex.last_level << 4) | view->pipe.u.tex.first_level; + else + tic[7] = 0; if (unlikely(!(tic[2] & NV50_TIC_2_NORMALIZED_COORDS))) if (mt->base.base.last_level) diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c 2015-07-27 05:57:14.000000000 +0000 @@ -535,6 +535,23 @@ } } +/* alpha test is disabled if there are no color RTs, so make sure we have at + * least one if alpha test is enabled. Note that this must run after + * nvc0_validate_fb, otherwise that will override the RT count setting. + */ +static void +nvc0_validate_derived_2(struct nvc0_context *nvc0) +{ + struct nouveau_pushbuf *push = nvc0->base.pushbuf; + + if (nvc0->zsa && nvc0->zsa->pipe.alpha.enabled && + nvc0->framebuffer.nr_cbufs == 0) { + nvc0_fb_set_null_rt(push, 0); + BEGIN_NVC0(push, NVC0_3D(RT_CONTROL), 1); + PUSH_DATA (push, (076543210 << 4) | 1); + } +} + static void nvc0_switch_pipe_context(struct nvc0_context *ctx_to) { @@ -597,6 +614,7 @@ { nvc0_fragprog_validate, NVC0_NEW_FRAGPROG }, { nvc0_validate_derived_1, NVC0_NEW_FRAGPROG | NVC0_NEW_ZSA | NVC0_NEW_RASTERIZER }, + { nvc0_validate_derived_2, NVC0_NEW_ZSA | NVC0_NEW_FRAMEBUFFER }, { nvc0_validate_clip, NVC0_NEW_CLIP | NVC0_NEW_RASTERIZER | NVC0_NEW_VERTPROG | NVC0_NEW_TEVLPROG | diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/osmesa/osmesa.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/osmesa/osmesa.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/osmesa/osmesa.c 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/osmesa/osmesa.c 2015-07-27 05:57:14.000000000 +0000 @@ -886,7 +886,7 @@ { "OSMesaDestroyContext", (OSMESAproc) OSMesaDestroyContext }, { "OSMesaMakeCurrent", (OSMESAproc) OSMesaMakeCurrent }, { "OSMesaGetCurrentContext", (OSMESAproc) OSMesaGetCurrentContext }, - { "OSMesaPixelsStore", (OSMESAproc) OSMesaPixelStore }, + { "OSMesaPixelStore", (OSMESAproc) OSMesaPixelStore }, { "OSMesaGetIntegerv", (OSMESAproc) OSMesaGetIntegerv }, { "OSMesaGetDepthBuffer", (OSMESAproc) OSMesaGetDepthBuffer }, { "OSMesaGetColorBuffer", (OSMESAproc) OSMesaGetColorBuffer }, diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/vdpau/mixer.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/vdpau/mixer.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/vdpau/mixer.c 2015-01-14 13:02:07.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/vdpau/mixer.c 2015-07-27 05:57:14.000000000 +0000 @@ -49,7 +49,8 @@ vlVdpVideoMixer *vmixer = NULL; VdpStatus ret; struct pipe_screen *screen; - unsigned max_width, max_height, i; + uint32_t max_2d_texture_level; + unsigned max_size, i; vlVdpDevice *dev = vlGetDataHTAB(device); if (!dev) @@ -134,18 +135,17 @@ VDPAU_MSG(VDPAU_WARN, "[VDPAU] Max layers > 4 not supported\n", vmixer->max_layers); goto no_params; } - max_width = screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN, - PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_MAX_WIDTH); - max_height = screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN, - PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_MAX_HEIGHT); - if (vmixer->video_width < 48 || - vmixer->video_width > max_width) { - VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for width\n", vmixer->video_width, max_width); + + max_2d_texture_level = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); + max_size = pow(2, max_2d_texture_level-1); + if (vmixer->video_width < 48 || vmixer->video_width > max_size) { + VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for width\n", + vmixer->video_width, max_size); goto no_params; } - if (vmixer->video_height < 48 || - vmixer->video_height > max_height) { - VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for height\n", vmixer->video_height, max_height); + if (vmixer->video_height < 48 || vmixer->video_height > max_size) { + VDPAU_MSG(VDPAU_WARN, "[VDPAU] 48 < %u < %u not valid for height\n", + vmixer->video_height, max_size); goto no_params; } vmixer->luma_key_min = 0.f; diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/xa/xa_context.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/xa/xa_context.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/xa/xa_context.c 2015-02-25 15:01:21.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/xa/xa_context.c 2015-07-27 05:57:14.000000000 +0000 @@ -37,7 +37,11 @@ XA_EXPORT void xa_context_flush(struct xa_context *ctx) { - ctx->pipe->flush(ctx->pipe, &ctx->last_fence, 0); + if (ctx->last_fence) { + struct pipe_screen *screen = ctx->xa->screen; + screen->fence_reference(screen, &ctx->last_fence, NULL); + } + ctx->pipe->flush(ctx->pipe, &ctx->last_fence, 0); } XA_EXPORT struct xa_context * diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/xa/xa_tracker.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/xa/xa_tracker.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/xa/xa_tracker.c 2015-06-16 10:39:37.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/xa/xa_tracker.c 2015-07-27 05:57:14.000000000 +0000 @@ -461,7 +461,7 @@ xa_min(save_height, template->height0), &src_box); pipe->resource_copy_region(pipe, texture, 0, 0, 0, 0, srf->tex, 0, &src_box); - pipe->flush(pipe, &xa->default_ctx->last_fence, 0); + xa_context_flush(xa->default_ctx); } pipe_resource_reference(&srf->tex, texture); diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/xa/xa_yuv.c mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/xa/xa_yuv.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/gallium/state_trackers/xa/xa_yuv.c 2014-11-01 15:59:41.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/gallium/state_trackers/xa/xa_yuv.c 2015-07-27 05:57:14.000000000 +0000 @@ -154,7 +154,7 @@ box++; } - r->pipe->flush(r->pipe, &r->last_fence, 0); + xa_context_flush(r); xa_ctx_sampler_views_destroy(r); xa_ctx_srf_destroy(r); diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/drivers/dri/i965/brw_defines.h mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/drivers/dri/i965/brw_defines.h --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/drivers/dri/i965/brw_defines.h 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/drivers/dri/i965/brw_defines.h 2015-07-27 05:57:14.000000000 +0000 @@ -2471,12 +2471,13 @@ #define BDW_MOCS_WT 0x58 #define BDW_MOCS_PTE 0x18 -/* Skylake: MOCS is now an index into an array of 64 different configurable - * cache settings. We still use only either write-back or write-through; and - * rely on the documented default values. +/* Skylake: MOCS is now an index into an array of 62 different caching + * configurations programmed by the kernel. */ -#define SKL_MOCS_WB 9 -#define SKL_MOCS_WT 5 +/* TC=LLC/eLLC, LeCC=WB, LRUM=3, L3CC=WB */ +#define SKL_MOCS_WB (2 << 1) +/* TC=LLC/eLLC, LeCC=PTE, LRUM=3, L3CC=WB */ +#define SKL_MOCS_PTE (1 << 1) #define MEDIA_VFE_STATE 0x7000 /* GEN7 DW2, GEN8+ DW3 */ diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/drivers/dri/i965/gen8_surface_state.c mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/drivers/dri/i965/gen8_surface_state.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/drivers/dri/i965/gen8_surface_state.c 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/drivers/dri/i965/gen8_surface_state.c 2015-07-27 05:57:14.000000000 +0000 @@ -349,8 +349,7 @@ irb->mt_layer : (irb->mt_layer / MAX2(mt->num_samples, 1)); GLenum gl_target = rb->TexImage ? rb->TexImage->TexObject->Target : GL_TEXTURE_2D; - /* FINISHME: Use PTE MOCS on Skylake. */ - uint32_t mocs = brw->gen >= 9 ? SKL_MOCS_WT : BDW_MOCS_PTE; + const uint32_t mocs = brw->gen >= 9 ? SKL_MOCS_PTE : BDW_MOCS_PTE; intel_miptree_used_for_rendering(mt); diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/drivers/osmesa/osmesa.c mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/drivers/osmesa/osmesa.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/drivers/osmesa/osmesa.c 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/drivers/osmesa/osmesa.c 2015-07-27 05:57:14.000000000 +0000 @@ -1124,7 +1124,7 @@ { "OSMesaDestroyContext", (OSMESAproc) OSMesaDestroyContext }, { "OSMesaMakeCurrent", (OSMESAproc) OSMesaMakeCurrent }, { "OSMesaGetCurrentContext", (OSMESAproc) OSMesaGetCurrentContext }, - { "OSMesaPixelsStore", (OSMESAproc) OSMesaPixelStore }, + { "OSMesaPixelStore", (OSMESAproc) OSMesaPixelStore }, { "OSMesaGetIntegerv", (OSMESAproc) OSMesaGetIntegerv }, { "OSMesaGetDepthBuffer", (OSMESAproc) OSMesaGetDepthBuffer }, { "OSMesaGetColorBuffer", (OSMESAproc) OSMesaGetColorBuffer }, diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/Makefile.am mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/Makefile.am --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/Makefile.am 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/Makefile.am 2015-07-27 05:57:14.000000000 +0000 @@ -40,8 +40,11 @@ .PHONY: main/git_sha1.h.tmp main/git_sha1.h.tmp: + @# Don't assume that $(top_srcdir)/.git is a directory. It may be + @# a gitlink file if $(top_srcdir) is a submodule checkout or a linked + @# worktree. @touch main/git_sha1.h.tmp - @if test -d $(top_srcdir)/.git; then \ + @if test -e $(top_srcdir)/.git; then \ if which git > /dev/null; then \ git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \ sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/program/program_parse_extra.c mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/program/program_parse_extra.c --- mesa-10.6.2~git20150716+10.6.89cbd91b/src/mesa/program/program_parse_extra.c 2014-04-20 07:52:19.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/src/mesa/program/program_parse_extra.c 2015-07-27 05:57:14.000000000 +0000 @@ -163,6 +163,8 @@ int _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option) { + unsigned fog_option; + /* All of the options currently supported start with "ARB_". The code is * currently structured with nested if-statements because eventually options * that start with "NV_" will be supported. This structure will result in @@ -177,20 +179,42 @@ if (strncmp(option, "fog_", 4) == 0) { option += 4; - if (state->option.Fog == OPTION_NONE) { - if (strcmp(option, "exp") == 0) { - state->option.Fog = OPTION_FOG_EXP; - return 1; - } else if (strcmp(option, "exp2") == 0) { - state->option.Fog = OPTION_FOG_EXP2; - return 1; - } else if (strcmp(option, "linear") == 0) { - state->option.Fog = OPTION_FOG_LINEAR; - return 1; - } - } + if (strcmp(option, "exp") == 0) { + fog_option = OPTION_FOG_EXP; + } else if (strcmp(option, "exp2") == 0) { + fog_option = OPTION_FOG_EXP2; + } else if (strcmp(option, "linear") == 0) { + fog_option = OPTION_FOG_LINEAR; + } else { + /* invalid option */ + return 0; + } + + if (state->option.Fog == OPTION_NONE) { + state->option.Fog = fog_option; + return 1; + } - return 0; + /* The ARB_fragment_program specification instructs us to handle + * redundant options in two seemingly contradictory ways: + * + * Section 3.11.4.5.1 says: + * "Only one fog application option may be specified by any given + * fragment program. A fragment program that specifies more than one + * of the program options "ARB_fog_exp", "ARB_fog_exp2", and + * "ARB_fog_linear", will fail to load." + * + * Issue 27 says: + * "The three mandatory options are ARB_fog_exp, ARB_fog_exp2, and + * ARB_fog_linear. As these options are mutually exclusive by + * nature, specifying more than one is not useful. If more than one + * is specified, the last one encountered in the + * will be the one to actually modify the execution environment." + * + * We choose to allow programs to specify the same OPTION redundantly, + * but fail to load programs that specify contradictory options. + */ + return state->option.Fog == fog_option ? 1 : 0; } else if (strncmp(option, "precision_hint_", 15) == 0) { option += 15; diff -Nru mesa-10.6.2~git20150716+10.6.89cbd91b/VERSION mesa-10.6.3~git20150727+10.6.ccef8901/VERSION --- mesa-10.6.2~git20150716+10.6.89cbd91b/VERSION 2015-07-16 07:06:16.000000000 +0000 +++ mesa-10.6.3~git20150727+10.6.ccef8901/VERSION 2015-07-27 05:57:14.000000000 +0000 @@ -1 +1 @@ -10.6.2 +10.6.3