<div dir="ltr">Since we're not restricted to C89 in the driver, I put it as close to the point of use as possible -- but yes, I can move it to the top of the function if you think that's clearer.<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 6:58 AM, Courtney Goeltzenleuchter <span dir="ltr"><<a href="mailto:courtney@lunarg.com" target="_blank">courtney@lunarg.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Tue, Jan 21, 2014 at 3:34 AM, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We're about to need this in another place.<br>
<br>
Signed-off-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>><br>
---<br>
src/mesa/drivers/dri/i965/intel_fbo.c | 7 +++++--<br>
1 file changed, 5 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
index 4cdf54d..e7c5571 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
@@ -433,16 +433,19 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw,<br>
intel_miptree_check_level_layer(mt, level, layer);<br>
irb->mt_level = level;<br>
<br>
+ int layer_multiplier;<br></blockquote></div><div>Shouldn't this declaration be at the top of the function?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
switch (mt->msaa_layout) {<br>
case INTEL_MSAA_LAYOUT_UMS:<br>
case INTEL_MSAA_LAYOUT_CMS:<br>
- irb->mt_layer = layer * mt->num_samples;<br>
+ layer_multiplier = mt->num_samples;<br>
break;<br>
<br>
default:<br>
- irb->mt_layer = layer;<br>
+ layer_multiplier = 1;<br>
}<br>
<br>
+ irb->mt_layer = layer_multiplier * layer;<br>
+<br>
intel_miptree_reference(&irb->mt, mt);<br>
<br>
intel_renderbuffer_set_draw_offset(irb);<br>
</div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">--<br>
1.8.5.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Courtney Goeltzenleuchter<br><div>LunarG</div><div><img src="http://media.lunarg.com/wp-content/themes/LunarG/images/logo.png" width="96" height="65"><br>
</div></div>
</font></span></div></div>
</blockquote></div><br></div>