<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Reviewed-by: Tim Rowley <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 26, 2017, at 10:26 AM, Bruce Cherniak <<a href="mailto:bruce.cherniak@intel.com" class="">bruce.cherniak@intel.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Fix regression of "no rendering" on simple apps like glxgears by<br class="">
setting an explicit full surface clear_rect when scissor is not<br class="">
enabled.<br class="">
<br class="">
This regressed with commit 00173d91 "st/mesa: don't set 16<br class="">
scissors and 16 viewports if they're unused" due to an assumption<br class="">
that a default scissor rect is always set, which was the case prior<br class="">
to this optimization.<br class="">
---<br class="">
src/gallium/drivers/swr/swr_clear.cpp | 10 +++++++++-<br class="">
1 file changed, 9 insertions(+), 1 deletion(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/swr_clear.cpp b/src/gallium/drivers/swr/swr_clear.cpp<br class="">
index 53f4e02d45..3a35805a7a 100644<br class="">
--- a/src/gallium/drivers/swr/swr_clear.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_clear.cpp<br class="">
@@ -68,11 +68,19 @@ swr_clear(struct pipe_context *pipe,<br class="">
   ((union pipe_color_union *)color)->f[3] = 1.0; /* cast off your const'd-ness */<br class="">
#endif<br class="">
<br class="">
+   SWR_RECT clear_rect;<br class="">
+   /* If enabled, clear to scissor; otherwise clear full surface */<br class="">
+   if (ctx->rasterizer && ctx->rasterizer->scissor) {<br class="">
+      clear_rect = ctx->swr_scissor;<br class="">
+   } else {<br class="">
+      clear_rect = {0, 0, (int32_t)fb->width, (int32_t)fb->height};<br class="">
+   }<br class="">
+<br class="">
   for (unsigned i = 0; i < layers; ++i) {<br class="">
      swr_update_draw_context(ctx);<br class="">
      SwrClearRenderTarget(ctx->swrContext, clearMask, i,<br class="">
                           color->f, depth, stencil,<br class="">
-                           ctx->swr_scissor);<br class="">
+                           clear_rect);<br class="">
<br class="">
      // Mask out the attachments that are out of layers.<br class="">
      if (fb->zsbuf &&<br class="">
-- <br class="">
2.11.0<br class="">
<br class="">
_______________________________________________<br class="">
mesa-dev mailing list<br class="">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="">mesa-dev@lists.freedesktop.org</a><br class="">
https://lists.freedesktop.org/mailman/listinfo/mesa-dev<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>