VERSION | 2 configure.ac | 2 debian/changelog | 8 docs/relnotes/11.0.3.html | 3 docs/relnotes/11.0.4.html | 167 +++++++++++++++++++ src/gallium/auxiliary/gallivm/lp_bld_limits.h | 2 src/gallium/auxiliary/tgsi/tgsi_exec.h | 2 src/gallium/auxiliary/util/u_vbuf.c | 1 src/gallium/docs/source/screen.rst | 4 src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 6 src/gallium/drivers/freedreno/a3xx/fd3_emit.h | 11 + src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 2 src/gallium/drivers/freedreno/freedreno_screen.c | 2 src/gallium/drivers/i915/i915_screen.c | 2 src/gallium/drivers/ilo/ilo_screen.c | 2 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 20 +- src/gallium/drivers/nouveau/nouveau_fence.c | 18 +- src/gallium/drivers/nouveau/nouveau_winsys.h | 2 src/gallium/drivers/nouveau/nv30/nv30_screen.c | 8 src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c | 1 src/gallium/drivers/nouveau/nv50/nv50_screen.c | 3 src/gallium/drivers/nouveau/nv50/nv50_shader_state.c | 9 - src/gallium/drivers/nouveau/nv50/nv50_transfer.c | 16 - src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 5 src/gallium/drivers/nouveau/nvc0/nvc0_transfer.c | 20 -- src/gallium/drivers/r300/r300_screen.c | 4 src/gallium/drivers/r600/r600_pipe.c | 6 src/gallium/drivers/radeonsi/si_pipe.c | 2 src/gallium/drivers/radeonsi/si_shader.c | 4 src/gallium/drivers/svga/svga_screen.c | 4 src/gallium/drivers/vc4/vc4_screen.c | 2 src/gallium/include/pipe/p_defines.h | 3 src/gallium/state_trackers/omx/vid_dec_h264.c | 12 - src/gallium/state_trackers/va/image.c | 2 src/glsl/ast.h | 6 src/glsl/ast_function.cpp | 62 ++++++- src/glsl/ast_to_hir.cpp | 152 ++++++++++++++++- src/glsl/link_uniform_initializers.cpp | 4 src/glsl/opt_dead_code.cpp | 2 src/mesa/Android.libmesa_dricore.mk | 2 src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 3 src/mesa/drivers/dri/i965/brw_vec4.cpp | 12 - src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 3 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 10 - src/mesa/drivers/dri/i965/gen7_gs_state.c | 4 src/mesa/drivers/dri/i965/gen7_vs_state.c | 4 src/mesa/drivers/dri/i965/gen7_wm_state.c | 12 - src/mesa/drivers/dri/i965/gen8_gs_state.c | 4 src/mesa/drivers/dri/i965/gen8_ps_state.c | 32 +++ src/mesa/drivers/dri/i965/gen8_vs_state.c | 4 src/mesa/main/dlist.c | 2 src/mesa/main/ff_fragment_shader.cpp | 10 - src/mesa/main/mtypes.h | 7 src/mesa/main/pack.c | 15 + src/mesa/main/program_resource.c | 8 src/mesa/main/shader_query.cpp | 94 ++++++---- src/mesa/main/shaderapi.h | 3 src/mesa/main/shaderimage.c | 21 -- src/mesa/main/shaderimage.h | 12 - src/mesa/main/texstate.c | 3 src/mesa/main/uniform_query.cpp | 53 ++++-- src/mesa/main/version.c | 19 ++ src/mesa/state_tracker/st_atom_clip.c | 5 src/mesa/state_tracker/st_cb_fbo.c | 2 src/mesa/state_tracker/st_extensions.c | 3 src/mesa/vbo/vbo_context.c | 2 66 files changed, 726 insertions(+), 206 deletions(-)
New commits: commit 20405939ca5de2d528804480e8a915c51087e887 Author: Timo Aaltonen <tjaal...@debian.org> Date: Mon Oct 26 10:14:04 2015 +0200 update the changelog diff --git a/debian/changelog b/debian/changelog index ec603da..d24df7e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mesa (11.0.3-1) UNRELEASED; urgency=medium +mesa (11.0.4-1) UNRELEASED; urgency=medium * New upstream release. * Cherry-pick commit 70e91d6 (i965: Remove early release of DRI2 commit 31bf24703193cc23961923e01548b1acb2760a93 Author: Emil Velikov <emil.veli...@collabora.com> Date: Sat Oct 24 19:34:01 2015 +0100 docs: add release notes for 11.0.4 Signed-off-by: Emil Velikov <emil.veli...@collabora.com> diff --git a/docs/relnotes/11.0.4.html b/docs/relnotes/11.0.4.html new file mode 100644 index 0000000..6359434 --- /dev/null +++ b/docs/relnotes/11.0.4.html @@ -0,0 +1,167 @@ +<!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.4 Release Notes / October 24, 2015</h1> + +<p> +Mesa 11.0.4 is a bug fix release which fixes bugs found since the 11.0.3 release. +</p> +<p> +Mesa 11.0.4 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=86281">Bug 86281</a> - brw_meta_fast_clear (brw=brw@entry=0x7fffd4097a08, fb=fb@entry=0x7fffd40fa900, buffers=buffers@entry=2, partial_clear=partial_clear@entry=false)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86720">Bug 86720</a> - [radeon] Europa Universalis 4 freezing during game start (10.3.3+, still broken on 11.0.2)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91788">Bug 91788</a> - [HSW Regression] Synmark2_v6 Multithread performance case FPS reduced by 36%</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92304">Bug 92304</a> - [cts] cts.shaders.negative conformance tests fail</li> + +</ul> + + +<h2>Changes</h2> + +<p>Alejandro Piñeiro (2):</p> +<ul> + <li>i965/vec4: check writemask when bailing out at register coalesce</li> + <li>i965/vec4: fill src_reg type using the constructor type parameter</li> +</ul> + +<p>Brian Paul (2):</p> +<ul> + <li>vbo: fix incorrect switch statement in init_mat_currval()</li> + <li>mesa: fix incorrect opcode in save_BlendFunci()</li> +</ul> + +<p>Chih-Wei Huang (3):</p> +<ul> + <li>mesa: android: Fix the incorrect path of sse_minmax.c</li> + <li>nv50/ir: use C++11 standard std::unordered_map if possible</li> + <li>nv30: include the header of ffs prototype</li> +</ul> + +<p>Chris Wilson (1):</p> +<ul> + <li>i965: Remove early release of DRI2 miptree</li> +</ul> + +<p>Dave Airlie (1):</p> +<ul> + <li>mesa/uniforms: fix get_uniform for doubles (v2)</li> +</ul> + +<p>Emil Velikov (1):</p> +<ul> + <li>docs: add sha256 checksums for 11.0.3</li> +</ul> + +<p>Francisco Jerez (5):</p> +<ul> + <li>i965: Don't tell the hardware about our UAV access.</li> + <li>mesa: Expose function to calculate whether a shader image unit is valid.</li> + <li>mesa: Skip redundant texture completeness checking during image validation.</li> + <li>i965: Use _mesa_is_image_unit_valid() instead of gl_image_unit::_Valid.</li> + <li>mesa: Get rid of texture-dependent image unit derived state.</li> +</ul> + +<p>Ian Romanick (8):</p> +<ul> + <li>glsl: Allow built-in functions as constant expressions in OpenGL ES 1.00</li> + <li>ff_fragment_shader: Use binding to set the sampler unit</li> + <li>glsl/linker: Use constant_initializer instead of constant_value to initialize uniforms</li> + <li>glsl: Use constant_initializer instead of constant_value to determine whether to keep an unused uniform</li> + <li>glsl: Only set ir_variable::constant_value for const-decorated variables</li> + <li>glsl: Restrict initializers for global variables to constant expression in ES</li> + <li>glsl: Add method to determine whether an expression contains the sequence operator</li> + <li>glsl: In later GLSL versions, sequence operator is cannot be a constant expression</li> +</ul> + +<p>Ilia Mirkin (1):</p> +<ul> + <li>nouveau: make sure there's always room to emit a fence</li> +</ul> + +<p>Indrajit Das (1):</p> +<ul> + <li>st/va: Used correct parameter to derive the value of the "h" variable in vlVaCreateImage</li> +</ul> + +<p>Jonathan Gray (1):</p> +<ul> + <li>configure.ac: ensure RM is set</li> +</ul> + +<p>Krzysztof Sobiecki (1):</p> +<ul> + <li>st/fbo: use pipe_surface_release instead of pipe_surface_reference</li> +</ul> + +<p>Leo Liu (1):</p> +<ul> + <li>st/omx/dec/h264: fix field picture type 0 poc disorder</li> +</ul> + +<p>Marek Olšák (3):</p> +<ul> + <li>st/mesa: fix clip state dependencies</li> + <li>radeonsi: fix a GS copy shader leak</li> + <li>gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT</li> +</ul> + +<p>Nicolai Hähnle (1):</p> +<ul> + <li>u_vbuf: fix vb slot assignment for translated buffers</li> +</ul> + +<p>Rob Clark (1):</p> +<ul> + <li>freedreno/a3xx: cache-flush is needed after MEM_WRITE</li> +</ul> + +<p>Tapani Pälli (3):</p> +<ul> + <li>mesa: add GL_UNSIGNED_INT_24_8 to _mesa_pack_depth_span</li> + <li>mesa: Set api prefix to version string when overriding version</li> + <li>mesa: fix ARRAY_SIZE query for GetProgramResourceiv</li> +</ul> + + +</div> +</body> +</html> commit b530dccbffa1de5699c3dca8c70d25ecfd0982b4 Author: Emil Velikov <emil.veli...@collabora.com> Date: Sat Oct 24 19:29:27 2015 +0100 Update version to 11.0.4 Signed-off-by: Emil Velikov <emil.veli...@collabora.com> diff --git a/VERSION b/VERSION index e7e9473..210c4b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.0.3 +11.0.4 commit 6d6a4d7c767d7d8be0ddab8e47855f16695cfb30 Author: Jonathan Gray <j...@jsg.id.au> Date: Sat Oct 10 17:42:40 2015 +1100 configure.ac: ensure RM is set GNU make predefines RM to rm -f but this is not required by POSIX so ensure that RM is set. This fixes "make clean" on OpenBSD. v2: use AC_CHECK_PROG Signed-off-by: Jonathan Gray <j...@jsg.id.au> CC: "10.6 11.0" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> (cherry picked from commit 99c4079c37ac04a0dad4ead3117f786706c80aaf) diff --git a/configure.ac b/configure.ac index 92799c6..1751413 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,8 @@ AC_SYS_LARGEFILE LT_PREREQ([2.2]) LT_INIT([disable-static]) +AC_CHECK_PROG(RM, rm, [rm -f]) + AX_PROG_BISON([], AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"], [AC_MSG_ERROR([bison not found - unable to compile glcpp-parse.y])])) commit 13276962c7e7a490c68bb6479f770e2d145818b8 Author: Tapani Pälli <tapani.pa...@intel.com> Date: Mon Aug 3 08:58:20 2015 +0300 mesa: fix ARRAY_SIZE query for GetProgramResourceiv Patch also refactors name length queries which were using array size in computation, this has to be done in same time to avoid regression in arb_program_interface_query-resource-query Piglit test. Fixes rest of the failures with ES31-CTS.program_interface_query.no-locations v2: make additional check only for GS inputs v3: create helper function for resource name length so that it gets calculated only in one place Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> Reviewed-by: Martin Peres <martin.pe...@linux.intel.com> (cherry picked from commit c0722be9f58ef89dae98d8c459ec4f9589f97748) diff --git a/src/mesa/main/program_resource.c b/src/mesa/main/program_resource.c index 23d2b4d..20e5d39 100644 --- a/src/mesa/main/program_resource.c +++ b/src/mesa/main/program_resource.c @@ -111,11 +111,9 @@ _mesa_GetProgramInterfaceiv(GLuint program, GLenum programInterface, for (i = 0, *params = 0; i < shProg->NumProgramResourceList; i++) { if (shProg->ProgramResourceList[i].Type != programInterface) continue; - const char *name = - _mesa_program_resource_name(&shProg->ProgramResourceList[i]); - unsigned array_size = - _mesa_program_resource_array_size(&shProg->ProgramResourceList[i]); - *params = MAX2(*params, strlen(name) + (array_size ? 3 : 0) + 1); + unsigned len = + _mesa_program_resource_name_len(&shProg->ProgramResourceList[i]); + *params = MAX2(*params, len + 1); } break; case GL_MAX_NUM_ACTIVE_VARIABLES: diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index ee73202..0e13572 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -476,7 +476,7 @@ _mesa_program_resource_array_size(struct gl_program_resource *res) RESOURCE_XFB(res)->Size : 0; case GL_PROGRAM_INPUT: case GL_PROGRAM_OUTPUT: - return RESOURCE_VAR(res)->data.max_array_access; + return RESOURCE_VAR(res)->type->length; case GL_UNIFORM: case GL_VERTEX_SUBROUTINE_UNIFORM: case GL_GEOMETRY_SUBROUTINE_UNIFORM: @@ -661,6 +661,57 @@ _mesa_program_resource_find_index(struct gl_shader_program *shProg, return NULL; } +/* Function returns if resource name is expected to have index + * appended into it. + * + * + * Page 61 (page 73 of the PDF) in section 2.11 of the OpenGL ES 3.0 + * spec says: + * + * "If the active uniform is an array, the uniform name returned in + * name will always be the name of the uniform array appended with + * "[0]"." + * + * The same text also appears in the OpenGL 4.2 spec. It does not, + * however, appear in any previous spec. Previous specifications are + * ambiguous in this regard. However, either name can later be passed + * to glGetUniformLocation (and related APIs), so there shouldn't be any + * harm in always appending "[0]" to uniform array names. + * + * Geometry shader stage has different naming convention where the 'normal' + * condition is an array, therefore for variables referenced in geometry + * stage we do not add '[0]'. + * + * Note, that TCS outputs and TES inputs should not have index appended + * either. + */ +static bool +add_index_to_name(struct gl_program_resource *res) +{ + bool add_index = !(((res->Type == GL_PROGRAM_INPUT) && + res->StageReferences & (1 << MESA_SHADER_GEOMETRY))); + + /* Transform feedback varyings have array index already appended + * in their names. + */ + if (res->Type == GL_TRANSFORM_FEEDBACK_VARYING) + add_index = false; + + return add_index; +} + +/* Get name length of a program resource. This consists of + * base name + 3 for '[0]' if resource is an array. + */ +extern unsigned +_mesa_program_resource_name_len(struct gl_program_resource *res) +{ + unsigned length = strlen(_mesa_program_resource_name(res)); + if (_mesa_program_resource_array_size(res) && add_index_to_name(res)) + length += 3; + return length; +} + /* Get full name of a program resource. */ bool @@ -696,36 +747,7 @@ _mesa_get_program_resource_name(struct gl_shader_program *shProg, _mesa_copy_string(name, bufSize, length, _mesa_program_resource_name(res)); - /* Page 61 (page 73 of the PDF) in section 2.11 of the OpenGL ES 3.0 - * spec says: - * - * "If the active uniform is an array, the uniform name returned in - * name will always be the name of the uniform array appended with - * "[0]"." - * - * The same text also appears in the OpenGL 4.2 spec. It does not, - * however, appear in any previous spec. Previous specifications are - * ambiguous in this regard. However, either name can later be passed - * to glGetUniformLocation (and related APIs), so there shouldn't be any - * harm in always appending "[0]" to uniform array names. - * - * Geometry shader stage has different naming convention where the 'normal' - * condition is an array, therefore for variables referenced in geometry - * stage we do not add '[0]'. - * - * Note, that TCS outputs and TES inputs should not have index appended - * either. - */ - bool add_index = !(((programInterface == GL_PROGRAM_INPUT) && - res->StageReferences & (1 << MESA_SHADER_GEOMETRY))); - - /* Transform feedback varyings have array index already appended - * in their names. - */ - if (programInterface == GL_TRANSFORM_FEEDBACK_VARYING) - add_index = false; - - if (add_index && _mesa_program_resource_array_size(res)) { + if (_mesa_program_resource_array_size(res) && add_index_to_name(res)) { int i; /* The comparison is strange because *length does *NOT* include the @@ -972,13 +994,9 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg, switch (res->Type) { case GL_ATOMIC_COUNTER_BUFFER: goto invalid_operation; - case GL_TRANSFORM_FEEDBACK_VARYING: - *val = strlen(_mesa_program_resource_name(res)) + 1; - break; default: - /* Base name +3 if array '[0]' + terminator. */ - *val = strlen(_mesa_program_resource_name(res)) + - (_mesa_program_resource_array_size(res) > 0 ? 3 : 0) + 1; + /* Resource name length + terminator. */ + *val = _mesa_program_resource_name_len(res) + 1; } return 1; case GL_TYPE: @@ -1003,7 +1021,7 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg, return 1; case GL_PROGRAM_INPUT: case GL_PROGRAM_OUTPUT: - *val = MAX2(RESOURCE_VAR(res)->type->length, 1); + *val = MAX2(_mesa_program_resource_array_size(res), 1); return 1; case GL_TRANSFORM_FEEDBACK_VARYING: *val = MAX2(RESOURCE_XFB(res)->Size, 1); diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index 0a10191..fba767b 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -245,6 +245,9 @@ _mesa_get_program_resource_name(struct gl_shader_program *shProg, GLsizei bufSize, GLsizei *length, GLchar *name, const char *caller); +extern unsigned +_mesa_program_resource_name_len(struct gl_program_resource *res); + extern GLint _mesa_program_resource_location(struct gl_shader_program *shProg, GLenum programInterface, const char *name); commit 03ab39fa702f2e5dd95a43abd17d70706e3c0eaf Author: Chris Wilson <ch...@chris-wilson.co.uk> 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 <ch...@chris-wilson.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86281 Reviewed-by: Martin Peres <martin.pe...@linux.intel.com> Reviewed-by: Chad Versace <chad.vers...@intel.com> (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 4d215a25d582daa1182a09205addd47cdf1422d9 Author: Alejandro Piñeiro <apinhe...@igalia.com> Date: Tue Sep 1 17:02:20 2015 +0200 i965/vec4: fill src_reg type using the constructor type parameter The src_reg constructor that received the glsl_type was using it only to build the swizzle, but not to fill this->type as dst_reg is doing. This caused some type mismatch between movs and alu operations on the NIR path, so copy propagation optimization was not applied to remove unneeded movs if negate modifier was involved. This was first detected on minus (negate+add) operations. Shader DB results (taking into account only vec4): total instructions in shared programs: 20019 -> 19934 (-0.42%) instructions in affected programs: 2918 -> 2833 (-2.91%) helped: 79 HURT: 0 GAINED: 0 LOST: 0 Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit 4de86e1371b0d59a5b9a787b726be3d373024647) Nominated-by: Christoph Brill <egore...@egore911.de> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index a4385e6..8abb94e 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -61,6 +61,8 @@ src_reg::src_reg(register_file file, int reg, const glsl_type *type) this->swizzle = brw_swizzle_for_size(type->vector_elements); else this->swizzle = BRW_SWIZZLE_XYZW; + if (type) + this->type = brw_type_for_base_type(type); } /** Generic unset register constructor. */ commit 6766a36e19878dc95396e550833f17b7980760d1 Author: Alejandro Piñeiro <apinhe...@igalia.com> Date: Fri Sep 11 12:21:13 2015 +0200 i965/vec4: check writemask when bailing out at register coalesce opt_register_coalesce stopped to check previous instructions to coalesce with if somebody else was writing on the same destination. This can be optimized to check if somebody else was writing to the same channels of the same destination using the writemask. Shader DB results (taking into account only vec4): total instructions in shared programs: 1781593 -> 1734957 (-2.62%) instructions in affected programs: 1238390 -> 1191754 (-3.77%) helped: 12782 HURT: 0 GAINED: 0 LOST: 0 v2: removed some parenthesis, fixed indentation, as suggested by Matt Turner v3: added brackets, for consistency, as suggested by Eduardo Lima Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit d4e29af2344c06490913efc35430f93a966061bb) Nominated-by: Jason Ekstrand <ja...@jlekstrand.net> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index f9565de..a4385e6 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1105,11 +1105,13 @@ vec4_visitor::opt_register_coalesce() if (interfered) break; - /* If somebody else writes our destination here, we can't coalesce - * before that. + /* If somebody else writes the same channels of our destination here, + * we can't coalesce before that. */ - if (inst->dst.in_range(scan_inst->dst, scan_inst->regs_written)) - break; + if (inst->dst.in_range(scan_inst->dst, scan_inst->regs_written) && + (inst->dst.writemask & scan_inst->dst.writemask) != 0) { + break; + } /* Check for reads of the register we're trying to coalesce into. We * can't go rewriting instructions above that to put some other value commit 42364b33d16704b909ff8b0ff550638d0184a415 Author: Brian Paul <bri...@vmware.com> Date: Thu Oct 15 08:43:02 2015 -0600 mesa: fix incorrect opcode in save_BlendFunci() Fixes assertion failure with new piglit arb_draw_buffers_blend-state_set_get test. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Jose Fonseca <jfons...@vmware.com> (cherry picked from commit e24d04e436ed48d4a0aac90590cbaa40da936208) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 5554738..73aafa4 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1401,7 +1401,7 @@ save_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_SEPARATE_I, 3); + n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_I, 3); if (n) { n[1].ui = buf; n[2].e = sfactor; commit 54a30ed94fa74ed6e3a1b6824df882fc38c6a08c Author: Marek Olšák <marek.ol...@amd.com> Date: Tue Oct 20 18:26:02 2015 +0200 gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT This avoids a serious r600g bug leading to a GPU hang. The chances this bug will get fixed are pretty low now. I deeply regret listening to others and not pushing this patch, leaving other users with a GPU-crashing driver. Yes, it should be fixed in the compiler and it's ugly, but users couldn't care less about that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86720 Cc: 11.0 10.6 <mesa-sta...@lists.freedesktop.org> Reviewed-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 814f31457e9ae83d4f1e39236f704721b279b73d) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_limits.h b/src/gallium/auxiliary/gallivm/lp_bld_limits.h index 571c615..ad64ae0 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_limits.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_limits.h @@ -137,6 +137,8 @@ gallivm_get_shader_param(enum pipe_shader_cap param) case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED: case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; } /* if we get here, we missed a shader cap above (and should have seen * a compiler warning.) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index 5d56aab..db5c56b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -463,6 +463,8 @@ tgsi_exec_get_shader_param(enum pipe_shader_cap param) case PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED: case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; } /* if we get here, we missed a shader cap above (and should have seen * a compiler warning.) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 2c0da01..c88b50d 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -355,6 +355,10 @@ to be 0. are supported. * ``PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE``: Whether the driver doesn't ignore tgsi_declaration_range::Last for shader inputs and outputs. +* ``PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT``: This is the maximum number + of iterations that loops are allowed to have to be unrolled. It is only + a hint to state trackers. Whether any loops will be unrolled is not + guaranteed. .. _pipe_compute_cap: diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 86e9a21..38e0aec 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -407,6 +407,8 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 16; case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_TGSI; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; } debug_printf("unknown shader param %d\n", param); return 0; diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 19a94a8..5743d82 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -167,6 +167,8 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: debug_printf("%s: Unknown cap %u.\n", __FUNCTION__, cap); return 0; diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c index ab4d137..e6c960d 100644 --- a/src/gallium/drivers/ilo/ilo_screen.c +++ b/src/gallium/drivers/ilo/ilo_screen.c @@ -138,6 +138,8 @@ ilo_get_shader_param(struct pipe_screen *screen, unsigned shader, return PIPE_SHADER_IR_TGSI; case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED: return 1; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: return 0; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 0aea4c0..d2fe18e 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -261,6 +261,8 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: debug_printf("unknown vertex shader param %d\n", param); return 0; @@ -302,6 +304,8 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: debug_printf("unknown fragment shader param %d\n", param); return 0; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 1cc16b6..a1deece 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -297,6 +297,8 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param); return 0; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 51aaf7a..b3454b4 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -310,6 +310,8 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 16; /* would be 32 in linked (OpenGL-style) mode */ case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 16; /* XXX not sure if more are really safe */ + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param); return 0; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 4ca0b26..869dfc0 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -300,6 +300,8 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED: case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_TGSI; } @@ -356,6 +358,8 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED: case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_TGSI; } diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 6ffe561..029bb66 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -504,6 +504,12 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED: case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + /* due to a bug in the shader compiler, some loops hang + * if they are not unrolled, see: + * https://bugs.freedesktop.org/show_bug.cgi?id=86720 + */ + return 255; } return 0; } diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 939ac66..abcb795 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -489,6 +489,8 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 1; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; } return 0; } diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 66c3dea..6539971 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -383,6 +383,8 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; } /* If we get here, we failed to handle a cap above */ debug_printf("Unexpected fragment shader query %u\n", param); @@ -441,6 +443,8 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: return 0; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; } /* If we get here, we failed to handle a cap above */ debug_printf("Unexpected vertex shader query %u\n", param); diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 2dee1d4..82c7353 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -334,6 +334,8 @@ vc4_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return VC4_MAX_TEXTURE_SAMPLERS; case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_TGSI; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: fprintf(stderr, "unknown shader param %d\n", param); return 0; diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 2ba56ea..5171832 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -674,7 +674,8 @@ enum pipe_shader_cap PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED, /* all rounding modes */ PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED, PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED, - PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE + PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE, + PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT, }; /** diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 884761c..d97dfde 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -249,6 +249,9 @@ void st_init_limits(struct pipe_screen *screen, if (options->EmitNoLoops) options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536); + else + options->MaxUnrollIterations = screen->get_shader_param(screen, sh, + PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT); options->LowerClipDistance = true; } commit 6f48b8957ef2b3231aa0e099f3b6801b7e13ae3e Author: Leo Liu <leo....@amd.com> Date: Fri Aug 28 08:45:11 2015 -0400 st/omx/dec/h264: fix field picture type 0 poc disorder Signed-off-by: Leo Liu <leo....@amd.com> Reviewed-by: Christian König <christian.koe...@amd.com> Cc: "10.6 11.0" <mesa-sta...@lists.freedesktop.org> (cherry picked from commit 867284a8f07b69887f8adb109fb6c71156668227) diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c index 18d8803..f66ed89 100644 --- a/src/gallium/state_trackers/omx/vid_dec_h264.c +++ b/src/gallium/state_trackers/omx/vid_dec_h264.c @@ -753,10 +753,14 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp, priv->codec_data.h264.delta_pic_order_cnt_bottom = delta_pic_order_cnt_bottom; } - priv->picture.h264.field_order_cnt[0] = pic_order_cnt_msb + pic_order_cnt_lsb; - priv->picture.h264.field_order_cnt[1] = pic_order_cnt_msb + pic_order_cnt_lsb; - if (!priv->picture.h264.field_pic_flag) - priv->picture.h264.field_order_cnt[1] += priv->codec_data.h264.delta_pic_order_cnt_bottom; + if (!priv->picture.h264.field_pic_flag) { + priv->picture.h264.field_order_cnt[0] = pic_order_cnt_msb + pic_order_cnt_lsb; + priv->picture.h264.field_order_cnt[1] = priv->picture.h264.field_order_cnt [0] + + priv->codec_data.h264.delta_pic_order_cnt_bottom; + } else if (!priv->picture.h264.bottom_field_flag) + priv->picture.h264.field_order_cnt[0] = pic_order_cnt_msb + pic_order_cnt_lsb; + else + priv->picture.h264.field_order_cnt[1] = pic_order_cnt_msb + pic_order_cnt_lsb; } else if (sps->pic_order_cnt_type == 1) { unsigned MaxFrameNum = 1 << (sps->log2_max_frame_num_minus4 + 4); commit b91ed628c1b2f8296986d36f1ccbce75b171c900 Author: Indrajit Das <indrajit-kumar....@amd.com> Date: Thu Oct 15 15:42:43 2015 +0530 st/va: Used correct parameter to derive the value of the "h" variable in vlVaCreateImage Cc: "11.0" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Christian König <christian.koe...@amd.com> Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> (cherry picked from commit 381c17d695b39f9ab501f5aa5a3cc42c8519ac3b) diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c index 022240d..3b36430 100644 --- a/src/gallium/state_trackers/va/image.c +++ b/src/gallium/state_trackers/va/image.c @@ -116,7 +116,7 @@ vlVaCreateImage(VADriverContextP ctx, VAImageFormat *format, int width, int heig img->width = width; img->height = height; w = align(width, 2); - h = align(width, 2); + h = align(height, 2); switch (format->fourcc) { case VA_FOURCC('N','V','1','2'): commit 141109cc529b3a5d71c0023ad5c19c8844c05171 Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Oct 9 00:54:17 2015 +0200 radeonsi: fix a GS copy shader leak Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Michel Dänzer <michel.daen...@amd.com> (cherry picked from commit aa060e276c203baf4691d4a4722accd5bdbb8526) [Emil Velikov: si_shader_destroy() wants the ctx as first argument] Signed-off-by: Emil Velikov <emil.veli...@collabora.com> Conflicts: src/gallium/drivers/radeonsi/si_shader.c diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 1010b6e..ef986bd 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c