Makefile | 2 configs/default | 2 debian/changelog | 14 + docs/relnotes-8.0.3.html | 4 docs/relnotes-8.0.4.html | 202 +++++++++++++++++++++ docs/relnotes.html | 2 src/gallium/auxiliary/draw/draw_llvm.c | 5 src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 5 src/gallium/auxiliary/draw/draw_pt.c | 9 src/gallium/drivers/i915/i915_flush.c | 5 src/gallium/drivers/i915/i915_screen.c | 4 src/gallium/drivers/nv50/nv50_pc_emit.c | 4 src/gallium/drivers/r600/r600_shader.c | 8 src/gallium/drivers/svga/svga_pipe_blit.c | 6 src/gallium/drivers/svga/svga_pipe_draw.c | 11 + src/gallium/drivers/svga/svga_pipe_sampler.c | 4 src/gallium/drivers/svga/svga_screen.c | 2 src/gallium/drivers/svga/svga_state_tss.c | 10 - src/gallium/drivers/svga/svga_surface.c | 5 src/gallium/state_trackers/vega/vg_translate.c | 4 src/gallium/targets/Makefile.xorg | 2 src/glsl/ast_to_hir.cpp | 3 src/glsl/builtins/ir/acos.ir | 8 src/glsl/builtins/tools/texture_builtins.py | 6 src/glsl/ir.h | 4 src/glsl/loop_analysis.cpp | 28 +++ src/glsl/loop_analysis.h | 23 ++ src/glsl/ralloc.c | 2 src/glu/sgi/libnurbs/internals/mapdesc.cc | 2 src/glu/sgi/libnurbs/internals/nurbstess.cc | 2 src/glx/glxext.c | 3 src/mesa/drivers/common/meta.c | 76 +++++++- src/mesa/drivers/dri/i915/i830_state.c | 2 src/mesa/drivers/dri/i965/brw_eu.c | 8 src/mesa/drivers/dri/i965/brw_fs.h | 1 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 50 +++-- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 26 ++ src/mesa/main/attrib.c | 8 src/mesa/main/bufferobj.c | 27 ++ src/mesa/main/fbobject.c | 16 + src/mesa/main/format_unpack.c | 4 src/mesa/main/image.c | 221 +++++++++++++++++------- src/mesa/main/image.h | 6 src/mesa/main/readpix.c | 9 src/mesa/main/shaderobj.c | 3 src/mesa/main/texformat.c | 10 - src/mesa/main/texgetimage.c | 16 - src/mesa/main/teximage.c | 39 ++-- src/mesa/main/transformfeedback.c | 21 +- src/mesa/main/version.c | 2 src/mesa/main/version.h | 4 src/mesa/state_tracker/st_cb_drawpixels.c | 13 + src/mesa/state_tracker/st_cb_fbo.c | 8 src/mesa/state_tracker/st_cb_texture.c | 27 ++ src/mesa/state_tracker/st_draw.c | 20 +- src/mesa/state_tracker/st_format.c | 34 ++- src/mesa/state_tracker/st_gen_mipmap.c | 18 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 10 - src/mesa/state_tracker/st_texture.c | 3 tests/glx/Makefile.am | 4 tests/glx/fake_glx_screen.h | 2 61 files changed, 874 insertions(+), 205 deletions(-)
New commits: commit 3846f5553726ec9f5b2ed9d3d0e77e11e879c561 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 10:24:02 2012 +0300 update the changelog diff --git a/debian/changelog b/debian/changelog index dc06077..0f807e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mesa (8.0.4-0ubuntu0.1) UNRELEASED; urgency=low + + * New upstream bugfix release. + + -- Timo Aaltonen <tjaal...@ubuntu.com> Thu, 16 Aug 2012 10:23:26 +0300 + mesa (8.0.3-0ubuntu0.2) precise-proposed; urgency=low * Add 119_reduce_vm_thread_count_on_ivb_gt1.diff from upstream stable commit b28a2452b81170308f0e0bad520235e12bc05abe Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Tue Aug 14 07:21:24 2012 +0300 release to precise-proposed diff --git a/debian/changelog b/debian/changelog index 5514696..3c459cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -mesa (8.0.2-0ubuntu3.2) UNRELEASED; urgency=low +mesa (8.0.3+8.0.2-0ubuntu3.2) precise-proposed; urgency=low + * Use a fake upstream version due to a rejected update. * Add 119_reduce_vm_thread_count_on_ivb_gt1.diff from upstream stable branch. (LP: #1031784) commit 2439ef7c1800cb3878ea0e20e5ac78c473336562 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Tue Aug 14 07:11:26 2012 +0300 Add 119_reduce_vm_thread_count_on_ivb_gt1.diff from upstream stable branch. (LP: #1031784) diff --git a/debian/changelog b/debian/changelog index 4017b1b..5514696 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mesa (8.0.2-0ubuntu3.2) UNRELEASED; urgency=low + + * Add 119_reduce_vm_thread_count_on_ivb_gt1.diff from upstream stable + branch. (LP: #1031784) + + -- Timo Aaltonen <tjaal...@ubuntu.com> Tue, 14 Aug 2012 07:11:03 +0300 + mesa (8.0.2-0ubuntu3.1) precise-proposed; urgency=low * Add 118_fix_rendering_from_textures.patch: Postpone the setup of the diff --git a/debian/patches/119_reduce_wm_thread_count_on_ivb_gt1.diff b/debian/patches/119_reduce_wm_thread_count_on_ivb_gt1.diff new file mode 100644 index 0000000..4d17d9a --- /dev/null +++ b/debian/patches/119_reduce_wm_thread_count_on_ivb_gt1.diff @@ -0,0 +1,25 @@ +From 539a02b9a73276a6d012436e296cfab55d5257a3 Mon Sep 17 00:00:00 2001 +From: Eric Anholt <e...@anholt.net> +Date: Fri, 27 Jul 2012 18:34:07 +0000 +Subject: i965/gen7: Reduce GT1 WM thread count according to updated BSpec. + +Acked-by: Kenneth Graunke <kenn...@whitecape.org> + +https://bugs.freedesktop.org/show_bug.cgi?id=52382 +(cherry picked from commit fbf86c7f0f1f12e52b927e3870535073879d0a4d) +--- +diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c +index a66ccc7..78bc6f9 100644 +--- a/src/mesa/drivers/dri/i965/brw_context.c ++++ b/src/mesa/drivers/dri/i965/brw_context.c +@@ -240,7 +240,7 @@ brwCreateContext(int api, + /* WM maximum threads is number of EUs times number of threads per EU. */ + if (intel->gen >= 7) { + if (intel->gt == 1) { +- brw->max_wm_threads = 86; ++ brw->max_wm_threads = 48; + brw->max_vs_threads = 36; + brw->max_gs_threads = 36; + brw->urb.size = 128; +-- +cgit v0.9.0.2-2-gbebe diff --git a/debian/patches/series b/debian/patches/series index 452ecbe..de7c0e0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ 116_use_shared_galliumcore.diff 117_intel_fix_hiz_null_dereference.patch 118_fix_rendering_from_textures.patch +119_reduce_wm_thread_count_on_ivb_gt1.diff commit c1f4867c89adb1a6b19d66ec8ad146115909f0a7 Author: Ian Romanick <ian.d.roman...@intel.com> Date: Tue Jul 10 08:30:11 2012 -0700 docs: Add 8.0.4 release notes Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> diff --git a/docs/relnotes-8.0.4.html b/docs/relnotes-8.0.4.html new file mode 100644 index 0000000..d5792aa --- /dev/null +++ b/docs/relnotes-8.0.4.html @@ -0,0 +1,202 @@ +<HTML> + +<head> +<TITLE>Mesa Release Notes</TITLE> +<link rel="stylesheet" type="text/css" href="mesa.css"> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +</head> + +<BODY> + +<body bgcolor="#eeeeee"> + +<H1>Mesa 8.0.4 Release Notes / July 10, 2012</H1> + +<p> +Mesa 8.0.4 is a bug fix release which fixes bugs found since the 8.0.2 release. +</p> +<p> +Mesa 8.0.4 implements the OpenGL 3.0 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.0. +</p> +<p> +See the <a href="install.html">Compiling/Installing page</a> for prerequisites +for DRI hardware acceleration. +</p> + + +<h2>MD5 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=45967">Bug 45967</a> - piglit getteximage-invalid-format-for-packed-type regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47742">Bug 47742</a> - [softpipe] piglit fbo-generatemipmap-array regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48141">Bug 48141</a> - [vmwgfx] src/gallium/auxiliary/util/u_inlines.h:256:pipe_buffer_map_range: Assertion `offset + length <= buffer->width0' failed.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48472">Bug 48472</a> - GPU Lockup while running demo (rzr - the scene is dead) in wine</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50033">Bug 50033</a> - src/mesa/state_tracker/st_cb_fbo.c:379:st_render_texture: Assertion `strb->rtt_level <= strb->texture->last_level' failed.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50621">Bug 50621</a> - Mesa fails its test suite with a buffer overflow.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50298">Bug 50298</a> - [ILK IVB bisected]Ogles2conform GL/sin/sin_float_vert_xvary.test regressed</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=51574">Bug 51574</a> - ir_loop_jump constructor assigns member variable to itself</li> + +<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> --> + +</ul> + + +<h2>Changes</h2> +<p>The full set of changes can be viewed by using the following GIT command:</p> + +<pre> + git log mesa-8.0.3..mesa-8.0.4 +</pre> + +<p>Andreas Betz (1): +<ul> + <li>vega: fix 565 color unpacking bug</li> +</ul></p> + +<p>Antoine Labour (2): +<ul> + <li>meta: Cleanup the resources we allocate.</li> + <li>mesa: Free uniforms correclty.</li> +</ul></p> + +<p>Brian Paul (22): +<ul> + <li>docs: add link to 8.0.3 release notes</li> + <li>mesa: fix Z32_FLOAT -> uint conversion functions</li> + <li>draw: fix primitive restart bug by using the index buffer offset</li> + <li>st/mesa: fix glDrawPixels(GL_DEPTH_COMPONENT) color output</li> + <li>svga: fix synchronization bug between sampler views and surfaces</li> + <li>mesa: new _mesa_error_check_format_and_type() function</li> + <li>mesa: add missing GL_UNSIGNED_INT_10F_11F_11F_REV case</li> + <li>mesa: fix missing return value in getteximage_error_check()</li> + <li>st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium drivers</li> + <li>svga: add 0.5 in float->int conversion of sample min/max lod</li> + <li>svga: fix min/max lod clamping</li> + <li>svga: change PIPE_CAPF_MAX_TEXTURE_LOD_BIAS from 16.0 to 15.0</li> + <li>st/mesa: add fallback pipe formats for (compressed) R, RG formats</li> + <li>st/mesa: copy num_immediates field when copying the immediates array</li> + <li>svga: move svga_texture() casts/calls in svga_surface_copy()</li> + <li>svga: reset vertex buffer offset in svga_release_user_upl_buffers()</li> + <li>st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffers</li> + <li>st/mesa: use private pipe_sampler_view in decompress_with_blit()</li> + <li>st/mesa: add null pointer check in st_texture_image_map()</li> + <li>st/mesa: fix mipmap image size computation w.r.t. texture arrays</li> + <li>draw: fix missing immediates bug in polygon stipple code</li> + <li>st/mesa: fix max_offset computation for base vertex</li> +</ul></p> + +<p>Christoph Bumiller (1): +<ul> + <li>nv50: handle NEG,ABS modifiers for short RCP encoding</li> +</ul></p> + +<p>Dylan Noblesmith (1): +<ul> + <li>mesa: require GL_MAX_SAMPLES >= 4 for GL 3.0</li> +</ul></p> + +<p>Eric Anholt (1): +<ul> + <li>i965/vs: Fix texelFetchOffset()</li> +</ul></p> + +<p>Ian Romanick (5): +<ul> + <li>docs: Add 8.0.3 release md5sums</li> + <li>glx/tests: Fix off-by-one error in allocating extension string buffer</li> + <li>glsl: Remove spurious printf messages</li> + <li>glsl: Fix pi/2 constant in acos built-in function</li> + <li>mesa: Bump version number to 8.0.4</li> +</ul></p> + +<p>José Fonseca (2): +<ul> + <li>mesa: Avoid void acinclude.m4 Android.common.mk Android.mk autogen.sh bin common.py configs configure.ac docs doxygen include Makefile scons SConstruct src tests arithmetic.</li> + <li>draw: Ensure that prepare is always run after LLVM garbagge collection.</li> +</ul></p> + +<p>Kenneth Graunke (15): +<ul> + <li>mesa: Check for a negative "size" parameter in glCopyBufferSubData().</li> + <li>i965: Fix brw_swap_cmod() for LE/GE comparisons.</li> + <li>glsl: Remove unused ir_loop_jump::loop pointer.</li> + <li>ralloc: Fix ralloc_parent() of memory allocated out of the NULL context.</li> + <li>mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).</li> + <li>glsl/builtins: Fix textureGrad() for Array samplers.</li> + <li>mesa: Unbind ARB_copy_buffer and transform feedback buffers on delete.</li> + <li>mesa: Support BindBuffer{Base,Offset,Range} with a buffer of 0.</li> + <li>mesa: Unbind ARB_transform_feedback2 binding points on Delete too.</li> + <li>meta: Fix GL_RENDERBUFFER binding in decompress_texture_image().</li> + <li>i965/fs: Fix texelFetchOffset() on pre-Gen7.</li> + <li>i965/vs: Fix texelFetchOffset() on pre-Gen7.</li> + <li>i965/fs: Fix user-defined FS outputs with less than four components.</li> + <li>glsl: Hook up loop_variable_state destructor to plug a memory leak.</li> + <li>glsl: Don't trust loop analysis in the presence of function calls.</li> +</ul></p> + +<p>Kurt Roeckx (1): +<ul> + <li>i830: Fix crash for GL_STENCIL_TEST in i830Enable()</li> +</ul></p> + +<p>Lukas Rössler (1): +<ul> + <li>glu: fix two Clang warnings</li> +</ul></p> + +<p>Marek Olšák (2): +<ul> + <li>mesa: allow exposing GL3 without EXT_texture_integer</li> + <li>st/mesa: don't do srgb->linear conversion in decompress_with_blit</li> +</ul></p> + +<p>Paul Seidler (1): +<ul> + <li>tests: include mesa headers</li> +</ul></p> + +<p>Stéphane Marchesin (3): +<ul> + <li>glx: Handle a null reply in QueryVersion.</li> + <li>i915g: Don't invert signalled/unsignalled fences</li> + <li>i915g: Don't avoid flushing when we have a pending fence.</li> +</ul></p> + +<p>Thomas Gstädtner (1): +<ul> + <li>gallium/targets: pass ldflags parameter to MKLIB</li> +</ul></p> + +<p>Vadim Girlin (2): +<ul> + <li>st/mesa: set stObj->lastLevel in guess_and_alloc_texture</li> + <li>r600g: check gpr count limit</li> +</ul></p> + +<p>Vinson Lee (1): +<ul> + <li>st/mesa: Fix uninitialized members in glsl_to_tgsi_visitor constructor.</li> +</ul></p> + +</body> +</html> diff --git a/docs/relnotes.html b/docs/relnotes.html index 1bc889a..ce9f775 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release. </p> <UL> +<LI><A HREF="relnotes-8.0.4.html">8.0.4 release notes</A> <LI><A HREF="relnotes-8.0.3.html">8.0.3 release notes</A> <LI><A HREF="relnotes-8.0.2.html">8.0.2 release notes</A> <LI><A HREF="relnotes-8.0.1.html">8.0.1 release notes</A> commit 7c2225b026162beedf3302a3515eaea2f6f7e4f8 Author: Ian Romanick <ian.d.roman...@intel.com> Date: Tue Jul 10 08:28:32 2012 -0700 mesa: Bump version number to 8.0.4 Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> diff --git a/Makefile b/Makefile index be73f10..61f4af6 100644 --- a/Makefile +++ b/Makefile @@ -184,7 +184,7 @@ ultrix-gcc: # Rules for making release tarballs -PACKAGE_VERSION=8.0.3 +PACKAGE_VERSION=8.0.4 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION) PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION) diff --git a/configs/default b/configs/default index 5e703e2..289aa0e 100644 --- a/configs/default +++ b/configs/default @@ -10,7 +10,7 @@ CONFIG_NAME = default # Version info MESA_MAJOR=8 MESA_MINOR=0 -MESA_TINY=3 +MESA_TINY=4 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) # external projects. This should be useless now that we use libdrm. diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index d9ef3d0..6afeff4 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -34,8 +34,8 @@ struct gl_context; /* Mesa version */ #define MESA_MAJOR 8 #define MESA_MINOR 0 -#define MESA_PATCH 3 -#define MESA_VERSION_STRING "8.0.3" +#define MESA_PATCH 4 +#define MESA_VERSION_STRING "8.0.4" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) commit 827c99e1a025c588f1ab5b42bf49a681047d8136 Author: Marek Olšák <mar...@gmail.com> Date: Fri Jun 15 05:13:02 2012 +0200 st/mesa: don't do srgb->linear conversion in decompress_with_blit This fixes piglit/getteximage-formats on r600g. NOTE: This is a candidate for stable branches. Reviewed-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 5e7e7d96b341e937d3b795e94ac4a863c357f724) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index f5bf018..a8e0240 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -639,6 +639,7 @@ decompress_with_blit(struct gl_context * ctx, u_sampler_view_default_template(&sv_temp, stObj->pt, stObj->pt->format); + sv_temp.format = util_format_linear(sv_temp.format); sv_temp.u.tex.first_level = sv_temp.u.tex.last_level = texImage->Level; commit 0d384680988cc3a9a7b69793f5f46971bbd5210a Author: Thomas Gstädtner <tho...@gstaedtner.net> Date: Wed May 23 18:55:51 2012 +0200 gallium/targets: pass ldflags parameter to MKLIB Without passing the -ldflags parameter before $(LDFLAGS) in some cases flags will be passed to MKLIB which it does not understand. This might be -m64, -m32 or similar. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Thomas Gstädtner <tho...@gstaedtner.net> Signed-off-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 93594f38be75227879b835a2037b7466adbd70ef) diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg index 481e3d6..21bf237 100644 --- a/src/gallium/targets/Makefile.xorg +++ b/src/gallium/targets/Makefile.xorg @@ -46,7 +46,7 @@ endif default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING) $(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) - $(MKLIB) -linker '$(LD)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS) + $(MKLIB) -linker '$(LD)' -noprefix -o $@ -ldflags '$(LDFLAGS)' $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS) depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES) rm -f depend commit fc3d2c46239af5c57f90643408586345b5561360 Author: Vinson Lee <v...@freedesktop.org> Date: Sun Apr 8 22:28:34 2012 -0700 st/mesa: Fix uninitialized members in glsl_to_tgsi_visitor constructor. Fixes uninitialized member defects reported by Coverity. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <v...@freedesktop.org> Reviewed-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 70d038e46eb877ffa922003c78630eb7eb76c0f3) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index e50f55c..7871651 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2815,6 +2815,10 @@ glsl_to_tgsi_visitor::glsl_to_tgsi_visitor() indirect_addr_temps = false; indirect_addr_consts = false; mem_ctx = ralloc_context(NULL); + ctx = NULL; + prog = NULL; + shader_program = NULL; + options = NULL; } glsl_to_tgsi_visitor::~glsl_to_tgsi_visitor() commit fe5541f64c11ccd38ccf56c71e95a597ae5e509f Author: Vadim Girlin <vadimgir...@gmail.com> Date: Tue Apr 10 00:44:52 2012 +0400 r600g: check gpr count limit This should help to prevent gpu lockups. See https://bugs.freedesktop.org/show_bug.cgi?id=48472 NOTE: This is a candidate for the stable branches. Signed-off-by: Vadim Girlin <vadimgir...@gmail.com> Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> (cherry picked from commit 783e4da72aa203a645737dec81b001341951a942) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 45d491b..d63309e 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -1277,6 +1277,14 @@ static int r600_shader_from_tgsi(struct r600_pipe_context * rctx, struct r600_pi if (ctx.bc->chip_class == CAYMAN) cm_bytecode_add_cf_end(ctx.bc); + /* check GPR limit - we have 124 = 128 - 4 + * (4 are reserved as alu clause temporary registers) */ + if (ctx.bc->ngpr > 124) { + R600_ERR("GPR limit exceeded - shader requires %d registers\n", ctx.bc->ngpr); + r = -ENOMEM; + goto out_err; + } + free(ctx.literals); tgsi_parse_free(&ctx.parse); return 0; commit 1ce1a4526f3af818ef6a3934a0ff0d192f818376 Author: Brian Paul <bri...@vmware.com> Date: Mon Apr 2 20:05:16 2012 +0200 st/mesa: fix max_offset computation for base vertex Add the maximum base vertex offset to max_index for computing the buffer size. Fixes a failed assertion in the u_upload_mgr.c code with the VMware svga driver. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48141 v2: incorporate Marek's suggestions. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Marek Olšák <mar...@gmail.com> (cherry picked from commit 299c9052e832712654865af8dbd0ed4bf055d124) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 6d6fc85..fb2b6f9 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -979,6 +979,7 @@ st_draw_vbo(struct gl_context *ctx, struct pipe_index_buffer ibuffer; struct pipe_draw_info info; unsigned i, num_instances = 1; + unsigned max_index_plus_base; GLboolean new_array = st->dirty.st && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) != 0; @@ -987,6 +988,8 @@ st_draw_vbo(struct gl_context *ctx, assert(ctx->NewState == 0x0); if (ib) { + int max_base_vertex = 0; + /* Gallium probably doesn't want this in some cases. */ if (!index_bounds_valid) if (!all_varyings_in_vbos(arrays)) @@ -994,7 +997,16 @@ st_draw_vbo(struct gl_context *ctx, for (i = 0; i < nr_prims; i++) { num_instances = MAX2(num_instances, prims[i].num_instances); + max_base_vertex = MAX2(max_base_vertex, prims[i].basevertex); } + + /* Compute the sum of max_index and max_base_vertex. That's the value + * we need to use when creating buffers. + */ + if (max_index == ~0) + max_index_plus_base = max_index; + else + max_index_plus_base = max_index + max_base_vertex; } else { /* Get min/max index for non-indexed drawing. */ @@ -1006,6 +1018,9 @@ st_draw_vbo(struct gl_context *ctx, max_index = MAX2(max_index, prims[i].start + prims[i].count - 1); num_instances = MAX2(num_instances, prims[i].num_instances); } + + /* The base vertex offset only applies to indexed drawing */ + max_index_plus_base = max_index; } /* Validate state. */ @@ -1025,7 +1040,8 @@ st_draw_vbo(struct gl_context *ctx, st_validate_state(st); if (new_array) { - if (!st_validate_varrays(ctx, arrays, max_index, num_instances)) { + if (!st_validate_varrays(ctx, arrays, max_index_plus_base, + num_instances)) { /* probably out of memory, no-op the draw call */ return; } @@ -1049,7 +1065,7 @@ st_draw_vbo(struct gl_context *ctx, unsigned element_size = st->user_attrib[i].element_size; unsigned stride = st->user_attrib[i].stride; unsigned min_offset = min_index * stride; - unsigned max_offset = max_index * stride + element_size; + unsigned max_offset = max_index_plus_base * stride + element_size; assert(max_offset > min_offset); commit e0e1ca353b9b77f328d1afa2480ccbffbbea7143 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Wed Mar 28 14:00:42 2012 -0700 glsl: Don't trust loop analysis in the presence of function calls. Function calls may have side effects that alter variables used inside the loop. In the fragment shader, they may even terminate the shader. This means our analysis about loop-constant or induction variables may be completely wrong. In general it's impossible to determine whether they actually do or not (due to the halting problem), so we'd need to perform conservative static analysis. For now, it's not worth the complexity: most functions will be inlined, at which point we can unroll them successfully. Fixes Piglit tests: - shaders/glsl-fs-unroll-out-param - shaders/glsl-fs-unroll-side-effect NOTE: This is a candidate for release branches. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> (cherry picked from commit 0405bd08ca0e01ebc68891ee1ff47d320983f775) diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp index 9bba6a9..6a0e4da 100644 --- a/src/glsl/loop_analysis.cpp +++ b/src/glsl/loop_analysis.cpp @@ -110,6 +110,8 @@ public: virtual ir_visitor_status visit(ir_loop_jump *); virtual ir_visitor_status visit(ir_dereference_variable *); + virtual ir_visitor_status visit_enter(ir_call *); + virtual ir_visitor_status visit_enter(ir_loop *); virtual ir_visitor_status visit_leave(ir_loop *); virtual ir_visitor_status visit_enter(ir_assignment *); @@ -153,6 +155,21 @@ loop_analysis::visit(ir_loop_jump *ir) ir_visitor_status +loop_analysis::visit_enter(ir_call *ir) +{ + /* If we're not somewhere inside a loop, there's nothing to do. */ + if (this->state.is_empty()) + return visit_continue; + + loop_variable_state *const ls = + (loop_variable_state *) this->state.get_head(); + + ls->contains_calls = true; + return visit_continue_with_parent; +} + + +ir_visitor_status loop_analysis::visit(ir_dereference_variable *ir) { /* If we're not somewhere inside a loop, there's nothing to do. @@ -209,6 +226,17 @@ loop_analysis::visit_leave(ir_loop *ir) loop_variable_state *const ls = (loop_variable_state *) this->state.pop_head(); + /* Function calls may contain side effects. These could alter any of our + * variables in ways that cannot be known, and may even terminate shader + * execution (say, calling discard in the fragment shader). So we can't + * rely on any of our analysis about assignments to variables. + * + * We could perform some conservative analysis (prove there's no statically + * possible assignment, etc.) but it isn't worth it for now; function + * inlining will allow us to unroll loops anyway. + */ + if (ls->contains_calls) + return visit_continue; foreach_list(node, &ir->body_instructions) { /* Skip over declarations at the start of a loop. diff --git a/src/glsl/loop_analysis.h b/src/glsl/loop_analysis.h index d47b969..05c982f 100644 --- a/src/glsl/loop_analysis.h +++ b/src/glsl/loop_analysis.h @@ -122,10 +122,16 @@ public: */ unsigned num_loop_jumps; + /** + * Whether this loop contains any function calls. + */ + bool contains_calls; + loop_variable_state() { this->max_iterations = -1; this->num_loop_jumps = 0; + this->contains_calls = false; this->var_hash = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); } commit 04f7c32f789de49338bc1a69d66bb49374f8b09c Author: Brian Paul <bri...@vmware.com> Date: Fri Mar 23 14:53:48 2012 -0600 draw: fix missing immediates bug in polygon stipple code The function that counts the number of TGSI immediates also needs to emit the immediates. This fixes assorted failures when using polygon stipple with fragment shaders that have their own immediates. NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 7f16246acef4089570abca76a59580691ec6cf68) diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index 0401a45..9ed425d 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -165,11 +165,16 @@ pstip_transform_decl(struct tgsi_transform_context *ctx, } +/** + * TGSI immediate declaration transform callback. + * We're just counting the number of immediates here. + */ static void pstip_transform_immed(struct tgsi_transform_context *ctx, struct tgsi_full_immediate *immed) { struct pstip_transform_context *pctx = (struct pstip_transform_context *) ctx; + ctx->emit_immediate(ctx, immed); /* emit to output shader */ pctx->numImmed++; } commit da8d65fde46ac324d03ea667124d60db93047870 Author: Brian Paul <bri...@vmware.com> Date: Fri Mar 23 08:16:58 2012 -0600 st/mesa: fix mipmap image size computation w.r.t. texture arrays The image height or depth is the array_size for array textures. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47742 NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jakob Bornecrantz <ja...@vmware.com> (cherry picked from commit 318669f196ca922337da02af9d72773e76e70b45) diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index d817a9c..750d66a 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -229,10 +229,22 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target, = _mesa_get_tex_image(ctx, texObj, target, srcLevel); struct gl_texture_image *dstImage; struct st_texture_image *stImage; - uint dstWidth = u_minify(pt->width0, dstLevel); - uint dstHeight = u_minify(pt->height0, dstLevel); - uint dstDepth = u_minify(pt->depth0, dstLevel); uint border = srcImage->Border; + uint dstWidth, dstHeight, dstDepth; + + dstWidth = u_minify(pt->width0, dstLevel); + if (texObj->Target == GL_TEXTURE_1D_ARRAY) { + dstHeight = pt->array_size; + } + else { + dstHeight = u_minify(pt->height0, dstLevel); + } + if (texObj->Target == GL_TEXTURE_2D_ARRAY) { + dstDepth = pt->array_size; + } + else { + dstDepth = u_minify(pt->depth0, dstLevel); + } dstImage = _mesa_get_tex_image(ctx, texObj, target, dstLevel); if (!dstImage) { commit 57a273d89b76c6fefc21438ed688a8b73d862cb4 Author: Brian Paul <bri...@vmware.com> Date: Fri Mar 16 09:31:13 2012 -0600 st/mesa: add null pointer check in st_texture_image_map() If we failed to allocate a memory resource for the texture we'd crash when we tried to map it. Now we propogate the NULL back up to the texstore code and generate GL_OUT_OF_MEMORY. Fixes a crash with the upcoming piglit max-texture-size test. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <jfons...@vmware.com> (cherry picked from commit 03f8a97d718502f60d16000aead251d88a751149) diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 132d7a8..9627a61 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -222,6 +222,9 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage, DBG("%s \n", __FUNCTION__); + if (!stImage->pt) + return NULL; + if (stObj->pt != stImage->pt) level = 0; else commit 099bc3aaea93313c774a554a5dee56706ac4b674 Author: Brian Paul <bri...@vmware.com> Date: Mon Feb 13 14:48:36 2012 -0700 st/mesa: use private pipe_sampler_view in decompress_with_blit() Similar to the previous commit. Also fix incorrect setting of the sampler view's state after it's created. We need to specify the first/last_level fields in the template instead. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <jfons...@vmware.com> (cherry picked from commit 0315cb9f8f3ec38fa9594860754fb53a67cf4c23) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index a19120a..f5bf018 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -611,8 +611,7 @@ decompress_with_blit(struct gl_context * ctx, struct pipe_context *pipe = st->pipe; struct st_texture_image *stImage = st_texture_image(texImage); struct st_texture_object *stObj = st_texture_object(texImage->TexObject); - struct pipe_sampler_view *src_view = - st_get_texture_sampler_view(stObj, pipe); + struct pipe_sampler_view *src_view; const GLuint width = texImage->Width; const GLuint height = texImage->Height; struct pipe_surface *dst_surface; @@ -634,8 +633,21 @@ decompress_with_blit(struct gl_context * ctx, pipe->render_condition(pipe, NULL, 0); } - /* Choose the source mipmap level */ - src_view->u.tex.first_level = src_view->u.tex.last_level = texImage->Level; + /* Create sampler view that limits fetches to the source mipmap level */ + { + struct pipe_sampler_view sv_temp; + + u_sampler_view_default_template(&sv_temp, stObj->pt, stObj->pt->format); + + sv_temp.u.tex.first_level = + sv_temp.u.tex.last_level = texImage->Level; + + src_view = pipe->create_sampler_view(pipe, stObj->pt, &sv_temp); + if (!src_view) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); + return; + } + } /* blit/render/decompress */ util_blit_pixels_tex(st->blit, @@ -704,6 +716,8 @@ decompress_with_blit(struct gl_context * ctx, /* destroy the temp / dest surface */ util_destroy_rgba_surface(dst_texture, dst_surface); + + pipe_sampler_view_reference(&src_view, NULL); } commit 3539914e49118a5048e7c0f87d5014c088988195 Author: Brian Paul <bri...@vmware.com> Date: Fri Feb 10 18:57:15 2012 -0700 st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffers The st_renderbuffer_alloc_storage() function is used to allocate both window-system buffers and user-created renderbuffers. The later kind are never directly displayed so don't set PIPE_BIND_DISPLAY_TARGET for those surfaces. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <jfons...@vmware.com> (cherry picked from commit 5a70e12fc0897a3178c73b20d99fc0f11b180374) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index fefd93a..215e919 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -142,7 +142,12 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, if (util_format_is_depth_or_stencil(format)) { template.bind = PIPE_BIND_DEPTH_STENCIL; } + else if (strb->Base.Name != 0) { + /* this is a user-created renderbuffer */ + template.bind = PIPE_BIND_RENDER_TARGET; + } else { + /* this is a window-system buffer */ template.bind = (PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_RENDER_TARGET); } @@ -203,6 +208,7 @@ st_new_renderbuffer(struct gl_context *ctx, GLuint name) { struct st_renderbuffer *strb = ST_CALLOC_STRUCT(st_renderbuffer); if (strb) { + assert(name != 0); _mesa_init_renderbuffer(&strb->Base, name); strb->Base.Delete = st_renderbuffer_delete; strb->Base.AllocStorage = st_renderbuffer_alloc_storage; commit de8bb6a59b09821d66f7ff38e35cce20c3cfa86f Author: José Fonseca <jfons...@vmware.com> Date: Fri Jan 27 14:40:06 2012 +0000 draw: Ensure that prepare is always run after LLVM garbagge collection. Should avoid dangling pointer derreference with glean --run results --overwrite --quick --tests texSwizzle NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 07635a4799b15a7575e1feb8859ecc7734850deb) diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index e71c802..b81c725 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -65,8 +65,13 @@ static void draw_llvm_garbage_collect_callback(void *cb_data) { struct draw_llvm *llvm = (struct draw_llvm *) cb_data; + struct draw_context *draw = llvm->draw; struct draw_llvm_variant_list_item *li; + /* Ensure prepare will be run and shaders recompiled */ + assert(!draw->suspend_flushing); + draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE); -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1t1urh-00044e...@vasks.debian.org