Compare commits
32 Commits
mesa-10.0.
...
10.0
Author | SHA1 | Date | |
---|---|---|---|
|
0da7d59ac2 | ||
|
c941373838 | ||
|
c78a676998 | ||
|
5e718c11c6 | ||
|
b2f14a6284 | ||
|
498853b9fd | ||
|
45fd1d336a | ||
|
cbaaf8fe42 | ||
|
7b580a567f | ||
|
69a777dd21 | ||
|
76f33938dd | ||
|
68fef3983e | ||
|
5ab0f978b7 | ||
|
9cd2daa0ef | ||
|
15b2587334 | ||
|
6cc6c921b1 | ||
|
132df6a9a5 | ||
|
0c37a0b94d | ||
|
1184293f40 | ||
|
2bd3830197 | ||
|
f15356c70a | ||
|
40a05673a7 | ||
|
437f291d64 | ||
|
5c4f80dca6 | ||
|
860ee22480 | ||
|
5ad6062ee6 | ||
|
063f9c6aef | ||
|
6490bdf358 | ||
|
1062066fad | ||
|
fd5f0644af | ||
|
ef793cbf6d | ||
|
f6ce0eba76 |
@@ -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
|
||||
|
@@ -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.]))
|
||||
|
@@ -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
173
docs/relnotes/10.0.5.html
Normal 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 "SSE4.1 instruction set not enabled"</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 & paste bugs in pack_ubyte_SARGB8()</li>
|
||||
<li>mesa: fix copy & 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>
|
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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, ¤t);
|
||||
nouveau_fence_wait(current);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
|
||||
nouveau_object_del(&screen->query);
|
||||
|
@@ -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, ¤t);
|
||||
nouveau_fence_wait(current);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
if (screen->base.pushbuf)
|
||||
screen->base.pushbuf->user_priv = NULL;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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, ¤t);
|
||||
nouveau_fence_wait(current);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
if (screen->base.pushbuf)
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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. */
|
||||
|
@@ -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:
|
||||
|
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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",
|
||||
|
@@ -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 */
|
||||
|
@@ -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
|
||||
|
@@ -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 */
|
||||
|
@@ -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:
|
||||
|
@@ -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] ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user