summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_surface.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-07-25 10:01:06 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:18 +0100
commitc5375da1dc058311f4d1b2f78c83eccefff5c732 (patch)
treea5a4157086633f0c1721315bcc8e35ced9578062 /src/gallium/drivers/llvmpipe/lp_state_surface.c
parent90caf1a3f39204a1a4b6207e0746ba694668c144 (diff)
llvmpipe: cleanup framebuffer state routine slightly
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_surface.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_surface.c50
1 files changed, 10 insertions, 40 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c
index d14621e374..1716048b3f 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c
@@ -75,51 +75,21 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
/* update cache */
lp_tile_cache_set_surface(lp->zsbuf_cache, fb->zsbuf);
- }
-
-#if 0
- /* XXX combined depth/stencil here */
-
- /* sbuf changing? */
- if (lp->framebuffer.sbuf != fb->sbuf) {
- /* flush old */
- lp_flush_tile_cache(lp, lp->sbuf_cache_sep);
-
- /* assign new */
- lp->framebuffer.sbuf = fb->sbuf;
-
- /* update cache */
- if (fb->sbuf != fb->zbuf) {
- /* separate stencil buf */
- lp->sbuf_cache = lp->sbuf_cache_sep;
- lp_tile_cache_set_surface(lp->sbuf_cache, fb->sbuf);
- }
- else {
- /* combined depth/stencil */
- lp->sbuf_cache = lp->zbuf_cache;
- lp_tile_cache_set_surface(lp->sbuf_cache, fb->sbuf);
- }
- }
-#endif
- /* Tell draw module how deep the Z/depth buffer is */
- {
- int depth_bits;
- double mrd;
+ /* Tell draw module how deep the Z/depth buffer is */
if (lp->framebuffer.zsbuf) {
+ int depth_bits;
+ double mrd;
depth_bits = pf_get_component_bits(lp->framebuffer.zsbuf->format,
PIPE_FORMAT_COMP_Z);
+ if (depth_bits > 16) {
+ mrd = 0.0000001;
+ }
+ else {
+ mrd = 0.00002;
+ }
+ draw_set_mrd(lp->draw, mrd);
}
- else {
- depth_bits = 0;
- }
- if (depth_bits > 16) {
- mrd = 0.0000001;
- }
- else {
- mrd = 0.00002;
- }
- draw_set_mrd(lp->draw, mrd);
}
lp->framebuffer.width = fb->width;