<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 12, 2015 at 9:59 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The bytes comparison is an approximation of what the spec says... it<br>
has those explicit classes. But this is probably good enough...<br></blockquote><div> <br></div><div>Yeah, as long as we don't add anything to the list that's not called out as being usable with copy_image, we should be ok.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reviewed-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>><br></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
On Fri, Mar 13, 2015 at 12:23 AM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> This isn't actually supported by the GL_ARB_copy_image spec.<br>
> ---<br>
> tests/spec/arb_copy_image/formats.c | 17 ++++++++++++++---<br>
> 1 file changed, 14 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/tests/spec/arb_copy_image/formats.c b/tests/spec/arb_copy_image/formats.c<br>
> index 8a5faa7..aa9b4d3 100644<br>
> --- a/tests/spec/arb_copy_image/formats.c<br>
> +++ b/tests/spec/arb_copy_image/formats.c<br>
> @@ -261,10 +261,21 @@ is_format_supported(struct texture_format *format)<br>
> static bool<br>
> are_formats_compatible(struct texture_format *f1, struct texture_format *f2)<br>
> {<br>
> - if (f1->can_be_reinterpreted && f2->can_be_reinterpreted)<br>
> - return f1->bytes == f2->bytes;<br>
> + if (f1 == f2)<br>
> + return true;<br>
> +<br>
> + if (is_format_compressed(f1)) {<br>
> + if (is_format_compressed(f2))<br>
> + /* Compressed-to-compressed copies are not supported */<br>
> + return false;<br>
><br>
> - return f1 == f2;<br>
> + return f1->bytes == f2->bytes;<br>
> + } else if (is_format_compressed(f2)) {<br>
> + return f1->bytes == f2->bytes;<br>
> + } else {<br>
> + return f1->can_be_reinterpreted && f2->can_be_reinterpreted &&<br>
> + f1->bytes == f2->bytes;<br>
> + }<br>
> }<br>
><br>
> static const float green[3] = {0.0, 1.0, 0.0};<br>
> --<br>
> 2.3.2<br>
><br>
</div></div>> _______________________________________________<br>
> Piglit mailing list<br>
> <a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</blockquote></div><br></div></div>