VERSION | 2 debian/changelog | 9 debian/control | 1 docs/relnotes/11.0.2.html | 3 docs/relnotes/11.0.3.html | 184 +++++++++++++++++++ src/egl/drivers/dri2/egl_dri2.c | 11 - src/egl/main/eglcontext.c | 49 ++++- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 37 +++ src/gallium/auxiliary/gallivm/lp_bld_misc.h | 2 src/gallium/auxiliary/util/u_blitter.c | 6 src/gallium/drivers/nouveau/nouveau_buffer.c | 12 - src/gallium/drivers/nouveau/nouveau_fence.c | 8 src/gallium/drivers/nouveau/nouveau_fence.h | 3 src/gallium/drivers/nouveau/nv30/nv30_format.c | 24 +- src/gallium/drivers/nouveau/nv30/nv30_miptree.c | 9 src/gallium/drivers/nouveau/nv30/nv30_vbo.c | 4 src/gallium/drivers/nouveau/nv50/nv50_miptree.c | 5 src/gallium/drivers/nouveau/nv50/nv50_transfer.c | 7 src/gallium/drivers/nouveau/nvc0/nvc0_transfer.c | 7 src/gallium/drivers/radeon/r600_buffer_common.c | 7 src/gallium/drivers/radeon/r600_pipe_common.c | 3 src/gallium/drivers/radeon/r600_texture.c | 5 src/gallium/drivers/radeon/radeon_llvm_emit.c | 27 +- src/gallium/drivers/radeon/radeon_vce_40_2_2.c | 3 src/gallium/drivers/radeonsi/si_descriptors.c | 8 src/gallium/drivers/radeonsi/si_pipe.c | 2 src/gallium/drivers/radeonsi/si_shader.c | 5 src/gallium/drivers/radeonsi/si_state.h | 2 src/gallium/drivers/radeonsi/si_state_draw.c | 10 - src/gallium/drivers/radeonsi/si_state_shaders.c | 173 +++++++++++++---- src/gallium/state_trackers/dri/dri2.c | 33 +-- src/gallium/state_trackers/dri/dri_drawable.c | 8 src/gallium/targets/opencl/Makefile.am | 3 src/glx/Makefile.am | 1 src/glx/dri_common.c | 6 src/glx/glxcmds.c | 4 src/glx/glxextensions.h | 10 - src/mapi/mapi_glapi.c | 2 src/mesa/drivers/common/meta_blit.c | 35 ++- src/mesa/drivers/dri/i915/i830_context.h | 8 src/mesa/drivers/dri/i915/i915_context.h | 14 - src/mesa/drivers/dri/i915/i915_fragprog.c | 83 ++++++-- src/mesa/drivers/dri/i915/intel_fbo.c | 5 src/mesa/drivers/dri/i965/brw_context.c | 1 src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp | 42 +++- src/mesa/main/ffvertex_prog.c | 17 + src/mesa/main/glformats.c | 21 +- src/mesa/main/mipmap.c | 36 +-- src/mesa/state_tracker/st_cb_blit.c | 2 src/mesa/state_tracker/st_format.c | 6 50 files changed, 765 insertions(+), 200 deletions(-)
New commits: commit 72a3d38953bd72febf72f1d89e88a3af1109e18d Author: Andreas Boll <[email protected]> Date: Mon Oct 12 15:36:15 2015 +0200 control: Add libclc-amdgcn to mesa-opencl-icd depends. diff --git a/debian/changelog b/debian/changelog index ee2cb37..c660bdb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ mesa (11.0.3-1) UNRELEASED; urgency=medium * New upstream release. * Cherry-pick commit 70e91d6 (i965: Remove early release of DRI2 miptree) from upstream (Closes: #769518). + * control: Add libclc-amdgcn to mesa-opencl-icd depends. -- Andreas Boll <[email protected]> Mon, 12 Oct 2015 14:52:29 +0200 diff --git a/debian/control b/debian/control index 3186726..b244433 100644 --- a/debian/control +++ b/debian/control @@ -627,6 +627,7 @@ Section: libs Architecture: amd64 i386 armhf Depends: libclc-r600 (>= 0.2.0+git20150813), + libclc-amdgcn, ocl-icd-libopencl1 | libopencl1, ${shlibs:Depends}, ${misc:Depends}, commit f937824fa18bd725c4a841af15555b1a93af0837 Author: Andreas Boll <[email protected]> Date: Mon Oct 12 15:28:16 2015 +0200 Document the cherry-pick. Closes: #769518 diff --git a/debian/changelog b/debian/changelog index cac18ba..ee2cb37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ mesa (11.0.3-1) UNRELEASED; urgency=medium * New upstream release. + * Cherry-pick commit 70e91d6 (i965: Remove early release of DRI2 + miptree) from upstream (Closes: #769518). -- Andreas Boll <[email protected]> Mon, 12 Oct 2015 14:52:29 +0200 commit 427790521f4e0f9581c42907cca5a42223f27681 Author: Chris Wilson <[email protected]> Date: Fri Aug 7 21:13:12 2015 +0100 i965: Remove early release of DRI2 miptree intel_update_winsys_renderbuffer_miptree() will release the existing miptree when wrapping a new DRI2 buffer, so we can remove the early release and so prevent a NULL mt dereference should importing the new DRI2 name fail for any reason. (Reusing the old DRI2 name will result in the rendering going astray, to a stale buffer, and not shown on the screen, but it allows us to issue a warning and not crash much later in innocent code.) Signed-off-by: Chris Wilson <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86281 Reviewed-by: Martin Peres <[email protected]> Reviewed-by: Chad Versace <[email protected]> (cherry picked from commit 70e91d61fde239e8ae58148cacd4ff891126e2aa) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 7c1c133..f59e474 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -1412,7 +1412,6 @@ intel_process_dri2_buffer(struct brw_context *brw, buffer->cpp, buffer->pitch); } - intel_miptree_release(&rb->mt); bo = drm_intel_bo_gem_create_from_name(brw->bufmgr, buffer_name, buffer->name); if (!bo) { commit eec9bcc7f60ede8491c220a32f6c3c7834675654 Author: Andreas Boll <[email protected]> Date: Mon Oct 12 14:53:18 2015 +0200 Bump changelog diff --git a/debian/changelog b/debian/changelog index 54174db..cac18ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mesa (11.0.3-1) UNRELEASED; urgency=medium + + * New upstream release. + + -- Andreas Boll <[email protected]> Mon, 12 Oct 2015 14:52:29 +0200 + mesa (11.0.2-1) experimental; urgency=medium [ Andreas Boll ] commit 914966befcd57764941405707d8f57d3e7e7f768 Author: Emil Velikov <[email protected]> Date: Sat Oct 10 16:21:58 2015 +0100 docs: add release notes for 11.0.3 Signed-off-by: Emil Velikov <[email protected]> diff --git a/docs/relnotes/11.0.3.html b/docs/relnotes/11.0.3.html new file mode 100644 index 0000000..25fad25 --- /dev/null +++ b/docs/relnotes/11.0.3.html @@ -0,0 +1,184 @@ +<!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 11.0.3 Release Notes / October 10, 2015</h1> + +<p> +Mesa 11.0.3 is a bug fix release which fixes bugs found since the 11.0.2 release. +</p> +<p> +Mesa 11.0.3 implements the OpenGL 4.1 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 4.1. OpenGL +4.1 is <strong>only</strong> available if requested at context creation +because compatibility contexts are not supported. +</p> + + +<h2>SHA256 checksums</h2> +<pre> +TBD +</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=55552">Bug 55552</a> - Compile errors with --enable-mangling</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71789">Bug 71789</a> - [r300g] Visuals not found in (default) depth = 24</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91044">Bug 91044</a> - piglit spec/egl_khr_create_context/valid debug flag gles* fail</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91342">Bug 91342</a> - Very dark textures on some objects in indoors environments in Postal 2</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91596">Bug 91596</a> - EGL_KHR_gl_colorspace (v2) causes problem with Android-x86 GUI</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91718">Bug 91718</a> - piglit.spec.arb_shader_image_load_store.invalid causes intermittent GPU HANG</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92072">Bug 92072</a> - Wine breakage since d082c5324 (st/mesa: don't call st_validate_state in BlitFramebuffer)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92265">Bug 92265</a> - Black windows in weston after update mesa to 11.0.2-1</li> + +</ul> + + +<h2>Changes</h2> + +<p>Brian Paul (1):</p> +<ul> + <li>st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats</li> +</ul> + +<p>Daniel Scharrer (1):</p> +<ul> + <li>mesa: Add abs input modifier to base for POW in ffvertex_prog</li> +</ul> + +<p>Emil Velikov (3):</p> +<ul> + <li>docs: add sha256 checksums for 11.0.2</li> + <li>Revert "nouveau: make sure there's always room to emit a fence"</li> + <li>Update version to 11.0.3</li> +</ul> + +<p>Francisco Jerez (1):</p> +<ul> + <li>i965/fs: Fix hang on IVB and VLV with image format mismatch.</li> +</ul> + +<p>Ian Romanick (1):</p> +<ul> + <li>meta: Handle array textures in scaled MSAA blits</li> +</ul> + +<p>Ilia Mirkin (6):</p> +<ul> + <li>nouveau: be more careful about freeing temporary transfer buffers</li> + <li>nouveau: delay deleting buffer with unflushed fence</li> + <li>nouveau: wait to unref the transfer's bo until it's no longer used</li> + <li>nv30: pretend to have packed texture/surface formats</li> + <li>nv30: always go through translate module on big-endian</li> + <li>nouveau: make sure there's always room to emit a fence</li> +</ul> + +<p>Jason Ekstrand (1):</p> +<ul> + <li>mesa: Correctly handle GL_BGRA_EXT in ES3 format_and_type checks</li> +</ul> + +<p>Kyle Brenneman (3):</p> +<ul> + <li>glx: Fix build errors with --enable-mangling (v2)</li> + <li>mapi: Make _glapi_get_stub work with "gl" or "mgl" prefix.</li> + <li>glx: Don't hard-code the name "libGL.so.1" in driOpenDriver (v3)</li> +</ul> + +<p>Leo Liu (1):</p> +<ul> + <li>radeon/vce: fix vui time_scale zero error</li> +</ul> + +<p>Marek Olšák (21):</p> +<ul> + <li>st/mesa: fix front buffer regression after dropping st_validate_state in Blit</li> + <li>radeonsi: handle index buffer alloc failures</li> + <li>radeonsi: handle constant buffer alloc failures</li> + <li>gallium/radeon: handle buffer_map staging buffer failures better</li> + <li>gallium/radeon: handle buffer alloc failures in r600_draw_rectangle</li> + <li>gallium/radeon: add a fail path for depth MSAA texture readback</li> + <li>radeonsi: report alloc failure from si_shader_binary_read</li> + <li>radeonsi: add malloc fail paths to si_create_shader_state</li> + <li>radeonsi: skip drawing if the tess factor ring allocation fails</li> + <li>radeonsi: skip drawing if GS ring allocations fail</li> + <li>radeonsi: handle shader precompile failures</li> + <li>radeonsi: handle fixed-func TCS shader create failure</li> + <li>radeonsi: skip drawing if VS, TCS, TES, GS fail to compile or upload</li> + <li>radeonsi: skip drawing if PS fails to compile or upload</li> + <li>radeonsi: skip drawing if updating the scratch buffer fails</li> + <li>radeonsi: don't forget to update scratch relocations for LS, HS, ES shaders</li> + <li>radeonsi: handle dummy constant buffer allocation failure</li> + <li>gallium/u_blitter: handle allocation failures</li> + <li>radeonsi: add scratch buffer to the buffer list when it's re-allocated</li> + <li>st/dri: don't use _ctx in client_wait_sync</li> + <li>egl/dri2: don't require a context for ClientWaitSync (v2)</li> +</ul> + +<p>Matthew Waters (1):</p> +<ul> + <li>egl: rework handling EGL_CONTEXT_FLAGS</li> +</ul> + +<p>Michel Dänzer (1):</p> +<ul> + <li>st/dri: Use packed RGB formats</li> +</ul> + +<p>Roland Scheidegger (1):</p> +<ul> + <li>mesa: fix mipmap generation for immutable, compressed textures</li> +</ul> + +<p>Tom Stellard (3):</p> +<ul> + <li>gallium/radeon: Use call_once() when initailizing LLVM targets</li> + <li>gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2</li> + <li>radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2</li> +</ul> + +<p>Varad Gautam (1):</p> +<ul> + <li>egl: restore surface type before linking config to its display</li> +</ul> + +<p>Ville Syrjälä (3):</p> +<ul> + <li>i830: Fix collision between I830_UPLOAD_RASTER_RULES and I830_UPLOAD_TEX(0)</li> + <li>i915: Fix texcoord vs. varying collision in fragment programs</li> + <li>i915: Remember to call intel_prepare_render() before blitting</li> +</ul> + + +</div> +</body> +</html> commit 3c86315ca39831a7890708dec2ebbde68ed430db Author: Emil Velikov <[email protected]> Date: Sat Oct 10 16:17:43 2015 +0100 Update version to 11.0.3 Signed-off-by: Emil Velikov <[email protected]> diff --git a/VERSION b/VERSION index a1ea332..e7e9473 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.0.2 +11.0.3 commit d0c22560a151a1ea726df4a6e001048a7c5b225e Author: Emil Velikov <[email protected]> Date: Sat Oct 10 16:15:08 2015 +0100 Revert "nouveau: make sure there's always room to emit a fence" This reverts commit 30570b262971c881366deab58caf8d8d48d7d79d. As mentioned by Ilia Mirkin: Please remove this one from your list of cherry-picked patches. While it fixes real issues on nv30 (and probably the other generations too), it appears to introduce some new ones on nvc0. I've figured out what's causing it, but haven't figured out a proper fix. Not sure I'll be able to before you do a release. diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h index a44fd3e..389a229 100644 --- a/src/gallium/drivers/nouveau/nouveau_winsys.h +++ b/src/gallium/drivers/nouveau/nouveau_winsys.h @@ -24,8 +24,6 @@ PUSH_AVAIL(struct nouveau_pushbuf *push) static inline bool PUSH_SPACE(struct nouveau_pushbuf *push, uint32_t size) { - /* Provide a buffer so that fences always have room to be emitted */ - size += 8; if (PUSH_AVAIL(push) < size) return nouveau_pushbuf_space(push, size, 0, 0) == 0; return true; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 0aea4c0..efa3a59 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -345,9 +345,7 @@ nv30_screen_fence_emit(struct pipe_screen *pscreen, uint32_t *sequence) *sequence = ++screen->base.fence.sequence; - assert(PUSH_AVAIL(push) >= 3); - PUSH_DATA (push, NV30_3D_FENCE_OFFSET | - (2 /* size */ << 18) | (7 /* subchan */ << 13)); + BEGIN_NV04(push, NV30_3D(FENCE_OFFSET), 2); PUSH_DATA (push, 0); PUSH_DATA (push, *sequence); } diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 1cc16b6..6d015c4 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -386,7 +386,6 @@ nv50_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence) /* we need to do it after possible flush in MARK_RING */ *sequence = ++screen->base.fence.sequence; - assert(PUSH_AVAIL(push) >= 5); PUSH_DATA (push, NV50_FIFO_PKHDR(NV50_3D(QUERY_ADDRESS_HIGH), 4)); PUSH_DATAh(push, screen->fence.bo->offset); PUSH_DATA (push, screen->fence.bo->offset); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 51aaf7a..3fb4d8c 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -535,8 +535,7 @@ nvc0_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence) /* we need to do it after possible flush in MARK_RING */ *sequence = ++screen->base.fence.sequence; - assert(PUSH_AVAIL(push) >= 5); - PUSH_DATA (push, NVC0_FIFO_PKHDR_SQ(NVC0_3D(QUERY_ADDRESS_HIGH), 4)); + BEGIN_NVC0(push, NVC0_3D(QUERY_ADDRESS_HIGH), 4); PUSH_DATAh(push, screen->fence.bo->offset); PUSH_DATA (push, screen->fence.bo->offset); PUSH_DATA (push, *sequence); commit 1a866b3e49d05555c9f06c5d06142163fb214d5b Author: Jason Ekstrand <[email protected]> Date: Wed Oct 7 15:52:09 2015 -0700 mesa: Correctly handle GL_BGRA_EXT in ES3 format_and_type checks The EXT_texture_format_BGRA8888 extension (which mesa supports unconditionally) adds a new format and internal format called GL_BGRA_EXT. Previously, this was not really handled at all in _mesa_ex3_error_check_format_and_type. When the checks were tightened in commit f15a7f3c, we accidentally tightened things too far and GL_BGRA_EXT would always cause an error to be thrown. There were two primary issues here. First, is that _mesa_es3_effective_internal_format_for_format_and_type didn't handle the GL_BGRA_EXT format. Second is that it blindly uses _mesa_base_tex_format which returns GL_RGBA for GL_BGRA_EXT. This commit fixes both of these issues as well as adds explicit checks that GL_BGRA_EXT is only ever used with GL_BGRA_EXT and GL_UNSIGNED_BYTE. Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92265 Reviewed-by: Ian Romanick <[email protected]> Cc: "11.0" <[email protected]> (cherry picked from commit 6ad9ebb073fc4ed245ef8e9db4479a52e818cb92) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index d7cad31..629a0a4 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2619,6 +2619,7 @@ _mesa_es3_effective_internal_format_for_format_and_type(GLenum format, * internal formats, they do not correspond to GL constants, so the base * format is returned instead. */ + case GL_BGRA_EXT: case GL_LUMINANCE_ALPHA: case GL_LUMINANCE: case GL_ALPHA: @@ -2738,8 +2739,19 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, if (effectiveInternalFormat == GL_NONE) return GL_INVALID_OPERATION; - GLenum baseInternalFormat = - _mesa_base_tex_format(ctx, effectiveInternalFormat); + GLenum baseInternalFormat; + if (internalFormat == GL_BGRA_EXT) { + /* Unfortunately, _mesa_base_tex_format returns a base format of + * GL_RGBA for GL_BGRA_EXT. This makes perfect sense if you're + * asking the question, "what channels does this format have?" + * However, if we're trying to determine if two internal formats + * match in the ES3 sense, we actually want GL_BGRA. + */ + baseInternalFormat = GL_BGRA_EXT; + } else { + baseInternalFormat = + _mesa_base_tex_format(ctx, effectiveInternalFormat); + } if (internalFormat != baseInternalFormat) return GL_INVALID_OPERATION; @@ -2748,6 +2760,11 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, } switch (format) { + case GL_BGRA_EXT: + if (type != GL_UNSIGNED_BYTE || internalFormat != GL_BGRA) + return GL_INVALID_OPERATION; + break; + case GL_RGBA: switch (type) { case GL_UNSIGNED_BYTE: commit b1230e3e01f1b861ab374f7b115c1f7e4bfd0370 Author: Michel Dänzer <[email protected]> Date: Mon Aug 10 18:44:18 2015 +0900 st/dri: Use packed RGB formats Fixes Gallium based DRI drivers failing to load on big endian hosts because they can't find any matching fbconfigs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71789 Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Ilia Mirkin <[email protected]> (cherry picked from commit 87c3c9acd29655d6c8778ea732f559eebeddd5f6) Nominated-by: Ilia Mirkin <[email protected]> diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 712203b..019414b 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -188,10 +188,10 @@ dri2_drawable_get_buffers(struct dri_drawable *drawable, * may occur as the stvis->color_format. */ switch(format) { - case PIPE_FORMAT_B8G8R8A8_UNORM: + case PIPE_FORMAT_BGRA8888_UNORM: depth = 32; break; - case PIPE_FORMAT_B8G8R8X8_UNORM: + case PIPE_FORMAT_BGRX8888_UNORM: depth = 24; break; case PIPE_FORMAT_B5G6R5_UNORM: @@ -261,13 +261,13 @@ dri_image_drawable_get_buffers(struct dri_drawable *drawable, case PIPE_FORMAT_B5G6R5_UNORM: image_format = __DRI_IMAGE_FORMAT_RGB565; break; - case PIPE_FORMAT_B8G8R8X8_UNORM: + case PIPE_FORMAT_BGRX8888_UNORM: image_format = __DRI_IMAGE_FORMAT_XRGB8888; break; - case PIPE_FORMAT_B8G8R8A8_UNORM: + case PIPE_FORMAT_BGRA8888_UNORM: image_format = __DRI_IMAGE_FORMAT_ARGB8888; break; - case PIPE_FORMAT_R8G8B8A8_UNORM: + case PIPE_FORMAT_RGBA8888_UNORM: image_format = __DRI_IMAGE_FORMAT_ABGR8888; break; default: @@ -314,10 +314,10 @@ dri2_allocate_buffer(__DRIscreen *sPriv, switch (format) { case 32: - pf = PIPE_FORMAT_B8G8R8A8_UNORM; + pf = PIPE_FORMAT_BGRA8888_UNORM; break; case 24: - pf = PIPE_FORMAT_B8G8R8X8_UNORM; + pf = PIPE_FORMAT_BGRX8888_UNORM; break; case 16: pf = PIPE_FORMAT_Z16_UNORM; @@ -724,13 +724,13 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, pf = PIPE_FORMAT_B5G6R5_UNORM; break; case __DRI_IMAGE_FORMAT_XRGB8888: - pf = PIPE_FORMAT_B8G8R8X8_UNORM; + pf = PIPE_FORMAT_BGRX8888_UNORM; break; case __DRI_IMAGE_FORMAT_ARGB8888: - pf = PIPE_FORMAT_B8G8R8A8_UNORM; + pf = PIPE_FORMAT_BGRA8888_UNORM; break; case __DRI_IMAGE_FORMAT_ABGR8888: - pf = PIPE_FORMAT_R8G8B8A8_UNORM; + pf = PIPE_FORMAT_RGBA8888_UNORM; break; default: pf = PIPE_FORMAT_NONE; @@ -845,13 +845,13 @@ dri2_create_image(__DRIscreen *_screen, pf = PIPE_FORMAT_B5G6R5_UNORM; break; case __DRI_IMAGE_FORMAT_XRGB8888: - pf = PIPE_FORMAT_B8G8R8X8_UNORM; + pf = PIPE_FORMAT_BGRX8888_UNORM; break; case __DRI_IMAGE_FORMAT_ARGB8888: - pf = PIPE_FORMAT_B8G8R8A8_UNORM; + pf = PIPE_FORMAT_BGRA8888_UNORM; break; case __DRI_IMAGE_FORMAT_ABGR8888: - pf = PIPE_FORMAT_R8G8B8A8_UNORM; + pf = PIPE_FORMAT_RGBA8888_UNORM; break; default: pf = PIPE_FORMAT_NONE; diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 0d2929a..f0cc4a2 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -231,11 +231,11 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target, if (format == __DRI_TEXTURE_FORMAT_RGB) { /* only need to cover the formats recognized by dri_fill_st_visual */ switch (internal_format) { - case PIPE_FORMAT_B8G8R8A8_UNORM: - internal_format = PIPE_FORMAT_B8G8R8X8_UNORM; + case PIPE_FORMAT_BGRA8888_UNORM: + internal_format = PIPE_FORMAT_BGRX8888_UNORM; break; - case PIPE_FORMAT_A8R8G8B8_UNORM: - internal_format = PIPE_FORMAT_X8R8G8B8_UNORM; + case PIPE_FORMAT_ARGB8888_UNORM: + internal_format = PIPE_FORMAT_XRGB8888_UNORM; break; default: break; commit d09b37e7d538974a2104c4d7b3110e61de7d489b Author: Varad Gautam <[email protected]> Date: Wed Oct 7 09:48:14 2015 +0530 egl: restore surface type before linking config to its display commit c2c2e9a (egl: implement EGL_KHR_gl_colorspace (v2)) leaves _EGLConfig->SurfaceType set incorrectly before calling _eglLinkConfig(), and the bad value is passed around to platform_android. set it to zero as earlier. v2: Set SurfaceType to 0, rather than surface_type (Suggested by Emil) Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91596 Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit f988eff37991272b3e685112136a8b2ae06386bf) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 7877178..10b4342 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -312,6 +312,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, else conf->dri_single_config = dri_config; } + + conf->base.SurfaceType = 0; conf->base.ConfigID = config_id; _eglLinkConfig(&conf->base); commit 30570b262971c881366deab58caf8d8d48d7d79d Author: Ilia Mirkin <[email protected]> Date: Mon Oct 5 15:19:05 2015 -0400 nouveau: make sure there's always room to emit a fence I started seeing a lot of situations on nv30 where fence emission wouldn't fit into the previous buffer (causing assertions). This ensures that whenever checking for space, we always leave a bit of extra room for the fence emission commands. Adjusts the nv30 and nvc0 fence emission logic to bypass the space checking as well. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] Reviewed-by: Samuel Pitoiset <[email protected]> (cherry picked from commit 47d11990b2ca3eb666b8ac81fee7f7eb5019eba1) diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h index 389a229..a44fd3e 100644 --- a/src/gallium/drivers/nouveau/nouveau_winsys.h +++ b/src/gallium/drivers/nouveau/nouveau_winsys.h @@ -24,6 +24,8 @@ PUSH_AVAIL(struct nouveau_pushbuf *push) static inline bool PUSH_SPACE(struct nouveau_pushbuf *push, uint32_t size) { + /* Provide a buffer so that fences always have room to be emitted */ + size += 8; if (PUSH_AVAIL(push) < size) return nouveau_pushbuf_space(push, size, 0, 0) == 0; return true; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index efa3a59..0aea4c0 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -345,7 +345,9 @@ nv30_screen_fence_emit(struct pipe_screen *pscreen, uint32_t *sequence) *sequence = ++screen->base.fence.sequence; - BEGIN_NV04(push, NV30_3D(FENCE_OFFSET), 2); + assert(PUSH_AVAIL(push) >= 3); + PUSH_DATA (push, NV30_3D_FENCE_OFFSET | + (2 /* size */ << 18) | (7 /* subchan */ << 13)); PUSH_DATA (push, 0); PUSH_DATA (push, *sequence); } diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 6d015c4..1cc16b6 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -386,6 +386,7 @@ nv50_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence) /* we need to do it after possible flush in MARK_RING */ *sequence = ++screen->base.fence.sequence; + assert(PUSH_AVAIL(push) >= 5); PUSH_DATA (push, NV50_FIFO_PKHDR(NV50_3D(QUERY_ADDRESS_HIGH), 4)); PUSH_DATAh(push, screen->fence.bo->offset); PUSH_DATA (push, screen->fence.bo->offset); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 3fb4d8c..51aaf7a 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -535,7 +535,8 @@ nvc0_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence) /* we need to do it after possible flush in MARK_RING */ *sequence = ++screen->base.fence.sequence; - BEGIN_NVC0(push, NVC0_3D(QUERY_ADDRESS_HIGH), 4); + assert(PUSH_AVAIL(push) >= 5); + PUSH_DATA (push, NVC0_FIFO_PKHDR_SQ(NVC0_3D(QUERY_ADDRESS_HIGH), 4)); PUSH_DATAh(push, screen->fence.bo->offset); PUSH_DATA (push, screen->fence.bo->offset); PUSH_DATA (push, *sequence); commit f114967ca9725152288bb648cedceb860d7d06c0 Author: Ilia Mirkin <[email protected]> Date: Sun Oct 4 21:47:33 2015 -0400 nv30: always go through translate module on big-endian It seems like things are either coming in slighly wrong, or perhaps uploaded incorrectly, but either way passing them through the translate module seems to fix everything. Eventually we should figure out what's going wrong and fix it "for real", but this should do for now. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 78ec9e28ec759bcaf9781bcbd2b8e051f7df7896) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c index 8494549..dec3a0b 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c @@ -191,7 +191,11 @@ nv30_vbo_validate(struct nv30_context *nv30) if (!nv30->vertex || nv30->draw_flags) return; +#ifdef PIPE_ARCH_BIG_ENDIAN + if (1) { /* Figure out where the buffers are getting messed up */ +#else if (unlikely(vertex->need_conversion)) { +#endif nv30->vbo_fifo = ~0; nv30->vbo_user = 0; } else { commit 39a3871b1ef0676ad1e91855124161fafac8d57d Author: Ilia Mirkin <[email protected]> Date: Sun Oct 4 21:45:51 2015 -0400 nv30: pretend to have packed texture/surface formats This puts us in line with what the DDX/DRI2 st are expecting. It also happens to work... no idea why, but seems better to have it work than to ask lots of questions. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 1fec05d1142921cdb5b01d94d886062c57905edc) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_format.c b/src/gallium/drivers/nouveau/nv30/nv30_format.c index 67e0d5e..8d9516b 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_format.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_format.c @@ -78,12 +78,12 @@ nv30_format_info_table[PIPE_FORMAT_COUNT] = { _(B4G4R4X4_UNORM , S___), _(B4G4R4A4_UNORM , S___), _(B5G6R5_UNORM , SB__), - _(B8G8R8X8_UNORM , SB__), - _(B8G8R8X8_SRGB , S___), - _(B8G8R8A8_UNORM , SB__), - _(B8G8R8A8_SRGB , S___), + _(BGRX8888_UNORM , SB__), + _(BGRX8888_SRGB , S___), + _(BGRA8888_UNORM , SB__), + _(BGRA8888_SRGB , S___), _(R8G8B8A8_UNORM , __V_), - _(R8G8B8A8_SNORM , S___), + _(RGBA8888_SNORM , S___), _(DXT1_RGB , S___), _(DXT1_SRGB , S___), _(DXT1_RGBA , S___), @@ -138,8 +138,8 @@ const struct nv30_format nv30_format_table[PIPE_FORMAT_COUNT] = { R_(B5G5R5X1_UNORM , X1R5G5B5 ), R_(B5G6R5_UNORM , R5G6B5 ), - R_(B8G8R8X8_UNORM , X8R8G8B8 ), - R_(B8G8R8A8_UNORM , A8R8G8B8 ), + R_(BGRX8888_UNORM , X8R8G8B8 ), + R_(BGRA8888_UNORM , A8R8G8B8 ), Z_(Z16_UNORM , Z16 ), Z_(X8Z24_UNORM , Z24S8 ), Z_(S8_UINT_Z24_UNORM , Z24S8 ), @@ -223,11 +223,11 @@ nv30_texfmt_table[PIPE_FORMAT_COUNT] = { _(B4G4R4X4_UNORM , A4R4G4B4, 0, C, C, C, 1, 2, 1, 0, x, NONE, ____), _(B4G4R4A4_UNORM , A4R4G4B4, 0, C, C, C, C, 2, 1, 0, 3, NONE, ____), _(B5G6R5_UNORM , R5G6B5 , 0, C, C, C, 1, 2, 1, 0, x, NONE, ____), - _(B8G8R8X8_UNORM , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, NONE, ____), - _(B8G8R8X8_SRGB , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, SRGB, ____), - _(B8G8R8A8_UNORM , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, NONE, ____), - _(B8G8R8A8_SRGB , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, SRGB, ____), - _(R8G8B8A8_SNORM , A8R8G8B8, 0, C, C, C, C, 0, 1, 2, 3, NONE, SSSS), + _(BGRX8888_UNORM , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, NONE, ____), + _(BGRX8888_SRGB , A8R8G8B8, 0, C, C, C, 1, 2, 1, 0, x, SRGB, ____), + _(BGRA8888_UNORM , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, NONE, ____), + _(BGRA8888_SRGB , A8R8G8B8, 0, C, C, C, C, 2, 1, 0, 3, SRGB, ____), + _(RGBA8888_SNORM , A8R8G8B8, 0, C, C, C, C, 0, 1, 2, 3, NONE, SSSS), _(DXT1_RGB , DXT1 , 0, C, C, C, 1, 2, 1, 0, x, NONE, ____), _(DXT1_SRGB , DXT1 , 0, C, C, C, 1, 2, 1, 0, x, SRGB, ____), _(DXT1_RGBA , DXT1 , 0, C, C, C, C, 2, 1, 0, 3, NONE, ____), commit 28373c75bac256a13b77faf6754a20414ec7d900 Author: Marek Olšák <[email protected]> Date: Fri Sep 25 22:48:00 2015 +0200 egl/dri2: don't require a context for ClientWaitSync (v2) The spec doesn't require it. This fixes a crash on Android. v2: don't set any flags if ctx == NULL v3: add the spec note Cc: 10.6 11.0 <[email protected]> Reviewed-by: Albert Freeman <[email protected]> Reviewed-by: Frank Binns <[email protected]> (cherry picked from commit 18123a732b8593bb7add03d1529ace464f46a7ac) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 461735f..7877178 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -2384,13 +2384,18 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, unsigned wait_flags = 0; EGLint ret = EGL_CONDITION_SATISFIED_KHR; - if (flags & EGL_SYNC_FLUSH_COMMANDS_BIT_KHR) + /* The EGL_KHR_fence_sync spec states: + * + * "If no context is current for the bound API, + * the EGL_SYNC_FLUSH_COMMANDS_BIT_KHR bit is ignored. + */ + if (dri2_ctx && flags & EGL_SYNC_FLUSH_COMMANDS_BIT_KHR) wait_flags |= __DRI2_FENCE_FLAG_FLUSH_COMMANDS; /* the sync object should take a reference while waiting */ dri2_egl_ref_sync(dri2_sync); - if (dri2_dpy->fence->client_wait_sync(dri2_ctx->dri_context, + if (dri2_dpy->fence->client_wait_sync(dri2_ctx ? dri2_ctx->dri_context : NULL, dri2_sync->fence, wait_flags, timeout)) dri2_sync->base.SyncStatus = EGL_SIGNALED_KHR; commit eabc65632491cdca7e22986604182ee94f3fc3ac Author: Marek Olšák <[email protected]> Date: Fri Sep 25 22:44:41 2015 +0200 st/dri: don't use _ctx in client_wait_sync Not needed and it can be NULL. v2: fix dri2_get_fence_from_cl_event - thanks Albert Cc: 10.6 11.0 <[email protected]> Reviewed-by: Albert Freeman <[email protected]> (cherry picked from commit b78336085bce4d1f36c8d9c72fd3fa41643e3cd1) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 91b4431..712203b 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1293,6 +1293,7 @@ dri2_load_opencl_interop(struct dri_screen *screen) } struct dri2_fence { + struct dri_screen *driscreen; struct pipe_fence_handle *pipe_fence; void *cl_event; }; @@ -1313,6 +1314,7 @@ dri2_create_fence(__DRIcontext *_ctx) return NULL; } + fence->driscreen = dri_screen(_ctx->driScreenPriv); return fence; } @@ -1336,6 +1338,7 @@ dri2_get_fence_from_cl_event(__DRIscreen *_screen, intptr_t cl_event) return NULL; } + fence->driscreen = driscreen; return fence; } @@ -1360,9 +1363,9 @@ static GLboolean dri2_client_wait_sync(__DRIcontext *_ctx, void *_fence, unsigned flags, uint64_t timeout) { - struct dri_screen *driscreen = dri_screen(_ctx->driScreenPriv); - struct pipe_screen *screen = driscreen->base.screen; struct dri2_fence *fence = (struct dri2_fence*)_fence; + struct dri_screen *driscreen = fence->driscreen; + struct pipe_screen *screen = driscreen->base.screen; /* No need to flush. The context was flushed when the fence was created. */ commit 1f2d007e49e743f475c13adfe02ffc86a14ebfae Author: Matthew Waters <[email protected]> Date: Mon Sep 14 18:35:45 2015 +0100 egl: rework handling EGL_CONTEXT_FLAGS As of version 15 of the EGL_KHR_create_context spec, debug contexts are allowed for ES contexts. We should allow creation instead of erroring. While we're here provide a more comprehensive checking for the other two flags - ROBUST_ACCESS_BIT_KHR and FORWARD_COMPATIBLE_BIT_KHR v2 [Emil Velikov] Rebase. Minor tweak in commit message. Cc: Boyan Ding <[email protected]> Cc: Chad Versace <[email protected]> Cc: "10.6 11.0" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91044 Signed-off-by: Matthew Waters <[email protected]> Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 11cabc45b7124e51d5ead42db6dceb5a3755266b) diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index 588f489..ae19862 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -152,12 +152,51 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy, /* The EGL_KHR_create_context spec says: * - * "Flags are only defined for OpenGL context creation, and - * specifying a flags value other than zero for other types of - * contexts, including OpenGL ES contexts, will generate an - * error." + * "If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in + * EGL_CONTEXT_FLAGS_KHR, then a <debug context> will be created. + * [...] + * In some cases a debug context may be identical to a non-debug + * context. This bit is supported for OpenGL and OpenGL ES + * contexts." + */ + if ((val & EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR) && + (api != EGL_OPENGL_API && api != EGL_OPENGL_ES_API)) { + err = EGL_BAD_ATTRIBUTE; + break; + } + + /* The EGL_KHR_create_context spec says: + * + * "If the EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR flag bit + * is set in EGL_CONTEXT_FLAGS_KHR, then a <forward-compatible> + * context will be created. Forward-compatible contexts are + * defined only for OpenGL versions 3.0 and later. They must not + * support functionality marked as <deprecated> by that version of + * the API, while a non-forward-compatible context must support + * all functionality in that version, deprecated or not. This bit + * is supported for OpenGL contexts, and requesting a + * forward-compatible context for OpenGL versions less than 3.0 + * will generate an error." + */ + if ((val & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) && + (api != EGL_OPENGL_API || ctx->ClientMajorVersion < 3)) { + err = EGL_BAD_ATTRIBUTE;

