<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<meta content="text/html; charset=UTF-8">
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Series looks good me.</p>
<p><br>
</p>
<p>Reviewed-by: Neha Bhende <bhenden@vmware.com><br>
</p>
<p><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Regards,</p>
<p>Neha<br>
</p>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Brian Paul <brianp@vmware.com><br>
<b>Sent:</b> Friday, August 26, 2016 8:27:18 AM<br>
<b>To:</b> mesa-dev@lists.freedesktop.org<br>
<b>Cc:</b> Neha Bhende; Jose Fonseca<br>
<b>Subject:</b> [PATCH 14/14] svga: move some code in svga_propagate_surface()</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Move computation of zslice, layer inside the conditional where they're<br>
used.<br>
---<br>
 src/gallium/drivers/svga/svga_surface.c | 37 +++++++++++++++++----------------<br>
 1 file changed, 19 insertions(+), 18 deletions(-)<br>
<br>
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c<br>
index 4b0b56c..00e9cbc 100644<br>
--- a/src/gallium/drivers/svga/svga_surface.c<br>
+++ b/src/gallium/drivers/svga/svga_surface.c<br>
@@ -607,35 +607,36 @@ svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf)<br>
    struct svga_surface *s = svga_surface(surf);<br>
    struct svga_texture *tex = svga_texture(surf->texture);<br>
    struct svga_screen *ss = svga_screen(surf->texture->screen);<br>
-   unsigned zslice, layer;<br>
-   unsigned nlayers = 1;<br>
-   unsigned i;<br>
 <br>
    if (!s->dirty)<br>
       return;<br>
 <br>
    SVGA_STATS_TIME_PUSH(ss->sws, SVGA_STATS_TIME_PROPAGATESURFACE);<br>
 <br>
-   if (surf->texture->target == PIPE_TEXTURE_CUBE) {<br>
-      zslice = 0;<br>
-      layer = surf->u.tex.first_layer;<br>
-   }<br>
-   else if (surf->texture->target == PIPE_TEXTURE_1D_ARRAY ||<br>
-            surf->texture->target == PIPE_TEXTURE_2D_ARRAY) {<br>
-      zslice = 0;<br>
-      layer = surf->u.tex.first_layer;<br>
-      nlayers = surf->u.tex.last_layer - surf->u.tex.first_layer + 1;<br>
-   }<br>
-   else {<br>
-      zslice = surf->u.tex.first_layer;<br>
-      layer = 0;<br>
-   }<br>
-<br>
    s->dirty = FALSE;<br>
    ss->texture_timestamp++;<br>
    svga_age_texture_view(tex, surf->u.tex.level);<br>
 <br>
    if (s->handle != tex->handle) {<br>
+      unsigned zslice, layer;<br>
+      unsigned nlayers = 1;<br>
+      unsigned i;<br>
+<br>
+      if (surf->texture->target == PIPE_TEXTURE_CUBE) {<br>
+         zslice = 0;<br>
+         layer = surf->u.tex.first_layer;<br>
+      }<br>
+      else if (surf->texture->target == PIPE_TEXTURE_1D_ARRAY ||<br>
+               surf->texture->target == PIPE_TEXTURE_2D_ARRAY) {<br>
+         zslice = 0;<br>
+         layer = surf->u.tex.first_layer;<br>
+         nlayers = surf->u.tex.last_layer - surf->u.tex.first_layer + 1;<br>
+      }<br>
+      else {<br>
+         zslice = surf->u.tex.first_layer;<br>
+         layer = 0;<br>
+      }<br>
+<br>
       SVGA_DBG(DEBUG_VIEWS,<br>
                "svga: Surface propagate: tex %p, level %u, from %p\n",<br>
                tex, surf->u.tex.level, surf);<br>
-- <br>
1.9.1<br>
<br>
</div>
</span></font></div>
</body>
</html>