From 35da00b47d81828e10c990e049314cac74195332 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jarkko=20P=C3=B6yry?= Date: Thu, 2 Apr 2015 11:23:31 -0700 Subject: [PATCH] Fix broken toRGBAMasked. - toRGBAMasked returned incorrect default value for alpha channel when the channel was not present. (i.e. rgb565, rgb888 formats). Bug: 20048027 Change-Id: I7fec467491a31e017b32737e6609ad4379c4091e --- modules/glshared/glsTextureTestUtil.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/glshared/glsTextureTestUtil.hpp b/modules/glshared/glsTextureTestUtil.hpp index e938cbb..6225efb 100644 --- a/modules/glshared/glsTextureTestUtil.hpp +++ b/modules/glshared/glsTextureTestUtil.hpp @@ -253,7 +253,7 @@ inline tcu::RGBA toRGBAMasked (const tcu::Vec4& v, deUint8 mask) return tcu::RGBA((mask&tcu::RGBA::RED_MASK) ? tcu::floatToU8(v.x()) : 0, (mask&tcu::RGBA::GREEN_MASK) ? tcu::floatToU8(v.y()) : 0, (mask&tcu::RGBA::BLUE_MASK) ? tcu::floatToU8(v.z()) : 0, - (mask&tcu::RGBA::ALPHA_MASK) ? tcu::floatToU8(v.w()) : 0); + (mask&tcu::RGBA::ALPHA_MASK) ? tcu::floatToU8(v.w()) : 0xFF); //!< \note Alpha defaults to full saturation when reading masked format } inline tcu::Vec4 toVec4 (const tcu::RGBA& c) -- 2.7.4