<div dir="ltr">I've updated the patch to set the flipped flag as well.<div><br></div><div>I verified that all the flags were being set. As for the data in the rest of the structure that is filled in from the compressed data using whatever technique was coded in the compressed data. I don't think it's necessary to zero out the full structure, just the flags.</div>
<div><br></div><div>Courtney</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 1:51 PM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 02/14/2014 08:05 AM, Courtney Goeltzenleuchter wrote:<br>
> Initialize field to eliminate valgrind warning.<br>
<br>
</div>There are a couple other fields that aren't set it all paths (e.g.,<br>
flipped). I want to suggest just memseting the whole structure, but<br>
it's not obvious to me how it's used throughout the code.<br>
<br>
I suspect the code was more clear before ETC2 support was added...<br>
<div class="HOEnZb"><div class="h5"><br>
> Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com><br>
> ---<br>
> src/mesa/main/texcompress_etc.c | 1 +<br>
> 1 file changed, 1 insertion(+)<br>
><br>
> diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c<br>
> index f9234b0..97adc86 100644<br>
> --- a/src/mesa/main/texcompress_etc.c<br>
> +++ b/src/mesa/main/texcompress_etc.c<br>
> @@ -350,6 +350,7 @@ etc2_rgb8_parse_block(struct etc2_block *block,<br>
> block->is_t_mode = false;<br>
> block->is_h_mode = false;<br>
> block->is_planar_mode = false;<br>
> + block->opaque = false;<br>
><br>
> if (punchthrough_alpha)<br>
> block->opaque = src[3] & 0x2;<br>
><br>
<br>
</div></div></blockquote></div><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>
</div>