X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_state_surface.c;h=375ceb2b942177aadd637f81bd25be9fb18d1de9;hb=1597176f7090eea73f41b3114ae2a02a50ac7a12;hp=7d86c5750c5e7e22d4e0b303235a8947bcd17631;hpb=dff50ff592da7cb1d784fae794dd1647a5445bca;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c index 7d86c5750c5..375ceb2b942 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c @@ -30,6 +30,7 @@ #include "pipe/p_state.h" #include "util/u_inlines.h" +#include "util/u_framebuffer.h" #include "util/u_surface.h" #include "lp_context.h" #include "lp_scene.h" @@ -52,13 +53,17 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb); - assert(fb->width <= MAXWIDTH); - assert(fb->height <= MAXHEIGHT); + assert(fb->width <= LP_MAX_WIDTH); + assert(fb->height <= LP_MAX_HEIGHT); if (changed) { util_copy_framebuffer_state(&lp->framebuffer, fb); + if (LP_PERF & PERF_NO_DEPTH) { + pipe_surface_reference(&lp->framebuffer.zsbuf, NULL); + } + /* Tell draw module how deep the Z/depth buffer is */ if (lp->framebuffer.zsbuf) { int depth_bits; @@ -72,6 +77,7 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, else { mrd = 0.00002; } + lp->mrd = mrd; draw_set_mrd(lp->draw, mrd); }