diff --git a/renderdoc/driver/d3d12/d3d12_replay.cpp b/renderdoc/driver/d3d12/d3d12_replay.cpp index 89b455749..b8d5686e9 100644 --- a/renderdoc/driver/d3d12/d3d12_replay.cpp +++ b/renderdoc/driver/d3d12/d3d12_replay.cpp @@ -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; diff --git a/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp b/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp index 5aeb1c3fc..086bc2cd4 100644 --- a/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp +++ b/renderdoc/driver/d3d12/d3d12_shaderdebug.cpp @@ -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;