From f5bd93fae2e4f46665eb1f09ca64cb39ff2b8a79 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 3 Dec 2009 11:58:36 +0100 Subject: Move pf_get_component_bits() to u_format auxiliary module. --- src/gallium/drivers/softpipe/sp_state_surface.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/softpipe/sp_state_surface.c') diff --git a/src/gallium/drivers/softpipe/sp_state_surface.c b/src/gallium/drivers/softpipe/sp_state_surface.c index bc0e201130..a518248bb1 100644 --- a/src/gallium/drivers/softpipe/sp_state_surface.c +++ b/src/gallium/drivers/softpipe/sp_state_surface.c @@ -35,6 +35,8 @@ #include "draw/draw_context.h" +#include "util/u_format.h" + /** * XXX this might get moved someday @@ -80,8 +82,9 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe, if (sp->framebuffer.zsbuf) { int depth_bits; double mrd; - depth_bits = pf_get_component_bits(sp->framebuffer.zsbuf->format, - PIPE_FORMAT_COMP_Z); + depth_bits = util_format_get_component_bits(sp->framebuffer.zsbuf->format, + UTIL_FORMAT_COLORSPACE_ZS, + 0); if (depth_bits > 16) { mrd = 0.0000001; } -- cgit v1.2.3 From 7a15642f411613df51474d5c2ab85456b5ca41ce Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 26 Dec 2009 11:01:05 +0000 Subject: softpipe: Flush draw module before switching framebuffer. Otherwise geometry might end up in the wrong rendertarget. --- src/gallium/drivers/softpipe/sp_state_surface.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/softpipe/sp_state_surface.c') diff --git a/src/gallium/drivers/softpipe/sp_state_surface.c b/src/gallium/drivers/softpipe/sp_state_surface.c index a518248bb1..f6154109ea 100644 --- a/src/gallium/drivers/softpipe/sp_state_surface.c +++ b/src/gallium/drivers/softpipe/sp_state_surface.c @@ -51,6 +51,8 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe, struct softpipe_context *sp = softpipe_context(pipe); uint i; + draw_flush(sp->draw); + for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { /* check if changing cbuf */ if (sp->framebuffer.cbufs[i] != fb->cbufs[i]) { -- cgit v1.2.3