Compare commits

...

32 Commits

Author SHA1 Message Date
Carl Worth
0da7d59ac2 docs: Add MD5 sums for the 10.0.5 release.
These can be generated only after the release has been tarred up and tagged.
2014-04-18 17:02:17 -07:00
Carl Worth
c941373838 docs: Add release notes for 10.0.5 2014-04-18 16:51:02 -07:00
Carl Worth
c78a676998 Update version to 10.0.5
In preparation for the 10.0.5 release, of course.
2014-04-18 16:48:06 -07:00
Eric Anholt
5e718c11c6 i965: Fix buffer overruns in MSAA MCS buffer clearing.
This manifested as rendering failures or sometimes GPU hangs in
compositors when they accidentally got MSAA visuals due to a bug in the X
Server.  Today we decided that the problem in compositors was equivalent
to a corruption bug we'd noticed recently in resizing MSAA-visual
glxgears, and debugging got a lot easier.

When we allocate our MCS MT, libdrm takes the size we request, aligns it
to Y tile size (blowing it up from 300x300=900000 bytes to 384*320=122880
bytes, 30 pages), then puts it into a power-of-two-sized BO (131072 bytes,
32 pages).  Because it's Y tiled, we attach a 384-byte-stride fence to it.
When we memset by the BO size in Mesa, between bytes 122880 and 131072 the
data gets stored to the first 20 or so scanlines of each of the 3 tiled
pages in that row, even though only 2 of those pages were allocated by
libdrm.  In the glxgears case, the missing 3rd page happened to
consistently be the static VBO that got mapped right after the first MCS
allocation, so corruption only appeared once window resize made us throw
out the old MCS and then allocate the same BO to back the new MCS.

Instead, just memset the amount of data we actually asked libdrm to
allocate for, which will be smaller (more efficient) and not overrun.
Thanks go to Kenneth for doing most of the hard debugging to eliminate a
lot of the search space for the bug.

Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77207
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 7ae870211d)
2014-04-16 10:21:09 -07:00
Paul Berry
b2f14a6284 i965/gen7: Prefer vertical alignment of 4 when possible.
Gen6+ allows for color buffers to use a vertical alignment of either 4
or 2.  Previously we defaulted to 2.  This may have caused problems on
Gen7 because Y-tiled render targets are not allowed to use a vertical
alignment of 2.

This patch changes the vertical alignment to 4 on Gen7, except for the
few formats where a vertical alignment of 2 is required.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 6b40dd17cf)
2014-04-16 10:10:19 -07:00
Emil Velikov
498853b9fd glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path
With commit 1f1928db001(glx: Drop _Xglobal_lock while we create and
initialize glx display) we've split the big _Xglobal_lock handling in
a more fine grained manner.

Unfortunatelly we forgot to drop the unlock_mutex on the error paths,
leading to undefined behaviour as the mutex is already unlocked.

Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: "9.2 10.0 10.1"  <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit f9832f960f)
2014-04-14 15:05:36 -07:00
Brian Paul
45fd1d336a svga: move LIST_INITHEAD(dirty_buffers) earlier in svga_context_create()
Fixes a crash in svga_context_flush_buffers() if we use the 'draw' module
for AA lines (when the device doesn't support that feature).  We need to
initialize this list before we setup the swtnl pieces.

Found/fixed by Charmaine Lee.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
(cherry picked from commit e853ade544)

Conflicts:
	src/gallium/drivers/svga/svga_context.c
2014-04-14 15:05:35 -07:00
Courtney Goeltzenleuchter
cbaaf8fe42 mesa: add bounds checking to eliminate buffer overrun
Decompressing ETC2 textures was causing intermitent segfault
by copying resulting 4x4 texel block to the destination texture
regardless of the size of the destination texture. Issue found
via application crash in GLBenchmark 3.0's Manhattan test.

v2: add more detail comment. Compute limit outside inner loops.
v3: add bugzilla reference
v4: Correct cc syntax in commit log
v5: really grab the right patch

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74988
Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1, suggested v2-3]
(cherry picked from commit cb4ad13685)
2014-04-14 15:05:35 -07:00
Brian Paul
7b580a567f svga: replace sampler assertion with conditional
For TEX instructions, the set of samplers and sampler views should
be consistent.  The XA state tracker sometimes passes an inconsistent
set of samplers and sampler views.  Rather than assert and die, issue
a warning.

v2: add debugging code to detect inconsistent state.
v3: also check for null sampler in svga_state_tss.c

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
(cherry picked from commit 9bb2ec6fd1)

Conflicts:
	src/gallium/drivers/svga/svga_state_fs.c
2014-04-14 15:05:35 -07:00
Ilia Mirkin
69a777dd21 nouveau: fix firmware check on nvd7/nvd9
The kernel driver expects the class to be based on chipset generation
rather than VP generation. Make sure to pass 90b1 for NVDX chipsets
instead of 95b1.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77102
Fixes: 40dd777b33
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.1 10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubunutu.com>
(cherry picked from commit 89c5b56be6)
2014-04-14 15:05:35 -07:00
Johannes Nixdorf
76f33938dd configure.ac: fix the detection of expat with pkg-config
The pkg-config module was called "EXPAT" instead of "expat" in
PKG_CHECK_EXISTS. This seems to have been wrong because the wrong
argument was copied from PKG_CHECK_MODULES.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 476db98e03)
2014-04-14 15:05:35 -07:00
Brian Paul
68fef3983e cso: fix sampler view count in cso_set_sampler_views()
We want to call pipe->set_sampler_views() with count being the
maximum of the old number of sampler views and the new number.
This makes sure we null-out any old sampler views.

We already do the same thing for sampler states in single_sampler_done().
Fixes some assertions seen in the VMware driver with XA tracker.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Tested-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 2355a64414)
2014-04-14 15:05:35 -07:00
Brian Paul
5ab0f978b7 mesa: fix glMultiDrawArrays inside a display list
The underlying glDrawArrays() calls weren't getting compiled into
the display list.  We simply need to use the current dispatch table
so the CALL_DrawArrays() is routed to the display list save function.

This patch also fixes glMultiModeDrawArraysIBM and
glMultiModeDrawElementsIBM.

Fixes the new piglit gl-1.4-dlist-multidrawarrays test.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit e341856294)
2014-04-14 15:05:35 -07:00
Brian Paul
9cd2daa0ef st/mesa: add null pointer checking in query object functions
Don't pass null query object pointers into gallium functions.
This avoids segfaulting in the VMware driver (and others?) if the
pipe_context::create_query() call fails and returns NULL.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 488d4c4826)
2014-04-14 15:05:35 -07:00
Brian Paul
15b2587334 mesa: fix unpack_Z32_FLOAT_X24S8() / unpack_Z32_FLOAT() mix-up
And use the z32f_x24s8 helper struct in unpack_Z32_FLOAT_X24S8().
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 1f4ebfaa88)
2014-04-14 15:05:35 -07:00
Christian König
6cc6c921b1 st/mesa: fix sampler view handling with shared textures v4
Release the references to the sampler views before
destroying the pipe context.

v2: remove TODO and unrelated change
v3: move to st_texture.[ch], rename callback, add comment
v4: fix rebase mess up and add further cleanups

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d117ddbe31)
2014-04-14 15:05:35 -07:00
José Fonseca
132df6a9a5 draw: Duplicate TGSI tokens in draw_pipe_pstipple module.
As done in draw_pipe_aaline and draw_pipe_aapoint modules.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ee89432a47)
2014-04-14 15:05:35 -07:00
Christian König
0c37a0b94d st/mesa: recreate sampler view on context change v3
With shared glx contexts it is possible that a texture is create and used
in one context and then used in another one resulting in incorrect
sampler view usage.

v2: avoid template copy
v3: add XXX comment

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 92e543c45d)
2014-04-14 15:05:35 -07:00
Ilia Mirkin
1184293f40 nouveau: there may not have been a texture if the fbo was incomplete
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit e58071355e)
2014-04-14 15:05:34 -07:00
Ilia Mirkin
2bd3830197 nouveau: add forgotten GL_COMPRESSED_INTENSITY to texture format list
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b676df9abf)

Conflicts:
	src/mesa/drivers/dri/nouveau/nouveau_texture.c
2014-04-14 15:05:34 -07:00
Ilia Mirkin
f15356c70a mesa/main: condition GL_DEPTH_STENCIL on ARB_depth_texture
EXT_packed_depth_stencil is supported by all drivers, but
ARB_depth_texture isn't (notably nouveau_vieux). This should avoid
passing unexpected values down to ChooseTextureFormat.

The EXT_packed_depth_stencil spec does not make any explicit references
to requiring ARB_depth_texture in order to allow textures with that
format, however if there is no dependency, ARB_depth_texture would be
practically implied by the extension.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>

Note for 10.0 backport: This will produce a conflict, the solution is to
move the surrounding if as well.

(cherry picked from commit 18690995a6)

Conflicts:
	src/mesa/main/teximage.c
2014-04-14 15:05:34 -07:00
Emil Velikov
40a05673a7 mesa: return v.value_int64 when the requested type is TYPE_INT64
Fixes "Operands don't affect result" defect reported by Coverity.

Cc: "9.2 10.0 10.1"  <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit a9cf3aa208)
2014-04-14 15:05:34 -07:00
Jonathan Gray
437f291d64 gallium: add endian detection for OpenBSD
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 40214267ab)
2014-04-14 15:05:34 -07:00
Ilia Mirkin
5c4f80dca6 nv50: adjust blit_3d handling of ms output textures
This fixes some unwanted scaling when the output is multisampled.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 253314d487)

Also squashed in the following:

Revert nvc0 part of "nv50: adjust blit_3d handling of ms output textures"

The nvc0 bits don't appear to work, and I thought I had removed them
from the commit. Oops.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 897f40f25d)
2014-04-14 15:05:34 -07:00
Ilia Mirkin
860ee22480 nouveau: fix fence waiting logic in screen destroy
nouveau_fence_wait has the expectation that an external entity is
holding onto the fence being waited on, not that it is merely held onto
by the current pointer. Fixes a use-after-free in nouveau_fence_wait
when used on the screen's current fence.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75279
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 507f0230d4)

Conflicts:
	src/gallium/drivers/nouveau/nv30/nv30_screen.c
2014-04-14 15:05:34 -07:00
Matt Turner
5ad6062ee6 mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.
Because people insist on doing things like explicitly disabling SSE 4.1.

Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
Tested-by: David Heidelberger <david.heidelberger@ixit.cz>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71547
(cherry picked from commit 8d3f739383)
2014-04-14 15:05:34 -07:00
Brian Paul
063f9c6aef mesa: fix copy & paste bugs in pack_ubyte_SRGB8()
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 1e25aa4cdb)
2014-04-14 15:05:34 -07:00
Brian Paul
6490bdf358 mesa: fix copy & paste bugs in pack_ubyte_SARGB8()
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit 9493fc729e)
2014-04-14 15:05:34 -07:00
Carl Worth
1062066fad Ignore patches which don't apply.
These patches all fix bugs in code that in not present in the 10.0 branch.
2014-04-14 15:05:34 -07:00
Brian Paul
fd5f0644af mesa: add unpacking code for MESA_FORMAT_Z32_FLOAT_S8X24_UINT
Fixes glGetTexImage() when converting from MESA_FORMAT_Z32_FLOAT_S8X24_UINT
to GL_UNSIGNED_INT_24_8.  Hit by the piglit
ext_packed_depth_stencil-getteximage test.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit a12d4d0398)
2014-04-14 15:05:34 -07:00
Alex Deucher
ef793cbf6d radeon: reverse DBG_NO_HYPERZ logic
Change the flag to DBG_HYPERZ and reverse the logic
so setting the flag enabled the feature.  This disables
hyperz on r600g and radeonsi by default.  It can be
enabled by setting the env var.  There are just too
many issues with certain apps so leave it disabled for
now until we sort out the issues with the problematic
apps.

Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=58660
https://bugs.freedesktop.org/show_bug.cgi?id=64471
https://bugs.freedesktop.org/show_bug.cgi?id=66352
https://bugs.freedesktop.org/show_bug.cgi?id=68799
https://bugs.freedesktop.org/show_bug.cgi?id=72685
https://bugs.freedesktop.org/show_bug.cgi?id=73088
https://bugs.freedesktop.org/show_bug.cgi?id=74428
https://bugs.freedesktop.org/show_bug.cgi?id=74803
https://bugs.freedesktop.org/show_bug.cgi?id=74863
https://bugs.freedesktop.org/show_bug.cgi?id=74892
https://bugzilla.kernel.org/show_bug.cgi?id=70411

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "10.1" "10.0" <mesa-stable@lists.freedesktop.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 01e6371149)
2014-04-14 14:05:02 -07:00
Carl Worth
f6ce0eba76 docs: Add md5sums for the 10.0.4 release.
After tar files were generated.
2014-03-12 09:16:31 -07:00
36 changed files with 458 additions and 89 deletions

View File

@@ -1 +1 @@
10.0.4
10.0.5

View File

@@ -28,3 +28,12 @@ e190709119d8eb85c67bfbad5be699d39ad0118e mesa: Ensure that transform feedback re
a92e5f7cf63d496ad7830b5cea4bbab287c25b8e i965: Use sample barycentric coordinates with per sample shading
f5cfb4ae21df8eebfc6b86c0ce858b1c0a9160dd i965: Ignore 'centroid' interpolation qualifier in case of persample shading
dc2f94bc786768329973403248820a2e5249f102 i965: Ignore 'centroid' interpolation qualifier in case of persample shading
# This depends on the clear_buffer_object extensions work which is not in 10.0
# (See commit 5f7bc0c75904a40da0973329badea8497e53a26a on other branches)
aff7c5e78ab133866a90f67613508735c9b75094
# These patches are fixing code not present in 10.0
f34d75d6f69f4c0bf391e0adf1fd469601b01b04
e8d85034dad37177fce780ee3e09501e60be6e81
a61d859519d520b849c11ad5c1c1972870abd956

View File

@@ -999,7 +999,7 @@ if test "x$enable_dri" = xyes; then
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
# Check for expat
PKG_CHECK_EXISTS([EXPAT], [have_expat=yes], [have_expat=no])
PKG_CHECK_EXISTS([expat], [have_expat=yes], [have_expat=no])
if test "x$have_expat" = "xyes"; then
PKG_CHECK_MODULES([EXPAT], [expat], [],
AC_MSG_ERROR([Expat required for DRI.]))

View File

@@ -31,6 +31,9 @@ because compatibility contexts not supported.
<h2>MD5 checksums</h2>
<pre>
5a3c5b90776ec8a9fcd777c99e0607e2 MesaLib-10.0.4.tar.gz
8b148869d2620b0720c8a8d2b7eb3e38 MesaLib-10.0.4.tar.bz2
da2418d25bfbc273660af7e755fb367e MesaLib-10.0.4.zip
</pre>

173
docs/relnotes/10.0.5.html Normal file
View File

@@ -0,0 +1,173 @@
<!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.0.5 Release Notes / (April 18, 2014)</h1>
<p>
Mesa 10.0.5 is a bug fix release which fixes bugs found since the 10.0.4 release.
</p>
<p>
Mesa 10.0.5 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 not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
db606aadd0fe321f3664099677d159bc MesaLib-10.0.5.tar.gz
e6009ccd8898d7104bb325b6af9ec354 MesaLib-10.0.5.tar.bz2
c8ab9e502542bf32299a4df85b0b704d MesaLib-10.0.5.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=58660">Bug 58660</a> - CAYMAN broken with HyperZ on</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64471">Bug 64471</a> - Radeon HD6570 lockup in Brütal Legend with HyperZ</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66352">Bug 66352</a> - GPU lockup in L4D2 on TURKS with HyperZ</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68799">Bug 68799</a> - [APITRACE] Hyper-Z lockup with Falcon BMS 4.32u6 on CAYMAN</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71547">Bug 71547</a> - compilation failure :#error &quot;SSE4.1 instruction set not enabled&quot;</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72685">Bug 72685</a> - [radeonsi hyperz] Artifacts in Unigine Sanctuary</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73088">Bug 73088</a> - [HyperZ] Juniper (6770): Gone Home / Unigine Heaven 4.0 lock up system after several minutes of use</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74428">Bug 74428</a> - hyperz causes gpu hang in Counter-strike: Source</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74803">Bug 74803</a> - [r600g] HyperZ broken on RV630 (Cogs shadows are broken)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74863">Bug 74863</a> - [r600g] HyperZ broken on RV770 and CYPRESS (Left 4 Dead 2 trees corruption) bisected!</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74892">Bug 74892</a> - HyperZ GPU lockup with radeonsi 7970M PITCAIRN and Distance Alpha game</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74988">Bug 74988</a> - Buffer overrun (segfault) decompressing ETC2 texture in GLBenchmark 3.0 Manhattan</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75279">Bug 75279</a> - XCloseDisplay() takes one minute around nouveau_dri.so, freezing Firefox startup</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77102">Bug 77102</a> - gallium nouveau has no profile in vdpau and libva</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77207">Bug 77207</a> - [ivb/hsw] batch overwritten with garbage</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following git command:</p>
<pre>
git log mesa-10.0.4..mesa-10.0.5
</pre>
<p>Alex Deucher (1):</p>
<ul>
<li>radeon: reverse DBG_NO_HYPERZ logic</li>
</ul>
<p>Brian Paul (9):</p>
<ul>
<li>mesa: add unpacking code for MESA_FORMAT_Z32_FLOAT_S8X24_UINT</li>
<li>mesa: fix copy &amp; paste bugs in pack_ubyte_SARGB8()</li>
<li>mesa: fix copy &amp; paste bugs in pack_ubyte_SRGB8()</li>
<li>mesa: fix unpack_Z32_FLOAT_X24S8() / unpack_Z32_FLOAT() mix-up</li>
<li>st/mesa: add null pointer checking in query object functions</li>
<li>mesa: fix glMultiDrawArrays inside a display list</li>
<li>cso: fix sampler view count in cso_set_sampler_views()</li>
<li>svga: replace sampler assertion with conditional</li>
<li>svga: move LIST_INITHEAD(dirty_buffers) earlier in svga_context_create()</li>
</ul>
<p>Carl Worth (3):</p>
<ul>
<li>docs: Add md5sums for the 10.0.4 release.</li>
<li>Ignore patches which don't apply.</li>
<li>Update version to 10.0.5</li>
</ul>
<p>Christian König (2):</p>
<ul>
<li>st/mesa: recreate sampler view on context change v3</li>
<li>st/mesa: fix sampler view handling with shared textures v4</li>
</ul>
<p>Courtney Goeltzenleuchter (1):</p>
<ul>
<li>mesa: add bounds checking to eliminate buffer overrun</li>
</ul>
<p>Emil Velikov (2):</p>
<ul>
<li>mesa: return v.value_int64 when the requested type is TYPE_INT64</li>
<li>glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path</li>
</ul>
<p>Eric Anholt (1):</p>
<ul>
<li>i965: Fix buffer overruns in MSAA MCS buffer clearing.</li>
</ul>
<p>Ilia Mirkin (6):</p>
<ul>
<li>nouveau: fix fence waiting logic in screen destroy</li>
<li>nv50: adjust blit_3d handling of ms output textures</li>
<li>mesa/main: condition GL_DEPTH_STENCIL on ARB_depth_texture</li>
<li>nouveau: add forgotten GL_COMPRESSED_INTENSITY to texture format list</li>
<li>nouveau: there may not have been a texture if the fbo was incomplete</li>
<li>nouveau: fix firmware check on nvd7/nvd9</li>
</ul>
<p>Johannes Nixdorf (1):</p>
<ul>
<li>configure.ac: fix the detection of expat with pkg-config</li>
</ul>
<p>Jonathan Gray (1):</p>
<ul>
<li>gallium: add endian detection for OpenBSD</li>
</ul>
<p>José Fonseca (1):</p>
<ul>
<li>draw: Duplicate TGSI tokens in draw_pipe_pstipple module.</li>
</ul>
<p>Matt Turner (1):</p>
<ul>
<li>mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.</li>
</ul>
<p>Paul Berry (1):</p>
<ul>
<li>i965/gen7: Prefer vertical alignment of 4 when possible.</li>
</ul>
</div>
</body>
</html>

View File

@@ -1182,11 +1182,12 @@ cso_set_sampler_views(struct cso_context *ctx,
pipe_sampler_view_reference(&info->views[i], NULL);
}
info->nr_views = count;
/* bind the new sampler views */
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, count,
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0,
MAX2(info->nr_views, count),
info->views);
info->nr_views = count;
}

View File

@@ -673,7 +673,7 @@ pstip_create_fs_state(struct pipe_context *pipe,
struct pstip_fragment_shader *pstipfs = CALLOC_STRUCT(pstip_fragment_shader);
if (pstipfs) {
pstipfs->state = *fs;
pstipfs->state.tokens = tgsi_dup_tokens(fs->tokens);
/* pass-through */
pstipfs->driver_fs = pstip->driver_create_fs_state(pstip->pipe, fs);
@@ -707,6 +707,7 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
if (pstipfs->pstip_fs)
pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs);
FREE((void*)pstipfs->state.tokens);
FREE(pstipfs);
}

View File

@@ -371,10 +371,10 @@ firmware_present(struct pipe_screen *pscreen, enum pipe_video_profile profile)
int size, oclass;
if (chipset < 0xc0)
oclass = 0x85b1;
else if (vp5)
oclass = 0x95b1;
else
else if (chipset < 0xe0)
oclass = 0x90b1;
else
oclass = 0x95b1;
if (chipset < 0xc0) {
data = &nv04_data;

View File

@@ -298,10 +298,16 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
{
struct nv30_screen *screen = nv30_screen(pscreen);
if (screen->base.fence.current &&
screen->base.fence.current->state >= NOUVEAU_FENCE_STATE_EMITTED) {
nouveau_fence_wait(screen->base.fence.current);
nouveau_fence_ref (NULL, &screen->base.fence.current);
if (screen->base.fence.current) {
struct nouveau_fence *current = NULL;
/* nouveau_fence_wait will create a new current fence, so wait on the
* _current_ one, and remove both.
*/
nouveau_fence_ref(screen->base.fence.current, &current);
nouveau_fence_wait(current);
nouveau_fence_ref(NULL, &current);
nouveau_fence_ref(NULL, &screen->base.fence.current);
}
nouveau_object_del(&screen->query);

View File

@@ -283,8 +283,15 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
struct nv50_screen *screen = nv50_screen(pscreen);
if (screen->base.fence.current) {
nouveau_fence_wait(screen->base.fence.current);
nouveau_fence_ref (NULL, &screen->base.fence.current);
struct nouveau_fence *current = NULL;
/* nouveau_fence_wait will create a new current fence, so wait on the
* _current_ one, and remove both.
*/
nouveau_fence_ref(screen->base.fence.current, &current);
nouveau_fence_wait(current);
nouveau_fence_ref(NULL, &current);
nouveau_fence_ref(NULL, &screen->base.fence.current);
}
if (screen->base.pushbuf)
screen->base.pushbuf->user_priv = NULL;

View File

@@ -935,6 +935,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
float x0, x1, y0, y1, z;
float dz;
float x_range, y_range;
float tri_x, tri_y;
blit->mode = nv50_blit_select_mode(info);
blit->color_mask = nv50_blit_derive_color_mask(info);
@@ -954,11 +955,14 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
x_range = (float)info->src.box.width / (float)info->dst.box.width;
y_range = (float)info->src.box.height / (float)info->dst.box.height;
tri_x = 16384 << nv50_miptree(dst)->ms_x;
tri_y = 16384 << nv50_miptree(dst)->ms_y;
x0 = (float)info->src.box.x - x_range * (float)info->dst.box.x;
y0 = (float)info->src.box.y - y_range * (float)info->dst.box.y;
x1 = x0 + 16384.0f * x_range;
y1 = y0 + 16384.0f * y_range;
x1 = x0 + tri_x * x_range;
y1 = y0 + tri_y * y_range;
x0 *= (float)(1 << nv50_miptree(src)->ms_x);
x1 *= (float)(1 << nv50_miptree(src)->ms_x);
@@ -1027,7 +1031,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
PUSH_DATAf(push, y0);
PUSH_DATAf(push, z);
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
PUSH_DATAf(push, 16384 << nv50_miptree(dst)->ms_x);
PUSH_DATAf(push, tri_x);
PUSH_DATAf(push, 0.0f);
BEGIN_NV04(push, NV50_3D(VTX_ATTR_3F_X(1)), 3);
PUSH_DATAf(push, x0);
@@ -1035,7 +1039,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
PUSH_DATAf(push, z);
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(0)), 2);
PUSH_DATAf(push, 0.0f);
PUSH_DATAf(push, 16384 << nv50_miptree(dst)->ms_y);
PUSH_DATAf(push, tri_y);
BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1);
PUSH_DATA (push, 0);
}

View File

@@ -331,7 +331,14 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
struct nvc0_screen *screen = nvc0_screen(pscreen);
if (screen->base.fence.current) {
nouveau_fence_wait(screen->base.fence.current);
struct nouveau_fence *current = NULL;
/* nouveau_fence_wait will create a new current fence, so wait on the
* _current_ one, and remove both.
*/
nouveau_fence_ref(screen->base.fence.current, &current);
nouveau_fence_wait(current);
nouveau_fence_ref(NULL, &current);
nouveau_fence_ref(NULL, &screen->base.fence.current);
}
if (screen->base.pushbuf)

View File

@@ -43,7 +43,7 @@
static const struct debug_named_value r600_debug_options[] = {
/* features */
{ "nohyperz", DBG_NO_HYPERZ, "Disable Hyper-Z" },
{ "hyperz", DBG_HYPERZ, "Enable Hyper-Z" },
#if defined(R600_USE_LLVM)
{ "nollvm", DBG_NO_LLVM, "Disable the LLVM shader compiler" },
#endif
@@ -894,8 +894,8 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
rscreen->b.debug_flags |= DBG_COMPUTE;
if (debug_get_bool_option("R600_DUMP_SHADERS", FALSE))
rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS;
if (!debug_get_bool_option("R600_HYPERZ", TRUE))
rscreen->b.debug_flags |= DBG_NO_HYPERZ;
if (debug_get_bool_option("R600_HYPERZ", FALSE))
rscreen->b.debug_flags |= DBG_HYPERZ;
if (!debug_get_bool_option("R600_LLVM", TRUE))
rscreen->b.debug_flags |= DBG_NO_LLVM;

View File

@@ -73,7 +73,7 @@
#define DBG_PS (1 << 11)
#define DBG_CS (1 << 12)
/* features */
#define DBG_NO_HYPERZ (1 << 13)
#define DBG_HYPERZ (1 << 13)
/* The maximum allowed bit is 15. */
struct r600_common_context;

View File

@@ -542,7 +542,7 @@ r600_texture_create_object(struct pipe_screen *screen,
if (rtex->is_depth &&
!(base->flags & (R600_RESOURCE_FLAG_TRANSFER |
R600_RESOURCE_FLAG_FLUSHED_DEPTH)) &&
!(rscreen->debug_flags & DBG_NO_HYPERZ)) {
(rscreen->debug_flags & DBG_HYPERZ)) {
if (rscreen->chip_class >= SI) {
/* XXX implement Hyper-Z for SI.
* Reuse the CMASK allocator, which is almost the same as HTILE. */

View File

@@ -90,6 +90,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
if (svga == NULL)
goto no_svga;
LIST_INITHEAD(&svga->dirty_buffers);
svga->pipe.screen = screen;
svga->pipe.priv = priv;
svga->pipe.destroy = svga_destroy;
@@ -155,8 +157,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
svga->dirty = ~0;
LIST_INITHEAD(&svga->dirty_buffers);
return &svga->pipe;
no_state:

View File

@@ -199,15 +199,43 @@ make_fs_key(const struct svga_context *svga,
if (svga->curr.blend->need_white_fragments) {
key->white_fragments = 1;
}
#ifdef DEBUG
/*
* We expect a consistent set of samplers and sampler views.
* Do some debug checks/warnings here.
*/
{
static boolean warned = FALSE;
unsigned i, n = MAX2(svga->curr.num_sampler_views,
svga->curr.num_samplers);
/* Only warn once to prevent too much debug output */
if (!warned) {
if (svga->curr.num_sampler_views != svga->curr.num_samplers) {
debug_printf("svga: mismatched number of sampler views (%u) "
"vs. samplers (%u)\n",
svga->curr.num_sampler_views,
svga->curr.num_samplers);
}
for (i = 0; i < n; i++) {
if ((svga->curr.sampler_views[i] == NULL) !=
(svga->curr.sampler[i] == NULL))
debug_printf("sampler_view[%u] = %p but sampler[%u] = %p\n",
i, svga->curr.sampler_views[i],
i, svga->curr.sampler[i]);
}
warned = TRUE;
}
}
#endif
/* XXX: want to limit this to the textures that the shader actually
* refers to.
*
* SVGA_NEW_TEXTURE_BINDING | SVGA_NEW_SAMPLER
*/
for (i = 0; i < svga->curr.num_sampler_views; i++) {
if (svga->curr.sampler_views[i]) {
assert(svga->curr.sampler[i]);
if (svga->curr.sampler_views[i] && svga->curr.sampler[i]) {
assert(svga->curr.sampler_views[i]->texture);
key->tex[i].texture_target = svga->curr.sampler_views[i]->texture->target;
if (!svga->curr.sampler[i]->normalized_coords) {

View File

@@ -85,7 +85,7 @@ update_tss_binding(struct svga_context *svga,
struct pipe_sampler_view *sv = svga->curr.sampler_views[i];
/* get min max lod */
if (sv) {
if (sv && s) {
min_lod = MAX2(0, (s->view_min_lod + sv->u.tex.first_level));
max_lod = MIN2(s->view_max_lod + sv->u.tex.first_level,
sv->texture->last_level);

View File

@@ -157,6 +157,16 @@
# define PIPE_ARCH_BIG_ENDIAN
#endif
#elif defined(__OpenBSD__)
#include <sys/types.h>
#include <machine/endian.h>
#if _BYTE_ORDER == _LITTLE_ENDIAN
# define PIPE_ARCH_LITTLE_ENDIAN
#elif _BYTE_ORDER == _BIG_ENDIAN
# define PIPE_ARCH_BIG_ENDIAN
#endif
#else
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)

View File

@@ -823,7 +823,6 @@ __glXInitialize(Display * dpy)
dpyPriv->codes = XInitExtension(dpy, __glXExtensionName);
if (!dpyPriv->codes) {
free(dpyPriv);
_XUnlockMutex(_Xglobal_lock);
return NULL;
}
@@ -839,7 +838,6 @@ __glXInitialize(Display * dpy)
&dpyPriv->majorVersion, &dpyPriv->minorVersion)
|| (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) {
free(dpyPriv);
_XUnlockMutex(_Xglobal_lock);
return NULL;
}
@@ -900,7 +898,7 @@ __glXInitialize(Display * dpy)
dpyPriv->next = glx_displays;
glx_displays = dpyPriv;
_XUnlockMutex(_Xglobal_lock);
_XUnlockMutex(_Xglobal_lock);
return dpyPriv;
}

View File

@@ -105,11 +105,11 @@ intel_vertical_texture_alignment_unit(struct brw_context *brw,
* | Depth Buffer | 2 | 2 | 2 | 4 | 4 |
* | Separate Stencil Buffer | N/A | N/A | N/A | 4 | 8 |
* | Multisampled (4x or 8x) render target | N/A | N/A | N/A | 4 | 4 |
* | All Others | 2 | 2 | 2 | 2 | 2 |
* | All Others | 2 | 2 | 2 | * | * |
* +----------------------------------------------------------------------+
*
* On SNB+, non-special cases can be overridden by setting the SURFACE_STATE
* "Surface Vertical Alignment" field to VALIGN_2 or VALIGN_4.
* Where "*" means either VALIGN_2 or VALIGN_4 depending on the setting of
* the SURFACE_STATE "Surface Vertical Alignment" field.
*/
if (_mesa_is_format_compressed(format))
return 4;
@@ -128,6 +128,25 @@ intel_vertical_texture_alignment_unit(struct brw_context *brw,
return 4;
}
if (brw->gen == 7) {
/* On Gen7, we prefer a vertical alignment of 4 when possible, because
* that allows Y tiled render targets.
*
* From the Ivy Bridge PRM, Vol4 Part1 2.12.2.1 (SURFACE_STATE for most
* messages), on p64, under the heading "Surface Vertical Alignment":
*
* Value of 1 [VALIGN_4] is not supported for format YCRCB_NORMAL
* (0x182), YCRCB_SWAPUVY (0x183), YCRCB_SWAPUV (0x18f), YCRCB_SWAPY
* (0x190)
*
* VALIGN_4 is not supported for surface format R32G32B32_FLOAT.
*/
if (base_format == GL_YCBCR_MESA || format == MESA_FORMAT_RGB_FLOAT32)
return 2;
return 4;
}
return 2;
}

View File

@@ -1252,7 +1252,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
* Note: the clear value for MCS buffers is all 1's, so we memset to 0xff.
*/
void *data = intel_miptree_map_raw(brw, mt->mcs_mt);
memset(data, 0xff, mt->mcs_mt->region->bo->size);
memset(data, 0xff, mt->mcs_mt->region->height * mt->mcs_mt->region->pitch);
intel_miptree_unmap_raw(brw, mt->mcs_mt);
return mt->mcs_mt;

View File

@@ -265,7 +265,8 @@ static void
nouveau_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer *rb)
{
texture_dirty(rb->TexImage->TexObject);
if (rb && rb->TexImage)
texture_dirty(rb->TexImage->TexObject);
}
void

View File

@@ -225,6 +225,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_INTENSITY12:
case GL_INTENSITY16:
case GL_INTENSITY8:
case GL_COMPRESSED_INTENSITY:
return MESA_FORMAT_I8;
case GL_RGB_S3TC:

View File

@@ -1039,8 +1039,8 @@ pack_ubyte_SRGB8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
d[2] = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
d[1] = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
d[0] = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
d[1] = linear_ubyte_to_srgb_ubyte(src[GCOMP]);
d[0] = linear_ubyte_to_srgb_ubyte(src[BCOMP]);
}
static void
@@ -1085,8 +1085,8 @@ pack_ubyte_SARGB8(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
GLubyte g = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
GLubyte b = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
GLubyte g = linear_ubyte_to_srgb_ubyte(src[GCOMP]);
GLubyte b = linear_ubyte_to_srgb_ubyte(src[BCOMP]);
*d = PACK_COLOR_8888(src[ACOMP], r, g, b);
}

View File

@@ -711,20 +711,20 @@ unpack_Z32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
unpack_Z32_FLOAT_X24S8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = ((const GLfloat *) src);
const struct z32f_x24s8 *s = (const struct z32f_x24s8 *) src;
GLuint i;
for (i = 0; i < n; i++) {
dst[i][0] =
dst[i][1] =
dst[i][2] = s[i * 2];
dst[i][2] = s[i].z;
dst[i][3] = 1.0F;
}
}
static void
unpack_Z32_FLOAT_X24S8(const void *src, GLfloat dst[][4], GLuint n)
unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = ((const GLfloat *) src);
GLuint i;
@@ -4115,12 +4115,31 @@ unpack_uint_24_8_depth_stencil_S8_Z24(const GLuint *src, GLuint *dst, GLuint n)
}
}
static void
unpack_uint_24_8_depth_stencil_Z32_S8X24(const GLuint *src,
GLuint *dst, GLuint n)
{
GLuint i;
for (i = 0; i < n; i++) {
/* 8 bytes per pixel (float + uint32) */
GLfloat zf = ((GLfloat *) src)[i * 2 + 0];
GLuint z24 = (GLuint) (zf * (GLfloat) 0xffffff);
GLuint s = src[i * 2 + 1] & 0xff;
dst[i] = (z24 << 8) | s;
}
}
static void
unpack_uint_24_8_depth_stencil_Z24_S8(const GLuint *src, GLuint *dst, GLuint n)
{
memcpy(dst, src, n * 4);
}
/**
* Unpack depth/stencil returning as GL_UNSIGNED_INT_24_8.
* \param format the source data format
*/
void
_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
const void *src, GLuint *dst)
@@ -4132,6 +4151,9 @@ _mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
case MESA_FORMAT_S8_Z24:
unpack_uint_24_8_depth_stencil_S8_Z24(src, dst, n);
break;
case MESA_FORMAT_Z32_FLOAT_X24S8:
unpack_uint_24_8_depth_stencil_Z32_S8X24(src, dst, n);
break;
default:
_mesa_problem(NULL,
"bad format %s in _mesa_unpack_uint_24_8_depth_stencil_row",

View File

@@ -1839,7 +1839,7 @@ _mesa_GetBooleani_v( GLenum pname, GLuint index, GLboolean *params )
params[3] = INT_TO_BOOLEAN(v.value_int_4[3]);
break;
case TYPE_INT64:
params[0] = INT64_TO_BOOLEAN(v.value_int);
params[0] = INT64_TO_BOOLEAN(v.value_int64);
break;
default:
; /* nothing - GL error was recorded */
@@ -1864,7 +1864,7 @@ _mesa_GetIntegeri_v( GLenum pname, GLuint index, GLint *params )
params[3] = v.value_int_4[3];
break;
case TYPE_INT64:
params[0] = INT64_TO_INT(v.value_int);
params[0] = INT64_TO_INT(v.value_int64);
break;
default:
; /* nothing - GL error was recorded */
@@ -1889,7 +1889,7 @@ _mesa_GetInteger64i_v( GLenum pname, GLuint index, GLint64 *params )
params[3] = v.value_int_4[3];
break;
case TYPE_INT64:
params[0] = v.value_int;
params[0] = v.value_int64;
break;
default:
; /* nothing - GL error was recorded */

View File

@@ -26,6 +26,7 @@
*
*/
#ifdef __SSE4_1__
#include "main/macros.h"
#include "main/streaming-load-memcpy.h"
#include <smmintrin.h>
@@ -83,3 +84,5 @@ _mesa_streaming_load_memcpy(void *restrict dst, void *restrict src, size_t len)
memcpy(d, s, len);
}
}
#endif

View File

@@ -679,14 +679,25 @@ etc2_unpack_rgb8(uint8_t *dst_row,
for (y = 0; y < height; y += bh) {
const uint8_t *src = src_row;
/*
* Destination texture may not be a multiple of four texels in
* height. Compute a safe height to avoid writing outside the texture.
*/
const unsigned h = MIN2(bh, height - y);
for (x = 0; x < width; x+= bw) {
etc2_rgb8_parse_block(&block, src,
false /* punchthrough_alpha */);
for (j = 0; j < bh; j++) {
/*
* Destination texture may not be a multiple of four texels in
* width. Compute a safe width to avoid writing outside the texture.
*/
const unsigned w = MIN2(bw, width - x);
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
false /* punchthrough_alpha */);
dst[3] = 255;
@@ -716,14 +727,17 @@ etc2_unpack_srgb8(uint8_t *dst_row,
for (y = 0; y < height; y += bh) {
const uint8_t *src = src_row;
const unsigned h = MIN2(bh, height - y);
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_rgb8_parse_block(&block, src,
false /* punchthrough_alpha */);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
false /* punchthrough_alpha */);
/* Convert to MESA_FORMAT_SARGB8 */
@@ -760,13 +774,15 @@ etc2_unpack_rgba8(uint8_t *dst_row,
for (y = 0; y < height; y += bh) {
const uint8_t *src = src_row;
const unsigned h = MIN2(bh, height - y);
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_rgba8_parse_block(&block, src);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_rgba8_fetch_texel(&block, i, j, dst);
dst += comps;
}
@@ -796,14 +812,16 @@ etc2_unpack_srgb8_alpha8(uint8_t *dst_row,
uint8_t tmp;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_rgba8_parse_block(&block, src);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_rgba8_fetch_texel(&block, i, j, dst);
/* Convert to MESA_FORMAT_SARGB8 */
@@ -838,14 +856,16 @@ etc2_unpack_r11(uint8_t *dst_row,
unsigned x, y, i, j;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_r11_parse_block(&block, src);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps * comp_size;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_r11_fetch_texel(&block, i, j, dst);
dst += comps * comp_size;
}
@@ -873,16 +893,18 @@ etc2_unpack_rg11(uint8_t *dst_row,
unsigned x, y, i, j;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
/* red component */
etc2_r11_parse_block(&block, src);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride +
x * comps * comp_size;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_r11_fetch_texel(&block, i, j, dst);
dst += comps * comp_size;
}
@@ -890,10 +912,10 @@ etc2_unpack_rg11(uint8_t *dst_row,
/* green component */
etc2_r11_parse_block(&block, src + 8);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride +
x * comps * comp_size;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_r11_fetch_texel(&block, i, j, dst + comp_size);
dst += comps * comp_size;
}
@@ -921,15 +943,17 @@ etc2_unpack_signed_r11(uint8_t *dst_row,
unsigned x, y, i, j;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_r11_parse_block(&block, src);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride +
x * comps * comp_size;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_signed_r11_fetch_texel(&block, i, j, dst);
dst += comps * comp_size;
}
@@ -957,16 +981,18 @@ etc2_unpack_signed_rg11(uint8_t *dst_row,
unsigned x, y, i, j;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
/* red component */
etc2_r11_parse_block(&block, src);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride +
x * comps * comp_size;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_signed_r11_fetch_texel(&block, i, j, dst);
dst += comps * comp_size;
}
@@ -974,10 +1000,10 @@ etc2_unpack_signed_rg11(uint8_t *dst_row,
/* green component */
etc2_r11_parse_block(&block, src + 8);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride +
x * comps * comp_size;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_signed_r11_fetch_texel(&block, i, j, dst + comp_size);
dst += comps * comp_size;
}
@@ -1002,14 +1028,16 @@ etc2_unpack_rgb8_punchthrough_alpha1(uint8_t *dst_row,
unsigned x, y, i, j;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_rgb8_parse_block(&block, src,
true /* punchthrough_alpha */);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
true /* punchthrough_alpha */);
dst += comps;
@@ -1037,14 +1065,16 @@ etc2_unpack_srgb8_punchthrough_alpha1(uint8_t *dst_row,
uint8_t tmp;
for (y = 0; y < height; y += bh) {
const unsigned h = MIN2(bh, height - y);
const uint8_t *src = src_row;
for (x = 0; x < width; x+= bw) {
const unsigned w = MIN2(bw, width - x);
etc2_rgb8_parse_block(&block, src,
true /* punchthrough_alpha */);
for (j = 0; j < bh; j++) {
for (j = 0; j < h; j++) {
uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
for (i = 0; i < bw; i++) {
for (i = 0; i < w; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
true /* punchthrough_alpha */);
/* Convert to MESA_FORMAT_SARGB8 */

View File

@@ -159,6 +159,9 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
return GL_DEPTH_COMPONENT;
case GL_DEPTH_STENCIL:
case GL_DEPTH24_STENCIL8:
return GL_DEPTH_STENCIL;
default:
; /* fallthrough */
}
@@ -300,16 +303,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
if (ctx->Extensions.EXT_packed_depth_stencil) {
switch (internalFormat) {
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
return GL_DEPTH_STENCIL_EXT;
default:
; /* fallthrough */
}
}
if (ctx->Extensions.EXT_texture_sRGB) {
switch (internalFormat) {
case GL_SRGB_EXT:

View File

@@ -1223,7 +1223,7 @@ _mesa_MultiDrawArrays( GLenum mode, const GLint *first,
for (i = 0; i < primcount; i++) {
if (count[i] > 0) {
CALL_DrawArrays(ctx->Exec, (mode, first[i], count[i]));
CALL_DrawArrays(ctx->CurrentDispatch, (mode, first[i], count[i]));
}
}
}
@@ -1243,7 +1243,7 @@ _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
for ( i = 0 ; i < primcount ; i++ ) {
if ( count[i] > 0 ) {
GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
CALL_DrawArrays(ctx->Exec, ( m, first[i], count[i] ));
CALL_DrawArrays(ctx->CurrentDispatch, ( m, first[i], count[i] ));
}
}
}
@@ -1265,7 +1265,8 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
for ( i = 0 ; i < primcount ; i++ ) {
if ( count[i] > 0 ) {
GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
CALL_DrawElements(ctx->Exec, ( m, count[i], type, indices[i] ));
CALL_DrawElements(ctx->CurrentDispatch, ( m, count[i], type,
indices[i] ));
}
}
}

View File

@@ -198,6 +198,16 @@ st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj,
if (!stObj->sampler_view) {
stObj->sampler_view =
st_create_texture_sampler_view_from_stobj(pipe, stObj, samp, format);
} else if (stObj->sampler_view->context != pipe) {
/* Recreate view in correct context, use existing view as template */
/* XXX: This isn't optimal, we should try to use more than one view.
Otherwise we create/destroy the view all the time
*/
struct pipe_sampler_view *sv =
pipe->create_sampler_view(pipe, stObj->pt, stObj->sampler_view);
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
stObj->sampler_view = sv;
}
return stObj->sampler_view;

View File

@@ -141,7 +141,13 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
stq->pq = pipe->create_query(pipe, type);
stq->type = type;
}
pipe->begin_query(pipe, stq->pq);
if (stq->pq) {
pipe->begin_query(pipe, stq->pq);
}
else {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery");
return;
}
}
assert(stq->type == type);
}
@@ -162,7 +168,8 @@ st_EndQuery(struct gl_context *ctx, struct gl_query_object *q)
stq->type = PIPE_QUERY_TIMESTAMP;
}
pipe->end_query(pipe, stq->pq);
if (stq->pq)
pipe->end_query(pipe, stq->pq);
}
@@ -171,6 +178,13 @@ get_query_result(struct pipe_context *pipe,
struct st_query_object *stq,
boolean wait)
{
if (!stq->pq) {
/* Only needed in case we failed to allocate the gallium query earlier.
* Return TRUE so we don't spin on this forever.
*/
return TRUE;
}
if (!pipe->get_query_result(pipe,
stq->pq,
wait,

View File

@@ -33,6 +33,7 @@
#include "main/shaderobj.h"
#include "main/version.h"
#include "main/vtxfmt.h"
#include "main/hash.h"
#include "program/prog_cache.h"
#include "vbo/vbo.h"
#include "glapi/glapi.h"
@@ -66,6 +67,7 @@
#include "st_gen_mipmap.h"
#include "st_program.h"
#include "st_vdpau.h"
#include "st_texture.h"
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_upload_mgr.h"
@@ -280,6 +282,19 @@ static void st_destroy_context_priv( struct st_context *st )
free( st );
}
/**
* Callback to release the sampler view attached to a texture object.
* Called by _mesa_HashWalk().
*/
static void
destroy_tex_sampler_cb(GLuint id, void *data, void *userData)
{
struct gl_texture_object *texObj = (struct gl_texture_object *) data;
struct st_context *st = (struct st_context *) userData;
st_texture_release_sampler_view(st, st_texture_object(texObj));
}
void st_destroy_context( struct st_context *st )
{
@@ -288,6 +303,8 @@ void st_destroy_context( struct st_context *st )
struct gl_context *ctx = st->ctx;
GLuint i;
_mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st);
/* need to unbind and destroy CSO objects before anything else */
cso_release_all(st->cso_context);

View File

@@ -412,3 +412,10 @@ st_create_color_map_texture(struct gl_context *ctx)
return pt;
}
void
st_texture_release_sampler_view(struct st_context *st,
struct st_texture_object *stObj)
{
if (stObj->sampler_view && stObj->sampler_view->context == st->pipe)
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
}

View File

@@ -221,4 +221,8 @@ st_texture_image_copy(struct pipe_context *pipe,
extern struct pipe_resource *
st_create_color_map_texture(struct gl_context *ctx);
extern void
st_texture_release_sampler_view(struct st_context *st,
struct st_texture_object *stObj);
#endif