mirror of
https://github.com/microsoft/DirectXTex
synced 2024-12-27 11:50:13 +00:00
Force non-WIC paths for FP32->FP16 conversions (#99)
This commit is contained in:
parent
3771e6c66d
commit
e0457acb23
@ -4301,6 +4301,7 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for special cases
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
if (sformat == DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|| sformat == DXGI_FORMAT_R16_FLOAT
|
||||
@ -4312,7 +4313,30 @@ namespace
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check for special cases
|
||||
switch (sformat)
|
||||
{
|
||||
case DXGI_FORMAT_R32G32B32A32_FLOAT:
|
||||
case DXGI_FORMAT_R32G32B32_FLOAT:
|
||||
case DXGI_FORMAT_R32G32_FLOAT:
|
||||
case DXGI_FORMAT_R32_FLOAT:
|
||||
case DXGI_FORMAT_D32_FLOAT:
|
||||
switch (tformat)
|
||||
{
|
||||
case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
||||
case DXGI_FORMAT_R16G16_FLOAT:
|
||||
case DXGI_FORMAT_R16_FLOAT:
|
||||
// WIC conversions for FP32->FP16 can result in NaN values instead of clamping for min/max value
|
||||
return false;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (sformat)
|
||||
{
|
||||
case DXGI_FORMAT_R32G32B32A32_FLOAT:
|
||||
|
Loading…
Reference in New Issue
Block a user