mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-09 22:01:36 +00:00
Check if we're running feature level 11.1, not if the 11.1 iface is up
This commit is contained in:
1 parent
edda31248f
commit
d6e1b012de
5 files changed
+23
-12
No files matched your search
@@ -3344,7 +3344,7 @@ void D3D11DebugManager::PixelHistoryCopyPixel(CopyPixelParams &p, uint32_t x, ui
|
||||
ID3D11RenderTargetView* prevRTVs[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = {0};
|
||||
ID3D11UnorderedAccessView* prevUAVs[D3D11_1_UAV_SLOT_COUNT] = {0};
|
||||
ID3D11DepthStencilView *prevDSV = NULL;
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
m_pImmediateContext->OMGetRenderTargetsAndUnorderedAccessViews(UAVStartSlot, prevRTVs, &prevDSV,
|
||||
UAVStartSlot, numUAVs-UAVStartSlot, prevUAVs);
|
||||
|
||||
@@ -4336,7 +4336,7 @@ vector<PixelModification> D3D11DebugManager::PixelHistory(uint32_t frameID, vect
|
||||
ID3D11RenderTargetView* prevRTVs[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = {0};
|
||||
ID3D11UnorderedAccessView* prevUAVs[D3D11_1_UAV_SLOT_COUNT] = {0};
|
||||
ID3D11DepthStencilView *prevDSV = NULL;
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
m_pImmediateContext->OMGetRenderTargetsAndUnorderedAccessViews(UAVStartSlot, prevRTVs, &prevDSV,
|
||||
UAVStartSlot, numUAVs-UAVStartSlot, prevUAVs);
|
||||
|
||||
@@ -4461,7 +4461,7 @@ vector<PixelModification> D3D11DebugManager::PixelHistory(uint32_t frameID, vect
|
||||
ID3D11RenderTargetView* curRTVs[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = {0};
|
||||
ID3D11UnorderedAccessView* curUAVs[D3D11_1_UAV_SLOT_COUNT] = {0};
|
||||
ID3D11DepthStencilView *curDSV = NULL;
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
m_pImmediateContext->OMGetRenderTargetsAndUnorderedAccessViews(UAVStartSlot, curRTVs, &curDSV,
|
||||
UAVStartSlot, numUAVs-UAVStartSlot, curUAVs);
|
||||
|
||||
|
||||
@@ -564,6 +564,11 @@ void WrappedID3D11DeviceContext::EndFrame()
|
||||
m_pDevice->GetResourceManager()->FlushPendingDirty();
|
||||
}
|
||||
|
||||
bool WrappedID3D11DeviceContext::IsFL11_1()
|
||||
{
|
||||
return m_pDevice->GetFeatureLevel() >= D3D_FEATURE_LEVEL_11_1;
|
||||
}
|
||||
|
||||
void WrappedID3D11DeviceContext::ProcessChunk(uint64_t offset, D3D11ChunkType chunk, bool forceExecute)
|
||||
{
|
||||
if(chunk < FIRST_CONTEXT_CHUNK && !forceExecute)
|
||||
|
||||
@@ -272,6 +272,12 @@ public:
|
||||
ID3D11DeviceContext1* GetReal1() { return m_pRealContext1; }
|
||||
ID3D11DeviceContext2* GetReal2() { return m_pRealContext2; }
|
||||
|
||||
#if defined(INCLUDE_D3D_11_1)
|
||||
bool IsFL11_1();
|
||||
#else
|
||||
bool IsFL11_1() { return false; }
|
||||
#endif
|
||||
|
||||
void ProcessChunk(uint64_t offset, D3D11ChunkType chunk, bool forceExecute);
|
||||
void ReplayFakeContext(ResourceId id);
|
||||
void ReplayLog(LogState readType, uint32_t startEventID, uint32_t endEventID, bool partial);
|
||||
|
||||
@@ -1944,7 +1944,7 @@ bool D3D11DebugManager::GetHistogram(ResourceId texid, uint32_t sliceFace, uint3
|
||||
UINT UAV_keepcounts[D3D11_1_UAV_SLOT_COUNT];
|
||||
memset(&UAV_keepcounts[0], 0xff, sizeof(UAV_keepcounts));
|
||||
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
uavs[0] = m_DebugRender.histogramUAV;
|
||||
m_pImmediateContext->CSSetUnorderedAccessViews(0, numUAVs, uavs, UAV_keepcounts);
|
||||
|
||||
@@ -2035,7 +2035,7 @@ bool D3D11DebugManager::GetMinMax(ResourceId texid, uint32_t sliceFace, uint32_t
|
||||
m_pImmediateContext->CSSetConstantBuffers(0, 1, &cbuf);
|
||||
|
||||
ID3D11UnorderedAccessView *uavs[D3D11_1_UAV_SLOT_COUNT] = { NULL };
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
uavs[intIdx] = m_DebugRender.tileResultUAV[intIdx];
|
||||
m_pImmediateContext->CSSetUnorderedAccessViews(0, numUAVs, uavs, NULL);
|
||||
|
||||
@@ -2226,7 +2226,7 @@ void D3D11DebugManager::CopyArrayToTex2DMS(ID3D11Texture2D *destMS, ID3D11Textur
|
||||
m_pImmediateContext->CopyResource(srvResource, srcArray);
|
||||
|
||||
ID3D11UnorderedAccessView *uavs[D3D11_1_UAV_SLOT_COUNT] = { NULL };
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
UINT uavCounts[D3D11_1_UAV_SLOT_COUNT];
|
||||
memset(&uavCounts[0], 0xff, sizeof(uavCounts));
|
||||
|
||||
@@ -2515,7 +2515,7 @@ void D3D11DebugManager::CopyTex2DMSToArray(ID3D11Texture2D *destArray, ID3D11Tex
|
||||
ID3D11UnorderedAccessView *uavs[D3D11_1_UAV_SLOT_COUNT] = { NULL };
|
||||
UINT uavCounts[D3D11_1_UAV_SLOT_COUNT];
|
||||
memset(&uavCounts[0], 0xff, sizeof(uavCounts));
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
|
||||
m_pImmediateContext->CSSetUnorderedAccessViews(0, numUAVs, uavs, uavCounts);
|
||||
|
||||
@@ -3549,7 +3549,7 @@ bool D3D11DebugManager::RenderTexture(TextureDisplay cfg, bool blendAlpha)
|
||||
ID3D11UnorderedAccessView *NullUAVs[D3D11_1_UAV_SLOT_COUNT] = { 0 };
|
||||
UINT UAV_keepcounts[D3D11_1_UAV_SLOT_COUNT];
|
||||
memset(&UAV_keepcounts[0], 0xff, sizeof(UAV_keepcounts));
|
||||
const UINT numUAVs = m_WrappedContext->GetReal1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
const UINT numUAVs = m_WrappedContext->IsFL11_1() ? D3D11_1_UAV_SLOT_COUNT : D3D11_PS_CS_UAV_REGISTER_COUNT;
|
||||
|
||||
m_pImmediateContext->CSSetUnorderedAccessViews(0, numUAVs, NullUAVs, UAV_keepcounts);
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ D3D11RenderState::D3D11RenderState(WrappedID3D11DeviceContext *context)
|
||||
|
||||
// CS
|
||||
context->CSGetShaderResources(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, CS.SRVs);
|
||||
if(context->GetReal1())
|
||||
if(context->IsFL11_1())
|
||||
context->CSGetUnorderedAccessViews(0, D3D11_1_UAV_SLOT_COUNT, CSUAVs);
|
||||
else
|
||||
context->CSGetUnorderedAccessViews(0, D3D11_PS_CS_UAV_REGISTER_COUNT, CSUAVs);
|
||||
@@ -786,7 +786,7 @@ D3D11RenderState::D3D11RenderState(WrappedID3D11DeviceContext *context)
|
||||
}
|
||||
}
|
||||
|
||||
if(context->GetReal1())
|
||||
if(context->IsFL11_1())
|
||||
context->OMGetRenderTargetsAndUnorderedAccessViews(OM.UAVStartSlot, OM.RenderTargets,
|
||||
&OM.DepthView,
|
||||
OM.UAVStartSlot, D3D11_1_UAV_SLOT_COUNT-OM.UAVStartSlot, OM.UAVs);
|
||||
@@ -845,7 +845,7 @@ void D3D11RenderState::ApplyState(WrappedID3D11DeviceContext *context)
|
||||
// CS
|
||||
context->CSSetShaderResources(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, CS.SRVs);
|
||||
context->CSSetSamplers(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT, CS.Samplers);
|
||||
if(context->GetReal1())
|
||||
if(context->IsFL11_1())
|
||||
context->CSSetUnorderedAccessViews(0, D3D11_1_UAV_SLOT_COUNT, CSUAVs, UAV_keepcounts);
|
||||
else
|
||||
context->CSSetUnorderedAccessViews(0, D3D11_PS_CS_UAV_REGISTER_COUNT, CSUAVs, UAV_keepcounts);
|
||||
@@ -876,7 +876,7 @@ void D3D11RenderState::ApplyState(WrappedID3D11DeviceContext *context)
|
||||
context->OMSetBlendState(OM.BlendState, OM.BlendFactor, OM.SampleMask);
|
||||
context->OMSetDepthStencilState(OM.DepthStencilState, OM.StencRef);
|
||||
|
||||
if(context->GetReal1())
|
||||
if(context->IsFL11_1())
|
||||
context->OMSetRenderTargetsAndUnorderedAccessViews(OM.UAVStartSlot, OM.RenderTargets,
|
||||
OM.DepthView,
|
||||
OM.UAVStartSlot, D3D11_1_UAV_SLOT_COUNT-OM.UAVStartSlot, OM.UAVs, UAV_keepcounts);
|
||||
|
||||
Reference in new issue
Block a user