Fix wrong enum comparisons

This commit is contained in:
baldurk
2020-06-03 12:17:43 +01:00
parent ee02cfa130
commit ebb8108781
2 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -807,14 +807,14 @@ void D3D12Replay::FillResourceView(D3D12Pipe::View &view, const D3D12Descriptor
view.numMips = srv.Texture3D.MipLevels;
view.minLODClamp = srv.Texture3D.ResourceMinLODClamp;
}
else if(srv.ViewDimension == D3D11_SRV_DIMENSION_TEXTURECUBE)
else if(srv.ViewDimension == D3D12_SRV_DIMENSION_TEXTURECUBE)
{
view.numSlices = 6;
view.firstMip = srv.TextureCube.MostDetailedMip;
view.numMips = srv.TextureCube.MipLevels;
view.minLODClamp = srv.TextureCube.ResourceMinLODClamp;
}
else if(srv.ViewDimension == D3D11_SRV_DIMENSION_TEXTURECUBEARRAY)
else if(srv.ViewDimension == D3D12_SRV_DIMENSION_TEXTURECUBEARRAY)
{
view.numSlices = srv.TextureCubeArray.NumCubes * 6;
view.firstSlice = srv.TextureCubeArray.First2DArrayFace;
+9 -7
View File
@@ -724,7 +724,7 @@ ShaderVariable D3D12DebugAPIWrapper::GetBufferInfo(DXBCBytecode::OperandType typ
D3D12_RESOURCE_DESC resDesc = pResource->GetDesc();
D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc = desc->GetSRV();
if(srvDesc.ViewDimension == D3D12_UAV_DIMENSION_BUFFER)
if(srvDesc.ViewDimension == D3D12_SRV_DIMENSION_BUFFER)
{
result.value.u.x = result.value.u.y = result.value.u.z = result.value.u.w =
(uint32_t)srvDesc.Buffer.NumElements;
@@ -2689,17 +2689,19 @@ void ExtractInputsPS(PSInput IN, float4 debug_pixelPos : SV_Position,
pWinnerHit = pHit;
evalSampleCache = ((float *)evalData.data()) + evalSampleCacheData.size() * 4 * i;
}
else if((depthFunc == D3D11_COMPARISON_ALWAYS || depthFunc == D3D11_COMPARISON_NEVER ||
depthFunc == D3D11_COMPARISON_NOT_EQUAL || depthFunc == D3D11_COMPARISON_EQUAL))
else if((depthFunc == D3D12_COMPARISON_FUNC_ALWAYS ||
depthFunc == D3D12_COMPARISON_FUNC_NEVER ||
depthFunc == D3D12_COMPARISON_FUNC_NOT_EQUAL ||
depthFunc == D3D12_COMPARISON_FUNC_EQUAL))
{
// For depth functions without an inequality comparison, use the last sample encountered
pWinnerHit = pHit;
evalSampleCache = ((float *)evalData.data()) + evalSampleCacheData.size() * 4 * i;
}
else if((depthFunc == D3D11_COMPARISON_LESS && pHit->depth < pWinnerHit->depth) ||
(depthFunc == D3D11_COMPARISON_LESS_EQUAL && pHit->depth <= pWinnerHit->depth) ||
(depthFunc == D3D11_COMPARISON_GREATER && pHit->depth > pWinnerHit->depth) ||
(depthFunc == D3D11_COMPARISON_GREATER_EQUAL && pHit->depth >= pWinnerHit->depth))
else if((depthFunc == D3D12_COMPARISON_FUNC_LESS && pHit->depth < pWinnerHit->depth) ||
(depthFunc == D3D12_COMPARISON_FUNC_LESS_EQUAL && pHit->depth <= pWinnerHit->depth) ||
(depthFunc == D3D12_COMPARISON_FUNC_GREATER && pHit->depth > pWinnerHit->depth) ||
(depthFunc == D3D12_COMPARISON_FUNC_GREATER_EQUAL && pHit->depth >= pWinnerHit->depth))
{
// For depth functions with an inequality, find the hit that "wins" the most
pWinnerHit = pHit;