From 661b416e07004655af3f372114119e4f8166496e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 6 Mar 2010 20:30:28 -0800 Subject: gallivm: Initialize variables for default cases. Fixes use of uninitialized variables in non-debug builds. --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index bc2f307c33b..9058f76c1df 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -538,6 +538,9 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld, default: assert(0); + coord0 = NULL; + coord1 = NULL; + weight = NULL; } *x0_out = coord0; @@ -700,6 +703,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld, default: assert(0); + icoord = NULL; } return icoord; -- cgit v1.2.3 From ee6fbf8d2f4718452c36366a08aa798cdda45ace Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 3 Mar 2010 23:51:13 +0800 Subject: st/vega: Fix OpenVG demo segfaults. When the paint is color, paint_bind_samplers binds a dummy sampler without a texture. It causes demos requiring a sampler (those use a mask or an image) to crash. --- src/gallium/state_trackers/vega/paint.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c index caf0c14b745..cdb87d3bf68 100644 --- a/src/gallium/state_trackers/vega/paint.c +++ b/src/gallium/state_trackers/vega/paint.c @@ -639,9 +639,6 @@ VGint paint_bind_samplers(struct vg_paint *paint, struct pipe_sampler_state **sa } break; default: - samplers[0] = &paint->pattern.sampler; /* dummy */ - textures[0] = 0; - return 0; break; } return 0; -- cgit v1.2.3 From e1762fb870f86afc4f6bd000b4a1c059d161f10d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 8 Mar 2010 11:34:55 -0700 Subject: softpipe: zero-out entire clear_flags array in sp_tile_cache_flush_clear() Before, we only cleared the flags for the active tiles (the ones inside the framebuffer bound). The problem is if we later bound a different, larger surface to the tile cache we'd have some stale clear-flags still set (and mistakenly clear some tiles in the new surface). Fixes fd.o bug 26932. --- src/gallium/drivers/softpipe/sp_tile_cache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 3b30954ac8d..aedfdf1b469 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -299,13 +299,14 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc) x, y, TILE_SIZE, TILE_SIZE, tc->tile.data.color32, 0/*STRIDE*/); - /* do this? */ - clear_clear_flag(tc->clear_flags, addr); - numCleared++; } } } + + /* reset all clear flags to zero */ + memset(tc->clear_flags, 0, sizeof(tc->clear_flags)); + #if 0 debug_printf("num cleared: %u\n", numCleared); #endif -- cgit v1.2.3