mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
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:751ae6afbe("etnaviv: add support for swizzled texture formats") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Tested-by: Marek Vasut <marex@denx.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com> (cherry picked from commit52e93e309f)
This commit is contained in:
parent
264cda58ab
commit
7673c72f3d
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue