1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 01:24:11 +01:00

[d3d8] Use unsigned values to identify remapped sampler states

This commit is contained in:
WinterSnowfall 2024-11-16 18:15:17 +02:00 committed by Philip Rebohle
parent 482e758aee
commit ce1b06d0c6
2 changed files with 5 additions and 5 deletions

View File

@ -158,7 +158,7 @@ namespace dxvk {
}
// If this D3DTEXTURESTAGESTATETYPE has been remapped to a d3d9::D3DSAMPLERSTATETYPE
// it will be returned, otherwise returns -1
// it will be returned, otherwise returns -1u
inline d3d9::D3DSAMPLERSTATETYPE GetSamplerStateType9(const D3DTEXTURESTAGESTATETYPE StageType) {
switch (StageType) {
// 13-21:
@ -169,11 +169,11 @@ namespace dxvk {
case D3DTSS_MINFILTER: return d3d9::D3DSAMP_MINFILTER;
case D3DTSS_MIPFILTER: return d3d9::D3DSAMP_MIPFILTER;
case D3DTSS_MIPMAPLODBIAS: return d3d9::D3DSAMP_MIPMAPLODBIAS;
case D3DTSS_MAXMIPLEVEL: return d3d9::D3DSAMP_MIPFILTER;
case D3DTSS_MAXMIPLEVEL: return d3d9::D3DSAMP_MAXMIPLEVEL;
case D3DTSS_MAXANISOTROPY: return d3d9::D3DSAMP_MAXANISOTROPY;
// 25:
case D3DTSS_ADDRESSW: return d3d9::D3DSAMP_ADDRESSW;
default: return d3d9::D3DSAMPLERSTATETYPE(-1);
default: return d3d9::D3DSAMPLERSTATETYPE(-1u);
}
}
}

View File

@ -1282,7 +1282,7 @@ namespace dxvk {
DWORD* pValue) {
d3d9::D3DSAMPLERSTATETYPE stateType = GetSamplerStateType9(Type);
if (stateType != -1) {
if (stateType != -1u) {
// if the type has been remapped to a sampler state type:
return GetD3D9()->GetSamplerState(Stage, stateType, pValue);
}
@ -1298,7 +1298,7 @@ namespace dxvk {
d3d9::D3DSAMPLERSTATETYPE stateType = GetSamplerStateType9(Type);
StateChange();
if (stateType != -1) {
if (stateType != -1u) {
// if the type has been remapped to a sampler state type:
return GetD3D9()->SetSamplerState(Stage, stateType, Value);
} else {