debian/changelog | 6 + debian/patches/cso-fix-sampler-view-count.patch | 43 ++++++++ debian/patches/series | 3 debian/patches/svga-move-dirty-buffers.patch | 47 +++++++++ debian/patches/svga-replace-sampler-assertion.patch | 96 ++++++++++++++++++++ 5 files changed, 195 insertions(+)
New commits: commit cfd3e7dc2beefe807958cea9bd3bd3b6ae9c7e96 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Thu Apr 10 12:08:27 2014 +0200 release to trusty diff --git a/debian/changelog b/debian/changelog index db897a8..3517b54 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -mesa (10.1.0-4ubuntu4) UNRELEASED; urgency=low +mesa (10.1.0-4ubuntu4) trusty; urgency=medium * Cherry-pick patches to improve stability with vmware. (LP: #1284134) - -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 10 Apr 2014 10:20:53 +0200 + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 10 Apr 2014 12:08:10 +0200 mesa (10.1.0-4ubuntu3) trusty; urgency=medium commit 6c73afdc8cc0e3b8704a8a33f697b8607082ffb5 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Thu Apr 10 10:25:12 2014 +0200 Cherry-pick patches to improve stability with vmware. (LP: #1284134) diff --git a/debian/changelog b/debian/changelog index efe0188..db897a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mesa (10.1.0-4ubuntu4) UNRELEASED; urgency=low + + * Cherry-pick patches to improve stability with vmware. (LP: #1284134) + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 10 Apr 2014 10:20:53 +0200 + mesa (10.1.0-4ubuntu3) trusty; urgency=medium * i965-dont-call-abort-on-unknown-dev.diff: Allow using a fallback diff --git a/debian/patches/cso-fix-sampler-view-count.patch b/debian/patches/cso-fix-sampler-view-count.patch new file mode 100644 index 0000000..7f21515 --- /dev/null +++ b/debian/patches/cso-fix-sampler-view-count.patch @@ -0,0 +1,43 @@ +From 60aae7370934953a6f679fc5309ae567fc3f462c Mon Sep 17 00:00:00 2001 +From: Brian Paul <bri...@vmware.com> +Date: Wed, 2 Apr 2014 08:54:41 -0600 +Subject: [PATCH 1/3] cso: fix sampler view count in cso_set_sampler_views() + +We want to call pipe->set_sampler_views() with count being the +maximum of the old number of sampler views and the new number. +This makes sure we null-out any old sampler views. + +We already do the same thing for sampler states in single_sampler_done(). +Fixes some assertions seen in the VMware driver with XA tracker. + +Cc: "10.0" "10.1" <mesa-sta...@lists.freedesktop.org> +Reviewed-by: Thomas Hellstrom <thellst...@vmware.com> +Tested-by: Thomas Hellstrom <thellst...@vmware.com> +Reviewed-by: Roland Scheidegger <srol...@vmware.com> +--- + src/gallium/auxiliary/cso_cache/cso_context.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c +index 2dcf01d..9fe0a97 100644 +--- a/src/gallium/auxiliary/cso_cache/cso_context.c ++++ b/src/gallium/auxiliary/cso_cache/cso_context.c +@@ -1187,11 +1187,12 @@ cso_set_sampler_views(struct cso_context *ctx, + pipe_sampler_view_reference(&info->views[i], NULL); + } + +- info->nr_views = count; +- + /* bind the new sampler views */ +- ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, count, ++ ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, ++ MAX2(info->nr_views, count), + info->views); ++ ++ info->nr_views = count; + } + + +-- +1.9.1 + diff --git a/debian/patches/series b/debian/patches/series index bc6548d..d974949 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -13,3 +13,6 @@ i915-dont-default-to-2.1.patch fix-bsymbolic-madness.patch fix-kwin.diff i965-dont-call-abort-on-unknown-dev.diff +cso-fix-sampler-view-count.patch +svga-replace-sampler-assertion.patch +svga-move-dirty-buffers.patch diff --git a/debian/patches/svga-move-dirty-buffers.patch b/debian/patches/svga-move-dirty-buffers.patch new file mode 100644 index 0000000..5b2cdcf --- /dev/null +++ b/debian/patches/svga-move-dirty-buffers.patch @@ -0,0 +1,47 @@ +From 192c69d964a2da49bf0654d9bb2c0de48c788207 Mon Sep 17 00:00:00 2001 +From: Brian Paul <bri...@vmware.com> +Date: Wed, 9 Apr 2014 11:35:54 -0600 +Subject: [PATCH 3/3] svga: move LIST_INITHEAD(dirty_buffers) earlier in + svga_context_create() + +Fixes a crash in svga_context_flush_buffers() if we use the 'draw' module +for AA lines (when the device doesn't support that feature). We need to +initialize this list before we setup the swtnl pieces. + +Found/fixed by Charmaine Lee. + +Cc: "10.0" <mesa-sta...@lists.freedesktop.org> +Reviewed-by: Thomas Hellstrom <thellst...@vmware.com> +Reviewed-by: Jakob Bornecrantz <ja...@vmware.com> + +Conflicts: + src/gallium/drivers/svga/svga_context.c +--- + src/gallium/drivers/svga/svga_context.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c +index 4da9a65..0ffff9c 100644 +--- a/src/gallium/drivers/svga/svga_context.c ++++ b/src/gallium/drivers/svga/svga_context.c +@@ -92,6 +92,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen, + if (svga == NULL) + goto no_svga; + ++ LIST_INITHEAD(&svga->dirty_buffers); ++ + svga->pipe.screen = screen; + svga->pipe.priv = priv; + svga->pipe.destroy = svga_destroy; +@@ -154,8 +156,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen, + + svga->dirty = ~0; + +- LIST_INITHEAD(&svga->dirty_buffers); +- + return &svga->pipe; + + no_state: +-- +1.9.1 + diff --git a/debian/patches/svga-replace-sampler-assertion.patch b/debian/patches/svga-replace-sampler-assertion.patch new file mode 100644 index 0000000..030ad93 --- /dev/null +++ b/debian/patches/svga-replace-sampler-assertion.patch @@ -0,0 +1,96 @@ +From 172f80cf326d5e2b105b422e9dc479f19cb07c96 Mon Sep 17 00:00:00 2001 +From: Brian Paul <bri...@vmware.com> +Date: Thu, 3 Apr 2014 08:45:42 -0600 +Subject: [PATCH 2/3] svga: replace sampler assertion with conditional + +For TEX instructions, the set of samplers and sampler views should +be consistent. The XA state tracker sometimes passes an inconsistent +set of samplers and sampler views. Rather than assert and die, issue +a warning. + +v2: add debugging code to detect inconsistent state. +v3: also check for null sampler in svga_state_tss.c + +Cc: "10.0" "10.1" <mesa-sta...@lists.freedesktop.org> +Reviewed-by: Thomas Hellstrom <thellst...@vmware.com> +--- + src/gallium/drivers/svga/svga_state_fs.c | 36 +++++++++++++++++++++++++++---- + src/gallium/drivers/svga/svga_state_tss.c | 2 +- + 2 files changed, 33 insertions(+), 5 deletions(-) + +diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c +index dde739c..7931528 100644 +--- a/src/gallium/drivers/svga/svga_state_fs.c ++++ b/src/gallium/drivers/svga/svga_state_fs.c +@@ -235,15 +235,43 @@ make_fs_key(const struct svga_context *svga, + if (svga->curr.blend->need_white_fragments) { + key->white_fragments = 1; + } +- ++ ++#ifdef DEBUG ++ /* ++ * We expect a consistent set of samplers and sampler views. ++ * Do some debug checks/warnings here. ++ */ ++ { ++ static boolean warned = FALSE; ++ unsigned i, n = MAX2(svga->curr.num_sampler_views, ++ svga->curr.num_samplers); ++ /* Only warn once to prevent too much debug output */ ++ if (!warned) { ++ if (svga->curr.num_sampler_views != svga->curr.num_samplers) { ++ debug_printf("svga: mismatched number of sampler views (%u) " ++ "vs. samplers (%u)\n", ++ svga->curr.num_sampler_views, ++ svga->curr.num_samplers); ++ } ++ for (i = 0; i < n; i++) { ++ if ((svga->curr.sampler_views[i] == NULL) != ++ (svga->curr.sampler[i] == NULL)) ++ debug_printf("sampler_view[%u] = %p but sampler[%u] = %p\n", ++ i, svga->curr.sampler_views[i], ++ i, svga->curr.sampler[i]); ++ } ++ warned = TRUE; ++ } ++ } ++#endif ++ + /* XXX: want to limit this to the textures that the shader actually + * refers to. + * + * SVGA_NEW_TEXTURE_BINDING | SVGA_NEW_SAMPLER + */ + for (i = 0; i < svga->curr.num_sampler_views; i++) { +- if (svga->curr.sampler_views[i]) { +- assert(svga->curr.sampler[i]); ++ if (svga->curr.sampler_views[i] && svga->curr.sampler[i]) { + assert(svga->curr.sampler_views[i]->texture); + key->tex[i].texture_target = svga->curr.sampler_views[i]->texture->target; + if (!svga->curr.sampler[i]->normalized_coords) { +@@ -262,7 +290,7 @@ make_fs_key(const struct svga_context *svga, + + idx = 0; + for (i = 0; i < svga->curr.num_samplers; ++i) { +- if (svga->curr.sampler_views[i]) { ++ if (svga->curr.sampler_views[i] && svga->curr.sampler[i]) { + struct pipe_resource *tex = svga->curr.sampler_views[i]->texture; + struct svga_texture *stex = svga_texture(tex); + SVGA3dSurfaceFormat format = stex->key.format; +diff --git a/src/gallium/drivers/svga/svga_state_tss.c b/src/gallium/drivers/svga/svga_state_tss.c +index 988372f..0ab571c 100644 +--- a/src/gallium/drivers/svga/svga_state_tss.c ++++ b/src/gallium/drivers/svga/svga_state_tss.c +@@ -85,7 +85,7 @@ update_tss_binding(struct svga_context *svga, + struct pipe_sampler_view *sv = svga->curr.sampler_views[i]; + + /* get min max lod */ +- if (sv) { ++ if (sv && s) { + min_lod = MAX2(0, (s->view_min_lod + sv->u.tex.first_level)); + max_lod = MIN2(s->view_max_lod + sv->u.tex.first_level, + sv->texture->last_level); +-- +1.9.1 + -- 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/e1wyxnr-0002fg...@moszumanska.debian.org