Skip to content
Snippets Groups Projects
Commit 52e93e30 authored by Lucas Stach's avatar Lucas Stach
Browse files

etnaviv: fix texture_format_needs_swiz


memcmp returns 0 when both swizzles are the same, which means we don't
need any hardware swizzling. texture_format_needs_swiz should return
true when the return value of the memcmp is non-zero.

Fixes: 751ae6af ("etnaviv: add support for swizzled texture formats")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Tested-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: default avatarWladimir J. van der Laan <laanwj@gmail.com>
parent 8f139757
No related branches found
No related tags found
No related merge requests found
......@@ -302,7 +302,7 @@ texture_format_needs_swiz(enum pipe_format fmt)
bool swiz = false;
if (formats[fmt].present)
swiz = !memcmp(def, formats[fmt].tex_swiz, sizeof(formats[fmt].tex_swiz));
swiz = !!memcmp(def, formats[fmt].tex_swiz, sizeof(formats[fmt].tex_swiz));
return swiz;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment