windowscodecs: Fix alpha mode of DXT3 and DXT5 image.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com> Signed-off-by: Esme Povirk <esme@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2d0480ecc3
commit
72ad4e7dc1
|
@ -259,15 +259,12 @@ static WICDdsAlphaMode get_alpha_mode_from_fourcc(DWORD fourcc)
|
|||
{
|
||||
switch (fourcc)
|
||||
{
|
||||
case MAKEFOURCC('D', 'X', 'T', '1'):
|
||||
case MAKEFOURCC('D', 'X', 'T', '2'):
|
||||
case MAKEFOURCC('D', 'X', 'T', '4'):
|
||||
return WICDdsAlphaModePremultiplied;
|
||||
case MAKEFOURCC('D', 'X', 'T', '3'):
|
||||
case MAKEFOURCC('D', 'X', 'T', '5'):
|
||||
return WICDdsAlphaModeStraight;
|
||||
default:
|
||||
return WICDdsAlphaModeUnknown;
|
||||
case MAKEFOURCC('D', 'X', 'T', '1'):
|
||||
case MAKEFOURCC('D', 'X', 'T', '2'):
|
||||
case MAKEFOURCC('D', 'X', 'T', '4'):
|
||||
return WICDdsAlphaModePremultiplied;
|
||||
default:
|
||||
return WICDdsAlphaModeUnknown;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -650,7 +650,6 @@ static void test_dds_decoder_image_parameters(void)
|
|||
"Test %u: Expected DxgiFormat %#x, got %#x\n", i, test_data[i].expected_parameters.DxgiFormat, parameters.DxgiFormat);
|
||||
ok(parameters.Dimension == test_data[i].expected_parameters.Dimension,
|
||||
"Test %u: Expected Dimension %#x, got %#x\n", i, test_data[i].expected_parameters.Dimension, parameters.Dimension);
|
||||
todo_wine_if(test_data[i].data == test_dds_dxt5 || test_data[i].data == test_dds_dxt3)
|
||||
ok(parameters.AlphaMode == test_data[i].expected_parameters.AlphaMode,
|
||||
"Test %u: Expected AlphaMode %#x, got %#x\n", i, test_data[i].expected_parameters.AlphaMode, parameters.AlphaMode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue