mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Fix the UNSIGNED_SHORT_5_5_5_1 case of premultiply_pixels
This commit is contained in:
parent
f726f18291
commit
d8b7394fa3
2 changed files with 3 additions and 8 deletions
|
@ -645,8 +645,9 @@ impl WebGLRenderingContext {
|
||||||
},
|
},
|
||||||
(TexFormat::RGBA, TexDataType::UnsignedShort5551) => {
|
(TexFormat::RGBA, TexDataType::UnsignedShort5551) => {
|
||||||
for rgba in pixels.chunks_mut(2) {
|
for rgba in pixels.chunks_mut(2) {
|
||||||
let pix = NativeEndian::read_u16(rgba);
|
if NativeEndian::read_u16(rgba) & 1 == 0 {
|
||||||
NativeEndian::write_u16(rgba, if pix & (1 << 15) != 0 { pix } else { 0 });
|
NativeEndian::write_u16(rgba, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(TexFormat::RGBA, TexDataType::UnsignedShort4444) => {
|
(TexFormat::RGBA, TexDataType::UnsignedShort4444) => {
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
[WebGL test #65: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
|
[WebGL test #65: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #66: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[WebGL test #69: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
|
[WebGL test #69: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #70: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue