<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="">
<div class="">Should have parens on the zsbuf test line to match your corresponding change for cbuf attachments.</div>
<div class=""><br class="">
</div>
With that change, 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 Dec 2, 2016, at 1:18 PM, George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Include propagation of comparisons further down.<br class="">
---<br class="">
src/gallium/drivers/swr/swr_clear.cpp | 14 +++++++-------<br class="">
1 file changed, 7 insertions(+), 7 deletions(-)<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 f59179f..08eead8 100644<br class="">
--- a/src/gallium/drivers/swr/swr_clear.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_clear.cpp<br class="">
@@ -35,7 +35,7 @@ swr_clear(struct pipe_context *pipe,<br class="">
struct pipe_framebuffer_state *fb = &ctx->framebuffer;<br class="">
<br class="">
UINT clearMask = 0;<br class="">
- int layers = 0;<br class="">
+ unsigned layers = 0;<br class="">
<br class="">
if (!swr_check_render_cond(pipe))<br class="">
return;<br class="">
@@ -47,20 +47,20 @@ swr_clear(struct pipe_context *pipe,<br class="">
if (fb->cbufs[i] && (buffers & (PIPE_CLEAR_COLOR0 << i))) {<br class="">
clearMask |= (SWR_ATTACHMENT_COLOR0_BIT << i);<br class="">
layers = std::max(layers, fb->cbufs[i]->u.tex.last_layer -<br class="">
- fb->cbufs[i]->u.tex.first_layer + 1);<br class="">
+ fb->cbufs[i]->u.tex.first_layer + 1u);<br class="">
}<br class="">
}<br class="">
<br class="">
if (buffers & PIPE_CLEAR_DEPTH && fb->zsbuf) {<br class="">
clearMask |= SWR_ATTACHMENT_DEPTH_BIT;<br class="">
layers = std::max(layers, fb->zsbuf->u.tex.last_layer -<br class="">
- fb->zsbuf->u.tex.first_layer + 1);<br class="">
+ fb->zsbuf->u.tex.first_layer + 1u);<br class="">
}<br class="">
<br class="">
if (buffers & PIPE_CLEAR_STENCIL && fb->zsbuf) {<br class="">
clearMask |= SWR_ATTACHMENT_STENCIL_BIT;<br class="">
layers = std::max(layers, fb->zsbuf->u.tex.last_layer -<br class="">
- fb->zsbuf->u.tex.first_layer + 1);<br class="">
+ fb->zsbuf->u.tex.first_layer + 1u);<br class="">
}<br class="">
<br class="">
#if 0 // XXX HACK, override clear color alpha. On ubuntu, clears are<br class="">
@@ -68,7 +68,7 @@ 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="">
- for (int i = 0; i < layers; ++i) {<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="">
@@ -76,11 +76,11 @@ swr_clear(struct pipe_context *pipe,<br class="">
<br class="">
// Mask out the attachments that are out of layers.<br class="">
if (fb->zsbuf &&<br class="">
- fb->zsbuf->u.tex.last_layer - fb->zsbuf->u.tex.first_layer <= i)<br class="">
+ fb->zsbuf->u.tex.last_layer <= fb->zsbuf->u.tex.first_layer + i)<br class="">
clearMask &= ~(SWR_ATTACHMENT_DEPTH_BIT | SWR_ATTACHMENT_STENCIL_BIT);<br class="">
for (unsigned c = 0; c < fb->nr_cbufs; ++c) {<br class="">
const struct pipe_surface *sf = fb->cbufs[c];<br class="">
- if (sf && sf->u.tex.last_layer - sf->u.tex.first_layer <= i)<br class="">
+ if (sf && (sf->u.tex.last_layer <= sf->u.tex.first_layer + i))<br class="">
clearMask &= ~(SWR_ATTACHMENT_COLOR0_BIT << c);<br class="">
}<br class="">
}<br class="">
-- <br class="">
2.10.0.windows.1<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>