VERSION | 2 bin/.cherry-ignore | 9 configure.ac | 56 +- debian/changelog | 38 + debian/control | 10 debian/patches/cso-fix-sampler-view-count.patch | 43 - debian/patches/egl-platform-mir.patch | 8 debian/patches/series | 3 debian/patches/svga-move-dirty-buffers.patch | 47 - debian/patches/svga-replace-sampler-assertion.patch | 96 --- docs/relnotes/10.1.1.html | 254 ++++++++++ docs/relnotes/10.1.2.html | 176 ++++++ include/c11/threads_posix.h | 2 include/c11/threads_win32.h | 38 + include/pci_ids/pci_id_driver_map.h | 81 --- scons/gallium.py | 5 src/egl/drivers/dri2/egl_dri2.c | 4 src/egl/drivers/dri2/platform_drm.c | 7 src/egl/drivers/dri2/platform_wayland.c | 2 src/gallium/auxiliary/cso_cache/cso_context.c | 7 src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 3 src/gallium/auxiliary/util/u_blitter.c | 2 src/gallium/auxiliary/util/u_gen_mipmap.c | 48 - src/gallium/auxiliary/util/u_math.h | 4 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 14 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2 src/gallium/drivers/nouveau/nouveau_vp3_video.c | 6 src/gallium/drivers/nouveau/nv30/nv30_screen.c | 14 src/gallium/drivers/nouveau/nv50/nv50_screen.c | 11 src/gallium/drivers/nouveau/nv50/nv50_state.c | 3 src/gallium/drivers/nouveau/nv50/nv50_surface.c | 12 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 9 src/gallium/drivers/r300/r300_blit.c | 4 src/gallium/drivers/r300/r300_context.h | 14 src/gallium/drivers/r300/r300_emit.c | 25 src/gallium/drivers/r300/r300_state.c | 46 + src/gallium/drivers/r600/evergreen_state.c | 82 +-- src/gallium/drivers/r600/evergreend.h | 3 src/gallium/drivers/r600/r600_blit.c | 12 src/gallium/drivers/r600/r600_hw_context.c | 13 src/gallium/drivers/r600/r600_pipe.c | 14 src/gallium/drivers/r600/r600_pipe.h | 36 + src/gallium/drivers/r600/r600_shader.c | 161 +++++- src/gallium/drivers/r600/r600_shader.h | 1 src/gallium/drivers/r600/r600_state.c | 72 +- src/gallium/drivers/r600/r600_state_common.c | 19 src/gallium/drivers/r600/r600d.h | 6 src/gallium/drivers/radeon/r600_texture.c | 6 src/gallium/drivers/radeonsi/si_pipe.c | 9 src/gallium/drivers/softpipe/sp_texture.c | 6 src/gallium/drivers/svga/svga_context.c | 4 src/gallium/drivers/svga/svga_state_fs.c | 36 + src/gallium/drivers/svga/svga_state_tss.c | 2 src/gallium/include/pipe/p_config.h | 10 src/gallium/state_trackers/osmesa/osmesa.c | 11 src/gallium/state_trackers/xa/xa_context.c | 18 src/gallium/state_trackers/xa/xa_renderer.c | 11 src/gallium/targets/haiku-softpipe/GalliumContext.cpp | 12 src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 3 src/gallium/winsys/svga/drm/vmw_screen.h | 4 src/gallium/winsys/svga/drm/vmw_screen_dri.c | 7 src/gallium/winsys/svga/drm/vmw_screen_ioctl.c | 76 ++ src/gallium/winsys/svga/drm/vmw_screen_pools.c | 18 src/gallium/winsys/svga/drm/vmwgfx_drm.h | 13 src/gbm/backends/dri/gbm_dri.c | 2 src/glsl/ast_to_hir.cpp | 120 +++- src/glsl/glsl_parser_extras.cpp | 56 +- src/glsl/glsl_parser_extras.h | 13 src/glsl/link_uniform_block_active_visitor.cpp | 8 src/glsl/link_uniform_block_active_visitor.h | 3 src/glsl/link_uniform_blocks.cpp | 14 src/glsl/link_uniform_initializers.cpp | 119 +++- src/glsl/linker.cpp | 169 ++++++ src/glsl/lower_ubo_reference.cpp | 10 src/glsl/opt_vectorize.cpp | 1 src/glx/dri2.h | 8 src/glx/dri2_glx.c | 20 src/glx/dri2_query_renderer.c | 43 + src/glx/dri3_glx.c | 10 src/glx/dri3_priv.h | 1 src/glx/glxext.c | 4 src/loader/Makefile.sources | 3 src/loader/loader.c | 11 src/loader/pci_id_driver_map.c | 55 ++ src/loader/pci_id_driver_map.h | 85 +++ src/mapi/u_thread.h | 18 src/mesa/drivers/dri/common/megadriver_stub.c | 4 src/mesa/drivers/dri/i965/brw_context.c | 12 src/mesa/drivers/dri/i965/brw_context.h | 12 src/mesa/drivers/dri/i965/brw_draw.c | 24 src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp | 8 src/mesa/drivers/dri/i965/brw_misc_state.c | 13 src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 21 src/mesa/drivers/dri/i965/gen7_sol_state.c | 21 src/mesa/drivers/dri/i965/intel_batchbuffer.c | 4 src/mesa/drivers/dri/i965/intel_extensions.c | 1 src/mesa/drivers/dri/i965/intel_fbo.c | 68 +- src/mesa/drivers/dri/i965/intel_fbo.h | 12 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 src/mesa/drivers/dri/i965/intel_pixel_read.c | 7 src/mesa/drivers/dri/i965/intel_screen.c | 13 src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 3 src/mesa/drivers/dri/nouveau/nouveau_texture.c | 1 src/mesa/main/bufferobj.c | 12 src/mesa/main/fbobject.c | 20 src/mesa/main/format_pack.c | 8 src/mesa/main/format_unpack.c | 113 ++++ src/mesa/main/format_unpack.h | 10 src/mesa/main/formats.c | 9 src/mesa/main/formats.h | 3 src/mesa/main/genmipmap.c | 4 src/mesa/main/get.c | 6 src/mesa/main/getstring.c | 2 src/mesa/main/glformats.c | 16 src/mesa/main/imports.h | 2 src/mesa/main/mipmap.c | 44 - src/mesa/main/mtypes.h | 15 src/mesa/main/shader_query.cpp | 71 ++ src/mesa/main/streaming-load-memcpy.c | 3 src/mesa/main/texcompress_etc.c | 78 ++- src/mesa/main/texgetimage.c | 23 src/mesa/main/teximage.c | 45 + src/mesa/main/texparam.c | 13 src/mesa/main/texstore.c | 14 src/mesa/main/varray.c | 21 src/mesa/main/varray.h | 16 src/mesa/state_tracker/st_atom.c | 9 src/mesa/state_tracker/st_atom_framebuffer.c | 6 src/mesa/state_tracker/st_atom_texture.c | 10 src/mesa/state_tracker/st_cb_queryobj.c | 18 src/mesa/state_tracker/st_context.c | 17 src/mesa/state_tracker/st_draw.c | 10 src/mesa/state_tracker/st_gen_mipmap.c | 3 src/mesa/state_tracker/st_manager.c | 7 src/mesa/state_tracker/st_program.c | 4 src/mesa/state_tracker/st_texture.c | 7 src/mesa/state_tracker/st_texture.h | 4 src/mesa/swrast/s_blit.c | 8 src/mesa/swrast/s_texture.c | 10 src/mesa/swrast_setup/ss_context.c | 3 src/mesa/vbo/vbo_attrib_tmp.h | 45 - 142 files changed, 2619 insertions(+), 867 deletions(-)
New commits: commit 12e2822c7e504280988ac3cdc9e3386d4d810e04 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Thu May 8 12:33:09 2014 +0200 Merge from released debian-unstable. diff --git a/debian/changelog b/debian/changelog index baa2f65..20f70f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mesa (10.1.2-1ubuntu1) UNRELEASED; urgency=low + + * Merge from released debian-unstable. + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 08 May 2014 12:32:52 +0200 + mesa (10.1.2-1) unstable; urgency=medium [ Andreas Boll ] commit 08e28fd2aeb71c665d27fe7b74cabfb19ac2559f Author: Julien Cristau <jcris...@debian.org> Date: Tue May 6 09:31:28 2014 +0200 Upload to unstable diff --git a/debian/changelog b/debian/changelog index 1f5ee66..362977c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -mesa (10.1.2-1) UNRELEASED; urgency=medium +mesa (10.1.2-1) unstable; urgency=medium - * New upstream release. (Closes: #746557) + [ Andreas Boll ] + * New upstream release. + + i965: Don't enable reset notification support on Gen4-5 (Closes: #746557) - -- Andreas Boll <andreas.boll....@gmail.com> Mon, 05 May 2014 23:07:27 +0200 + -- Julien Cristau <jcris...@debian.org> Tue, 06 May 2014 09:31:26 +0200 mesa (10.1.1-1) unstable; urgency=low commit 0470d1fbbe3036a42ad2346d1145c28ce410fa6f Author: Andreas Boll <andreas.boll....@gmail.com> Date: Mon May 5 23:10:18 2014 +0200 New upstream version. Closes: #746557 diff --git a/debian/changelog b/debian/changelog index a22cb9e..1f5ee66 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mesa (10.1.2-1) UNRELEASED; urgency=medium + + * New upstream release. (Closes: #746557) + + -- Andreas Boll <andreas.boll....@gmail.com> Mon, 05 May 2014 23:07:27 +0200 + mesa (10.1.1-1) unstable; urgency=low [ Andreas Boll ] commit bde31357170e5cbf70795434e9725bb442f31137 Author: Carl Worth <cwo...@cworth.org> Date: Mon May 5 10:53:53 2014 -0700 docs: Add notes for the 10.1.2 release. diff --git a/docs/relnotes/10.1.2.html b/docs/relnotes/10.1.2.html new file mode 100644 index 0000000..035d9e6 --- /dev/null +++ b/docs/relnotes/10.1.2.html @@ -0,0 +1,176 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>Mesa Release Notes</title> + <link rel="stylesheet" type="text/css" href="../mesa.css"> +</head> +<body> + +<div class="header"> + <h1>The Mesa 3D Graphics Library</h1> +</div> + +<iframe src="../contents.html"></iframe> +<div class="content"> + +<h1>Mesa 10.1.2 Release Notes / (May 5, 2014)</h1> + +<p> +Mesa 10.1.2 is a bug fix release which fixes bugs found since the 10.1.1 release. +</p> +<p> +Mesa 10.1.2 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is <strong>only</strong> available if requested at context creation +because compatibility contexts are not supported. +</p> + + +<h2>MD5 checksums</h2> +<pre> +</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=27499">Bug 27499</a> - [855GM i915] GL_LINE_STIPPLE displays incorrect colors</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75723">Bug 75723</a> - (regression since Linux 3.14?) brw_get_graphics_reset_status: Assertion `brw->hw_ctx != ((void *)0)' failed</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76894">Bug 76894</a> - Piglit/spec/EXT_framebuffer_object/fbo-bind-renderbuffer failed</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77702">Bug 77702</a> - [i965 Bisected]Piglit spec/NV_conditional_render_blitframebuffer fails</li> + +</ul> + +<h2>Changes</h2> + +<p>Ander Conselvan de Oliveira (2):</p> +<ul> + <li>gbm/dri: Fix out-of-memory error path in dri_device_create()</li> + <li>egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM</li> +</ul> + +<p>Anuj Phogat (27):</p> +<ul> + <li>mesa: Fix glGetVertexAttribi(GL_VERTEX_ATTRIB_ARRAY_SIZE)</li> + <li>swrast: Add glBlitFramebuffer to commands affected by conditional rendering</li> + <li>mesa: Fix error condition for multisample proxy texture targets</li> + <li>i965: Put an assertion to check valid varying_to_slot[varying]</li> + <li>i965: Fix component mask and varying_to_slot mapping for gl_Layer</li> + <li>i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex</li> + <li>mesa: Add helper function _mesa_is_format_integer()</li> + <li>mesa: Add error condition for integer formats in glGetTexImage()</li> + <li>mesa: Add an error condition in glGetFramebufferAttachmentParameteriv()</li> + <li>mesa: Fix error code generation in glReadPixels()</li> + <li>glsl: Allow overlapping locations for vertex input attributes</li> + <li>mesa: Fix querying location of nth element of an array variable</li> + <li>mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0</li> + <li>glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord</li> + <li>glsl: Compile error if fs uses gl_FragCoord before first redeclaration</li> + <li>mesa: Add entry for extension ARB_texture_stencil8</li> + <li>mesa: Add error condition for format=STENCIL_INDEX in glGetTexImage()</li> + <li>i965: Fix crash in do_blit_readpixels()</li> + <li>mesa: Add missing types in _mesa_texstore_xx_xx() functions</li> + <li>mesa: Allow srcFormat=GL_DEPTH_STENCIL in _mesa_texstore_xx_xx() functions</li> + <li>mesa: Add new helper function _mesa_unpack_depth_stencil_row()</li> + <li>mesa: Add support to unpack depth-stencil texture in to FLOAT_32_UNSIGNED_INT_24_8_REV</li> + <li>mesa: Allow FLOAT_32_UNSIGNED_INT_24_8_REV in get_tex_depth_stencil()</li> + <li>i965: Add glBlitFramebuffer to commands affected by conditional rendering</li> + <li>glsl: Use switch to allow adding more shader types</li> + <li>glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord</li> + <li>glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions</li> +</ul> + +<p>Benjamin Bellec (1):</p> +<ul> + <li>mesa: fix GetStringi error message with correct function name</li> +</ul> + +<p>Brian Paul (1):</p> +<ul> + <li>swrast: allocate swrast_texture_image::ImageSlices array if needed</li> +</ul> + +<p>Carl Worth (4):</p> +<ul> + <li>docs: Add the MD5 sums for the 10.1.1 release tar files.</li> + <li>cherry-ignore: Ignore a patch causing a regression</li> + <li>cherry-ignore: Drop an ignored patch now that piglit has been updated.</li> + <li>Update VERSION to 10.1.2</li> +</ul> + +<p>Chris Forbes (1):</p> +<ul> + <li>glsl: Only allow `invariant` on shader in/out between stages.</li> +</ul> + +<p>Eric Anholt (1):</p> +<ul> + <li>i965: Fix render-to-texture in non-FinishRenderTexture cases.</li> +</ul> + +<p>Ian Romanick (1):</p> +<ul> + <li>dri3: Enable GLX_MESA_query_renderer on DRI3 too</li> +</ul> + +<p>Kenneth Graunke (2):</p> +<ul> + <li>i965: Don't enable reset notification support on Gen4-5.</li> + <li>i965: Actually emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS.</li> +</ul> + +<p>Marek Olšák (10):</p> +<ul> + <li>r300g: don't crash when getting NULL colorbuffers</li> + <li>st/mesa: remove trailing NULL colorbuffers</li> + <li>r600g: fix edge flags and layered rendering on R600-R700</li> + <li>r600g: disable async DMA on R700</li> + <li>r600g: fix MSAA resolve on R6xx when the destination is 1D-tiled</li> + <li>r600g: fix flushing on RV670, RS780, RS880 again</li> + <li>r600g: fix buffer copying on R600-R700</li> + <li>r600g: fix for broken CULL_FRONT behavior on R6xx</li> + <li>r600g: fix for an MSAA hang on RV770</li> + <li>r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISC</li> +</ul> + +<p>Michel Dänzer (2):</p> +<ul> + <li>r600g: Disable LLVM by default at runtime for graphics</li> + <li>st/mesa: Fix NULL pointer dereference for incomplete framebuffers</li> +</ul> + +<p>Neil Roberts (1):</p> +<ul> + <li>wayland: Fix the logic in disabling the prime capability</li> +</ul> + +<p>Samuel Iglesias Gonsalvez (1):</p> +<ul> + <li>mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li> +</ul> + +<p>Thomas Hellstrom (1):</p> +<ul> + <li>st/xa: Cache render target surface</li> +</ul> + +<p>nick (1):</p> +<ul> + <li>swrast: Fix vertex color in _swsetup_Translate()</li> +</ul> + +</div> +</body> +</html> commit 75049062d5e81524941cac62cd3cd322df7fa85b Author: Carl Worth <cwo...@cworth.org> Date: Mon May 5 10:50:49 2014 -0700 Update VERSION to 10.1.2 In preparation for the 10.1.2 release. diff --git a/VERSION b/VERSION index 2312799..b613254 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.1.1 +10.1.2 commit 3d648f0f50c41ba63b3e871b35654ec5a96e5bd9 Author: Ian Romanick <ian.d.roman...@intel.com> Date: Thu Feb 20 11:47:14 2014 -0800 dri3: Enable GLX_MESA_query_renderer on DRI3 too This should have happend around the time of commit 4680d23, but Keith's DRI3 patches and my GLX_MESA_query_renderer patches crossed in the mail. I don't have a working DRI3 setup, so I haven't been able to actually verify this. I'm hoping that someone can piglit this for me on DRI3... It's also unfortunate the DRI2 and DRI3 can't share more code. Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> Cc: Keith Packard <kei...@keithp.com> Cc: "10.1" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> (cherry picked from commit 625bdd64e5ea3327d4459b1ccccff8dab89129d0) Conflicts: src/glx/dri3_glx.c During the cherry-pick, the following commit was squashed in as well: glx: Conditionally compile GLX_MESA_query_renderer DRI3 support Missed out with commit 625bdd64e5ea3327d4459b1ccccff8dab89129d0. Cc: "10.1" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> (cherry picked from commit 0b307afd57082f0d4a0e8ba19093d313c9fb46ad) diff --git a/src/glx/dri2.h b/src/glx/dri2.h index 90efde8..7977d83 100644 --- a/src/glx/dri2.h +++ b/src/glx/dri2.h @@ -95,4 +95,12 @@ _X_HIDDEN int dri2_query_renderer_string(struct glx_screen *base, int attribute, const char **value); +_X_HIDDEN int +dri3_query_renderer_integer(struct glx_screen *base, int attribute, + unsigned int *value); + +_X_HIDDEN int +dri3_query_renderer_string(struct glx_screen *base, int attribute, + const char **value); + #endif diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c index 95560cb..80edcca 100644 --- a/src/glx/dri2_query_renderer.c +++ b/src/glx/dri2_query_renderer.c @@ -29,6 +29,9 @@ #include "dri2.h" #include "dri_interface.h" #include "dri2_priv.h" +#if defined(HAVE_DRI3) +#include "dri3_priv.h" +#endif static int dri2_convert_glx_query_renderer_attribs(int attribute) @@ -99,4 +102,44 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute, return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value); } +#if defined(HAVE_DRI3) +_X_HIDDEN int +dri3_query_renderer_integer(struct glx_screen *base, int attribute, + unsigned int *value) +{ + struct dri3_screen *const psc = (struct dri3_screen *) base; + + /* Even though there are invalid values (and + * dri2_convert_glx_query_renderer_attribs may return -1), the higher level + * GLX code is required to perform the filtering. Assume that we got a + * good value. + */ + const int dri_attribute = dri2_convert_glx_query_renderer_attribs(attribute); + + if (psc->rendererQuery == NULL) + return -1; + + return psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute, + value); +} + +_X_HIDDEN int +dri3_query_renderer_string(struct glx_screen *base, int attribute, + const char **value) +{ + struct dri3_screen *const psc = (struct dri3_screen *) base; + + /* Even though queryString only accepts a subset of the possible GLX + * queries, the higher level GLX code is required to perform the filtering. + * Assume that we got a good value. + */ + const int dri_attribute = dri2_convert_glx_query_renderer_attribs(attribute); + + if (psc->rendererQuery == NULL) + return -1; + + return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value); +} +#endif /* HAVE_DRI3 */ + #endif /* GLX_DIRECT_RENDERING */ diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 70ec057..3b7ee1e 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -79,6 +79,7 @@ #include "dri_common.h" #include "dri3_priv.h" #include "loader.h" +#include "dri2.h" static const struct glx_context_vtable dri3_context_vtable; @@ -1580,12 +1581,19 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv, if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0) __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_robustness"); + + if (strcmp(extensions[i]->name, __DRI2_RENDERER_QUERY) == 0) { + psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i]; + __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer"); + } } } static const struct glx_screen_vtable dri3_screen_vtable = { dri3_create_context, - dri3_create_context_attribs + dri3_create_context_attribs, + dri3_query_renderer_integer, + dri3_query_renderer_string, }; /** dri3_create_screen diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h index 1d124f8..3346a17 100644 --- a/src/glx/dri3_priv.h +++ b/src/glx/dri3_priv.h @@ -129,6 +129,7 @@ struct dri3_screen { const __DRI2flushExtension *f; const __DRI2configQueryExtension *config; const __DRItexBufferExtension *texBuffer; + const __DRI2rendererQueryExtension *rendererQuery; const __DRIconfig **driver_configs; void *driver; commit ff117336b7a7bb3b2fae2788a215f0524bbd7357 Author: Anuj Phogat <anuj.pho...@gmail.com> Date: Thu May 1 15:45:04 2014 -0700 glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions Link error conditions added in previous patch are equally applicable to GL_ARB_fragment_coord_conventions implementation. Extension's spec says: "If gl_FragCoord is redeclared in any fragment shader in a program, it must be redeclared in all the fragment shaders in that program that have a static use of gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders in a single program must have the same set of qualifiers." Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> Cc: <mesa-sta...@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> (cherry picked from commit 9bcb0a85321c128b6e5ff8fc6694c2eff613e65a with some manual backporting) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index ad71875..0386bff 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1372,6 +1372,8 @@ set_shader_inout_layout(struct gl_shader *shader, shader->uses_gl_fragcoord = state->fs_uses_gl_fragcoord; shader->pixel_center_integer = state->fs_pixel_center_integer; shader->origin_upper_left = state->fs_origin_upper_left; + shader->ARB_fragment_coord_conventions_enable = + state->ARB_fragment_coord_conventions_enable; break; default: diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 235f586..8222417 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1210,7 +1210,8 @@ link_fs_input_layout_qualifiers(struct gl_shader_program *prog, linked_shader->origin_upper_left = false; linked_shader->pixel_center_integer = false; - if (linked_shader->Stage != MESA_SHADER_FRAGMENT || prog->Version < 150) + if (linked_shader->Stage != MESA_SHADER_FRAGMENT || + (prog->Version < 150 && !prog->ARB_fragment_coord_conventions_enable)) return; for (unsigned i = 0; i < num_shaders; i++) { @@ -2127,6 +2128,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) ralloc_free(prog->AtomicBuffers); prog->AtomicBuffers = NULL; prog->NumAtomicBuffers = 0; + prog->ARB_fragment_coord_conventions_enable = false; /* Separate the shaders into groups based on their type. */ @@ -2153,6 +2155,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) goto done; } + prog->ARB_fragment_coord_conventions_enable |= + prog->Shaders[i]->ARB_fragment_coord_conventions_enable; + gl_shader_stage shader_type = prog->Shaders[i]->Stage; shader_list[shader_type][num_shaders[shader_type]] = prog->Shaders[i]; num_shaders[shader_type]++; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 9356c6c..2837e2a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2397,6 +2397,7 @@ struct gl_shader bool uses_builtin_functions; bool uses_gl_fragcoord; bool redeclares_gl_fragcoord; + bool ARB_fragment_coord_conventions_enable; /** * Fragment shader state from GLSL 1.50 layout qualifiers. @@ -2697,6 +2698,11 @@ struct gl_shader_program * \c NULL. */ struct gl_shader *_LinkedShaders[MESA_SHADER_STAGES]; + + /* True if any of the fragment shaders attached to this program use: + * #extension ARB_fragment_coord_conventions: enable + */ + GLboolean ARB_fragment_coord_conventions_enable; }; commit 2cd8ce4c67b1966f1957e2710cd87b92d38d3122 Author: Anuj Phogat <anuj.pho...@gmail.com> Date: Thu May 1 15:43:17 2014 -0700 glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord GLSL 1.50 spec says: "If gl_FragCoord is redeclared in any fragment shader in a program, it must be redeclared in all the fragment shaders in that program that have a static use gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders in a single program must have the same set of qualifiers." This patch causes the shader link to fail if we have multiple fragment shaders with conflicting layout qualifiers for gl_FragCoord. V2: Restructure the code and add conditions to correctly handle the following case: fragment shader 1: layout(origin_upper_left) in vec4 gl_FragCoord; void main() { foo(); gl_FragColor = gl_FragData; } fragment shader 2: layout(pixel_center_integer) in vec4 gl_FragCoord; void foo() { } V3: Allow linking in the following case: fragment shader 1: void main() { foo(); gl_FragColor = gl_FragCoord; } fragment shader 2: in vec4 gl_FragCoord; void foo() { ... } Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> Cc: <mesa-sta...@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> (cherry picked from commit 35f11e85cbe82b4bb77535e84e5515a5c49f67a6 with some manual backporting) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index c5996fa..1b97bc6 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -119,6 +119,11 @@ _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) instructions->push_head(var); } + /* Figure out if gl_FragCoord is actually used in fragment shader */ + ir_variable *const var = state->symbols->get_variable("gl_FragCoord"); + if (var != NULL) + state->fs_uses_gl_fragcoord = var->data.used; + /* From section 7.1 (Built-In Language Variables) of the GLSL 4.10 spec: * * If multiple shaders using members of a built-in block belonging to diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 6b7760f..ad71875 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -186,6 +186,12 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->default_uniform_qualifier->flags.q.shared = 1; this->default_uniform_qualifier->flags.q.column_major = 1; + this->fs_uses_gl_fragcoord = false; + this->fs_redeclares_gl_fragcoord = false; + this->fs_origin_upper_left = false; + this->fs_pixel_center_integer = false; + this->fs_redeclares_gl_fragcoord_with_no_layout_qualifiers = false; + this->gs_input_prim_type_specified = false; this->gs_input_prim_type = GL_POINTS; this->gs_input_size = 0; @@ -1332,7 +1338,14 @@ set_shader_inout_layout(struct gl_shader *shader, /* Should have been prevented by the parser. */ assert(!state->gs_input_prim_type_specified); assert(!state->out_qualifier->flags.i); - return; + } + + if (shader->Stage != MESA_SHADER_FRAGMENT) { + /* Should have been prevented by the parser. */ + assert(!state->fs_uses_gl_fragcoord); + assert(!state->fs_redeclares_gl_fragcoord); + assert(!state->fs_pixel_center_integer); + assert(!state->fs_origin_upper_left); } switch(shader->Stage) { @@ -1353,6 +1366,14 @@ set_shader_inout_layout(struct gl_shader *shader, shader->Geom.OutputType = PRIM_UNKNOWN; } break; + + case MESA_SHADER_FRAGMENT: + shader->redeclares_gl_fragcoord = state->fs_redeclares_gl_fragcoord; + shader->uses_gl_fragcoord = state->fs_uses_gl_fragcoord; + shader->pixel_center_integer = state->fs_pixel_center_integer; + shader->origin_upper_left = state->fs_origin_upper_left; + break; + default: /* Nothing to do. */ break; diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 82a83a5..69387d6 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -374,6 +374,7 @@ struct _mesa_glsl_parse_state { const struct gl_extensions *extensions; bool uses_builtin_functions; + bool fs_uses_gl_fragcoord; /** * For geometry shaders, size of the most recently seen input declaration diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 578cc78..235f586 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1195,6 +1195,82 @@ private: }; /** + * Performs the cross-validation of layout qualifiers specified in + * redeclaration of gl_FragCoord for the attached fragment shaders, + * and propagates them to the linked FS and linked shader program. + */ +static void +link_fs_input_layout_qualifiers(struct gl_shader_program *prog, + struct gl_shader *linked_shader, + struct gl_shader **shader_list, + unsigned num_shaders) +{ + linked_shader->redeclares_gl_fragcoord = false; + linked_shader->uses_gl_fragcoord = false; + linked_shader->origin_upper_left = false; + linked_shader->pixel_center_integer = false; + + if (linked_shader->Stage != MESA_SHADER_FRAGMENT || prog->Version < 150) + return; + + for (unsigned i = 0; i < num_shaders; i++) { + struct gl_shader *shader = shader_list[i]; + /* From the GLSL 1.50 spec, page 39: + * + * "If gl_FragCoord is redeclared in any fragment shader in a program, + * it must be redeclared in all the fragment shaders in that program + * that have a static use gl_FragCoord." + * + * Exclude the case when one of the 'linked_shader' or 'shader' redeclares + * gl_FragCoord with no layout qualifiers but the other one doesn't + * redeclare it. If we strictly follow GLSL 1.50 spec's language, it + * should be a link error. But, generating link error for this case will + * be a wrong behaviour which spec didn't intend to do and it could also + * break some applications. + */ + if ((linked_shader->redeclares_gl_fragcoord + && !shader->redeclares_gl_fragcoord + && shader->uses_gl_fragcoord + && (linked_shader->origin_upper_left + || linked_shader->pixel_center_integer)) + || (shader->redeclares_gl_fragcoord + && !linked_shader->redeclares_gl_fragcoord + && linked_shader->uses_gl_fragcoord + && (shader->origin_upper_left + || shader->pixel_center_integer))) { + linker_error(prog, "fragment shader defined with conflicting " + "layout qualifiers for gl_FragCoord\n"); + } + + /* From the GLSL 1.50 spec, page 39: + * + * "All redeclarations of gl_FragCoord in all fragment shaders in a + * single program must have the same set of qualifiers." + */ + if (linked_shader->redeclares_gl_fragcoord && shader->redeclares_gl_fragcoord + && (shader->origin_upper_left != linked_shader->origin_upper_left + || shader->pixel_center_integer != linked_shader->pixel_center_integer)) { + linker_error(prog, "fragment shader defined with conflicting " + "layout qualifiers for gl_FragCoord\n"); + } + + /* Update the linked shader state. Note that uses_gl_fragcoord should + * accumulate the results. The other values should replace. If there + * are multiple redeclarations, all the fields except uses_gl_fragcoord + * are already known to be the same. + */ + if (shader->redeclares_gl_fragcoord || shader->uses_gl_fragcoord) { + linked_shader->redeclares_gl_fragcoord = + shader->redeclares_gl_fragcoord; + linked_shader->uses_gl_fragcoord = linked_shader->uses_gl_fragcoord + || shader->uses_gl_fragcoord; + linked_shader->origin_upper_left = shader->origin_upper_left; + linked_shader->pixel_center_integer = shader->pixel_center_integer; + } + } +} + +/** * Performs the cross-validation of geometry shader max_vertices and * primitive type layout qualifiers for the attached geometry shaders, * and propagates them to the linked GS and linked shader program. @@ -1390,6 +1466,7 @@ link_intrastage_shaders(void *mem_ctx, linked->NumUniformBlocks = num_uniform_blocks; ralloc_steal(linked, linked->UniformBlocks); + link_fs_input_layout_qualifiers(prog, linked, shader_list, num_shaders); link_gs_inout_layout_qualifiers(prog, linked, shader_list, num_shaders); populate_symbol_table(linked); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d5159e0..9356c6c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2395,6 +2395,14 @@ struct gl_shader struct glsl_symbol_table *symbols; bool uses_builtin_functions; + bool uses_gl_fragcoord; + bool redeclares_gl_fragcoord; + + /** + * Fragment shader state from GLSL 1.50 layout qualifiers. + */ + bool origin_upper_left; + bool pixel_center_integer; /** * Geometry shader state from GLSL 1.50 layout qualifiers. commit ec70be5628b0941767964cff6135b5ba0bf20766 Author: Anuj Phogat <anuj.pho...@gmail.com> Date: Thu May 1 15:37:48 2014 -0700 glsl: Use switch to allow adding more shader types Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> Cc: <mesa-sta...@lists.freedesktop.org> diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 87784ed..6b7760f 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1335,20 +1335,27 @@ set_shader_inout_layout(struct gl_shader *shader, return; } - shader->Geom.VerticesOut = 0; - if (state->out_qualifier->flags.q.max_vertices) - shader->Geom.VerticesOut = state->out_qualifier->max_vertices; - - if (state->gs_input_prim_type_specified) { - shader->Geom.InputType = state->gs_input_prim_type; - } else { - shader->Geom.InputType = PRIM_UNKNOWN; - } + switch(shader->Stage) { + case MESA_SHADER_GEOMETRY: + shader->Geom.VerticesOut = 0; + if (state->out_qualifier->flags.q.max_vertices) + shader->Geom.VerticesOut = state->out_qualifier->max_vertices; + + if (state->gs_input_prim_type_specified) { + shader->Geom.InputType = state->gs_input_prim_type; + } else { + shader->Geom.InputType = PRIM_UNKNOWN; + } - if (state->out_qualifier->flags.q.prim_type) { - shader->Geom.OutputType = state->out_qualifier->prim_type; - } else { - shader->Geom.OutputType = PRIM_UNKNOWN; + if (state->out_qualifier->flags.q.prim_type) { + shader->Geom.OutputType = state->out_qualifier->prim_type; + } else { + shader->Geom.OutputType = PRIM_UNKNOWN; + } + break; + default: + /* Nothing to do. */ + break; } } commit 2d9bfe4bf424ed234c276d7ca80348e9d10a6e43 Author: Carl Worth <cwo...@cworth.org> Date: Thu May 1 15:00:24 2014 -0700 cherry-ignore: Drop an ignored patch now that piglit has been updated. This patch was ignored when we saw it causing a piglit test to regress. That piglit test has been determined to have been incorrect. It has been fixed so that this patch is now clearly a bug fix, not a regression. diff --git a/bin/.cherry-ignore b/bin/.cherry-ignore index 727ef5c..756da19 100644 --- a/bin/.cherry-ignore +++ b/bin/.cherry-ignore @@ -7,7 +7,3 @@ ac35ded4733883037316d556af596524e5e02535 # This patch introduces some regressions. See: # https://bugs.freedesktop.org/show_bug.cgi?id=77443 1afe3359258a9e89b62c8638761f52d78f6d1cbc - -# This patch introduces a piglit regression. See: -# https://bugs.freedesktop.org/show_bug.cgi?id=77702 -1d350b9e228462390b1883abace24c15d4741932 i965: Add glBlitFramebuffer to commands affected by conditional rendering commit efba496d03c597be4838aa9ed22b914ad3931df2 Author: Anuj Phogat <anuj.pho...@gmail.com> Date: Fri Apr 4 16:49:19 2014 -0700 i965: Add glBlitFramebuffer to commands affected by conditional rendering Fixes failures in Khronos OpenGL CTS test conditional_render_test9 Cc: <mesa-sta...@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1wilde-0003x0...@moszumanska.debian.org