Update DX headers to 10.0.18362.0, add new interfaces

* ID3D12GraphicsCommandList5 and ID3D12Device6
This commit is contained in:
baldurk
2019-09-19 20:09:38 +01:00
parent ea5515b1da
commit 0bcf9a4e2d
37 changed files with 2564 additions and 178 deletions
+20 -3
View File
@@ -111,7 +111,7 @@ struct WrappedID3D12DebugCommandList : public ID3D12DebugCommandList2, public ID
}
};
class WrappedID3D12GraphicsCommandList : public ID3D12GraphicsCommandList4
class WrappedID3D12GraphicsCommandList : public ID3D12GraphicsCommandListX
{
private:
ID3D12GraphicsCommandList *m_pList = NULL;
@@ -119,6 +119,7 @@ private:
ID3D12GraphicsCommandList2 *m_pList2 = NULL;
ID3D12GraphicsCommandList3 *m_pList3 = NULL;
ID3D12GraphicsCommandList4 *m_pList4 = NULL;
ID3D12GraphicsCommandList5 *m_pList5 = NULL;
RefCounter12<ID3D12GraphicsCommandList> m_RefCounter;
@@ -165,6 +166,7 @@ public:
ID3D12GraphicsCommandList2 *GetReal2() { return m_pList2; }
ID3D12GraphicsCommandList3 *GetReal3() { return m_pList3; }
ID3D12GraphicsCommandList4 *GetReal4() { return m_pList4; }
ID3D12GraphicsCommandList5 *GetReal5() { return m_pList5; }
WrappedID3D12Device *GetWrappedDevice() { return m_pDevice; }
D3D12ResourceRecord *GetResourceRecord() { return m_ListRecord; }
D3D12ResourceRecord *GetCreationRecord() { return m_CreationRecord; }
@@ -173,7 +175,8 @@ public:
ID3D12GraphicsCommandList2 *GetCrackedList2();
ID3D12GraphicsCommandList3 *GetCrackedList3();
ID3D12GraphicsCommandList4 *GetCrackedList4();
ID3D12GraphicsCommandList4 *GetWrappedCrackedList();
ID3D12GraphicsCommandList5 *GetCrackedList5();
ID3D12GraphicsCommandListX *GetWrappedCrackedList();
void SetAMDMarkerInterface(IAmdExtD3DCommandListMarker *marker) { m_AMDMarkers = marker; }
void SetCommandData(D3D12CommandData *cmd) { m_Cmd = cmd; }
@@ -526,6 +529,15 @@ public:
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE, DispatchRays,
_In_ const D3D12_DISPATCH_RAYS_DESC *pDesc);
//////////////////////////////
// implement ID3D12GraphicsCommandList5
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE, RSSetShadingRate,
D3D12_SHADING_RATE baseShadingRate,
const D3D12_SHADING_RATE_COMBINER *combiners);
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE, RSSetShadingRateImage,
ID3D12Resource *shadingRateImage);
};
template <>
@@ -551,18 +563,23 @@ template <>
ResourceId GetResID(ID3D12GraphicsCommandList3 *obj);
template <>
ResourceId GetResID(ID3D12GraphicsCommandList4 *obj);
template <>
ResourceId GetResID(ID3D12GraphicsCommandList5 *obj);
ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList1 *obj);
ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList2 *obj);
ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList3 *obj);
ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList4 *obj);
ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList5 *obj);
ID3D12GraphicsCommandList1 *Unwrap1(ID3D12GraphicsCommandList1 *obj);
ID3D12GraphicsCommandList2 *Unwrap2(ID3D12GraphicsCommandList2 *obj);
ID3D12GraphicsCommandList3 *Unwrap3(ID3D12GraphicsCommandList3 *obj);
ID3D12GraphicsCommandList4 *Unwrap4(ID3D12GraphicsCommandList4 *obj);
ID3D12GraphicsCommandList5 *Unwrap5(ID3D12GraphicsCommandList5 *obj);
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList1 *obj);
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList2 *obj);
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList3 *obj);
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList4 *obj);
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList4 *obj);
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList5 *obj);
@@ -0,0 +1,168 @@
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2019 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
#include "d3d12_command_list.h"
template <typename SerialiserType>
bool WrappedID3D12GraphicsCommandList::Serialise_RSSetShadingRate(
SerialiserType &ser, D3D12_SHADING_RATE baseShadingRate,
const D3D12_SHADING_RATE_COMBINER *combiners)
{
ID3D12GraphicsCommandList5 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(baseShadingRate);
SERIALISE_ELEMENT_ARRAY(combiners, 2);
SERIALISE_CHECK_READ_ERRORS();
if(IsReplayingAndReading())
{
if(GetWrapped(pCommandList)->GetReal5() == NULL)
{
RDCERR("Can't replay ID3D12GraphicsCommandList5 command");
return false;
}
m_Cmd->m_LastCmdListID = GetResourceManager()->GetOriginalID(GetResID(pCommandList));
if(IsActiveReplaying(m_State))
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
Unwrap5(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID))
->RSSetShadingRate(baseShadingRate, combiners);
if(m_Cmd->IsPartialCmdList(m_Cmd->m_LastCmdListID))
{
m_Cmd->m_RenderState.shadingRate = baseShadingRate;
if(combiners)
{
m_Cmd->m_RenderState.shadingRateCombiners[0] = combiners[0];
m_Cmd->m_RenderState.shadingRateCombiners[1] = combiners[1];
}
}
}
}
else
{
Unwrap5(pCommandList)->RSSetShadingRate(baseShadingRate, combiners);
GetCrackedList5()->RSSetShadingRate(baseShadingRate, combiners);
D3D12RenderState &state = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].state;
state.shadingRate = baseShadingRate;
if(combiners)
{
state.shadingRateCombiners[0] = combiners[0];
state.shadingRateCombiners[1] = combiners[1];
}
}
}
return true;
}
void STDMETHODCALLTYPE WrappedID3D12GraphicsCommandList::RSSetShadingRate(
D3D12_SHADING_RATE baseShadingRate, const D3D12_SHADING_RATE_COMBINER *combiners)
{
SERIALISE_TIME_CALL(m_pList5->RSSetShadingRate(baseShadingRate, combiners));
if(IsCaptureMode(m_State))
{
CACHE_THREAD_SERIALISER();
SCOPED_SERIALISE_CHUNK(D3D12Chunk::List_RSSetShadingRate);
Serialise_RSSetShadingRate(ser, baseShadingRate, combiners);
m_ListRecord->AddChunk(scope.Get());
}
}
template <typename SerialiserType>
bool WrappedID3D12GraphicsCommandList::Serialise_RSSetShadingRateImage(SerialiserType &ser,
ID3D12Resource *shadingRateImage)
{
ID3D12GraphicsCommandList5 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(shadingRateImage);
SERIALISE_CHECK_READ_ERRORS();
if(IsReplayingAndReading())
{
if(GetWrapped(pCommandList)->GetReal5() == NULL)
{
RDCERR("Can't replay ID3D12GraphicsCommandList5 command");
return false;
}
m_Cmd->m_LastCmdListID = GetResourceManager()->GetOriginalID(GetResID(pCommandList));
if(IsActiveReplaying(m_State))
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
Unwrap5(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID))
->RSSetShadingRateImage(Unwrap(shadingRateImage));
if(m_Cmd->IsPartialCmdList(m_Cmd->m_LastCmdListID))
{
m_Cmd->m_RenderState.shadingRateImage = GetResID(shadingRateImage);
}
}
}
else
{
Unwrap5(pCommandList)->RSSetShadingRateImage(Unwrap(shadingRateImage));
GetCrackedList5()->RSSetShadingRateImage(Unwrap(shadingRateImage));
D3D12RenderState &state = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].state;
state.shadingRateImage = GetResID(shadingRateImage);
}
}
return true;
}
void STDMETHODCALLTYPE
WrappedID3D12GraphicsCommandList::RSSetShadingRateImage(ID3D12Resource *shadingRateImage)
{
SERIALISE_TIME_CALL(m_pList5->RSSetShadingRateImage(shadingRateImage));
if(IsCaptureMode(m_State))
{
CACHE_THREAD_SERIALISER();
SCOPED_SERIALISE_CHUNK(D3D12Chunk::List_RSSetShadingRateImage);
Serialise_RSSetShadingRateImage(ser, shadingRateImage);
m_ListRecord->AddChunk(scope.Get());
m_ListRecord->MarkResourceFrameReferenced(GetResID(shadingRateImage), eFrameRef_Read);
}
}
INSTANTIATE_FUNCTION_SERIALISED(void, WrappedID3D12GraphicsCommandList, RSSetShadingRate,
D3D12_SHADING_RATE baseShadingRate,
const D3D12_SHADING_RATE_COMBINER *combiners);
INSTANTIATE_FUNCTION_SERIALISED(void, WrappedID3D12GraphicsCommandList, RSSetShadingRateImage,
ID3D12Resource *shadingRateImage);
@@ -53,7 +53,12 @@ ID3D12GraphicsCommandList4 *WrappedID3D12GraphicsCommandList::GetCrackedList4()
return Unwrap4(m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].crackedLists.back());
}
ID3D12GraphicsCommandList4 *WrappedID3D12GraphicsCommandList::GetWrappedCrackedList()
ID3D12GraphicsCommandList5 *WrappedID3D12GraphicsCommandList::GetCrackedList5()
{
return Unwrap5(m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].crackedLists.back());
}
ID3D12GraphicsCommandListX *WrappedID3D12GraphicsCommandList::GetWrappedCrackedList()
{
return m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].crackedLists.back();
}
@@ -84,7 +89,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Close(SerialiserType &ser)
{
if(m_Cmd->HasRerecordCmdList(BakedCommandList))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(BakedCommandList);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(BakedCommandList);
#if ENABLED(VERBOSE_PARTIAL_REPLAY)
RDCDEBUG("Ending re-recorded command list for %llu baked to %llu", CommandList,
BakedCommandList);
@@ -261,7 +266,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Reset(SerialiserType &ser,
}
// this is a safe upcast because it's a wrapped object
ID3D12GraphicsCommandList4 *list = (ID3D12GraphicsCommandList4 *)listptr;
ID3D12GraphicsCommandListX *list = (ID3D12GraphicsCommandListX *)listptr;
// we store under both baked and non baked ID.
// The baked ID is the 'real' entry, the non baked is simply so it
@@ -347,7 +352,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Reset(SerialiserType &ser,
__uuidof(ID3D12GraphicsCommandList), (void **)&listptr);
// this is a safe upcast because it's a wrapped object
ID3D12GraphicsCommandList4 *list = (ID3D12GraphicsCommandList4 *)listptr;
ID3D12GraphicsCommandListX *list = (ID3D12GraphicsCommandListX *)listptr;
RDCASSERT(m_Cmd->m_BakedCmdListInfo[BakedCommandList].crackedLists.empty());
m_Cmd->m_BakedCmdListInfo[BakedCommandList].crackedLists.push_back(list);
@@ -972,7 +977,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_IASetIndexBuffer(SerialiserType
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
Unwrap(list)->IASetIndexBuffer(pView);
@@ -2806,7 +2811,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetMarker(SerialiserType &ser,
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
D3D12MarkerRegion::Set(list, MarkerText);
}
@@ -2869,7 +2874,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginEvent(SerialiserType &ser,
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].markerCount++;
@@ -2927,7 +2932,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndEvent(SerialiserType &ser)
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
int &markerCount = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].markerCount;
markerCount = RDCMAX(0, markerCount - 1);
@@ -3009,7 +3014,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawInstanced(SerialiserType &s
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
uint32_t eventId = m_Cmd->HandlePreCallback(list);
@@ -3093,7 +3098,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawIndexedInstanced(
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
uint32_t eventId = m_Cmd->HandlePreCallback(list);
@@ -3179,7 +3184,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Dispatch(SerialiserType &ser, U
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
uint32_t eventId = m_Cmd->HandlePreCallback(list, true);
@@ -3251,7 +3256,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteBundle(SerialiserType &s
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
uint32_t eventId = m_Cmd->HandlePreCallback(list, true);
@@ -4163,7 +4168,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ReplayExecuteIndirect(Unwrap(list));
}
@@ -4237,7 +4242,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
__uuidof(ID3D12GraphicsCommandList), (void **)&listptr);
// this is a safe upcast because it's a wrapped object
ID3D12GraphicsCommandList4 *list = (ID3D12GraphicsCommandList4 *)listptr;
ID3D12GraphicsCommandListX *list = (ID3D12GraphicsCommandListX *)listptr;
m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].crackedLists.push_back(list);
@@ -4774,7 +4779,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyBufferRegion(SerialiserType
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
Unwrap(list)->CopyBufferRegion(Unwrap(pDstBuffer), DstOffset, Unwrap(pSrcBuffer), SrcOffset,
NumBytes);
}
@@ -4869,7 +4874,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyTextureRegion(
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
Unwrap(list)->CopyTextureRegion(&unwrappedDst, DstX, DstY, DstZ, &unwrappedSrc, pSrcBox);
}
}
@@ -4964,7 +4969,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyResource(SerialiserType &se
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
Unwrap(list)->CopyResource(Unwrap(pDstResource), Unwrap(pSrcResource));
}
}
@@ -5048,7 +5053,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveSubresource(
{
if(m_Cmd->InRerecordRange(m_Cmd->m_LastCmdListID))
{
ID3D12GraphicsCommandList4 *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
ID3D12GraphicsCommandListX *list = m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID);
Unwrap(list)->ResolveSubresource(Unwrap(pDstResource), DstSubresource, Unwrap(pSrcResource),
SrcSubresource, Format);
}
+54 -2
View File
@@ -72,6 +72,14 @@ ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList4 *obj)
return ((WrappedID3D12GraphicsCommandList *)obj)->GetReal();
}
ID3D12GraphicsCommandList *Unwrap(ID3D12GraphicsCommandList5 *obj)
{
if(obj == NULL)
return NULL;
return ((WrappedID3D12GraphicsCommandList *)obj)->GetReal();
}
ID3D12GraphicsCommandList1 *Unwrap1(ID3D12GraphicsCommandList1 *obj)
{
if(obj == NULL)
@@ -104,6 +112,14 @@ ID3D12GraphicsCommandList4 *Unwrap4(ID3D12GraphicsCommandList4 *obj)
return ((WrappedID3D12GraphicsCommandList *)obj)->GetReal4();
}
ID3D12GraphicsCommandList5 *Unwrap5(ID3D12GraphicsCommandList5 *obj)
{
if(obj == NULL)
return NULL;
return ((WrappedID3D12GraphicsCommandList *)obj)->GetReal5();
}
template <>
ID3D12CommandList *Unwrap(ID3D12CommandList *obj)
{
@@ -158,6 +174,15 @@ ResourceId GetResID(ID3D12GraphicsCommandList4 *obj)
return ((WrappedID3D12GraphicsCommandList *)obj)->GetResourceID();
}
template <>
ResourceId GetResID(ID3D12GraphicsCommandList5 *obj)
{
if(obj == NULL)
return ResourceId();
return ((WrappedID3D12GraphicsCommandList *)obj)->GetResourceID();
}
template <>
ResourceId GetResID(ID3D12CommandList *obj)
{
@@ -232,6 +257,11 @@ WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList4 *obj)
return ((WrappedID3D12GraphicsCommandList *)obj);
}
WrappedID3D12GraphicsCommandList *GetWrapped(ID3D12GraphicsCommandList5 *obj)
{
return ((WrappedID3D12GraphicsCommandList *)obj);
}
ULONG STDMETHODCALLTYPE WrappedID3D12DebugCommandQueue::AddRef()
{
m_pQueue->AddRef();
@@ -654,6 +684,12 @@ bool WrappedID3D12CommandQueue::ProcessChunk(ReadSerialiser &ser, D3D12Chunk chu
ret = m_ReplayList->Serialise_BeginRenderPass(ser, 0, NULL, NULL, D3D12_RENDER_PASS_FLAG_NONE);
break;
case D3D12Chunk::List_EndRenderPass: ret = m_ReplayList->Serialise_EndRenderPass(ser); break;
case D3D12Chunk::List_RSSetShadingRate:
ret = m_ReplayList->Serialise_RSSetShadingRate(ser, D3D12_SHADING_RATE_1X1, NULL);
break;
case D3D12Chunk::List_RSSetShadingRateImage:
ret = m_ReplayList->Serialise_RSSetShadingRateImage(ser, NULL);
break;
case D3D12Chunk::PushMarker: ret = m_ReplayList->Serialise_BeginEvent(ser, 0, NULL, 0); break;
case D3D12Chunk::PopMarker: ret = m_ReplayList->Serialise_EndEvent(ser); break;
@@ -905,6 +941,7 @@ WrappedID3D12GraphicsCommandList::WrappedID3D12GraphicsCommandList(ID3D12Graphic
m_pList2 = NULL;
m_pList3 = NULL;
m_pList4 = NULL;
m_pList5 = NULL;
m_WrappedDebug.m_pReal = NULL;
m_WrappedDebug.m_pReal1 = NULL;
@@ -920,6 +957,7 @@ WrappedID3D12GraphicsCommandList::WrappedID3D12GraphicsCommandList(ID3D12Graphic
m_pList->QueryInterface(__uuidof(ID3D12GraphicsCommandList2), (void **)&m_pList2);
m_pList->QueryInterface(__uuidof(ID3D12GraphicsCommandList3), (void **)&m_pList3);
m_pList->QueryInterface(__uuidof(ID3D12GraphicsCommandList4), (void **)&m_pList4);
m_pList->QueryInterface(__uuidof(ID3D12GraphicsCommandList5), (void **)&m_pList5);
}
// create a temporary and grab its resource ID
@@ -996,6 +1034,7 @@ WrappedID3D12GraphicsCommandList::~WrappedID3D12GraphicsCommandList()
SAFE_RELEASE(m_WrappedDebug.m_pReal);
SAFE_RELEASE(m_WrappedDebug.m_pReal1);
SAFE_RELEASE(m_WrappedDebug.m_pReal2);
SAFE_RELEASE(m_pList5);
SAFE_RELEASE(m_pList4);
SAFE_RELEASE(m_pList3);
SAFE_RELEASE(m_pList2);
@@ -1141,6 +1180,19 @@ HRESULT STDMETHODCALLTYPE WrappedID3D12GraphicsCommandList::QueryInterface(REFII
return E_NOINTERFACE;
}
}
else if(riid == __uuidof(ID3D12GraphicsCommandList5))
{
if(m_pList5)
{
*ppvObject = (ID3D12GraphicsCommandList5 *)this;
AddRef();
return S_OK;
}
else
{
return E_NOINTERFACE;
}
}
else if(riid == __uuidof(ID3D12CommandList))
{
*ppvObject = (ID3D12CommandList *)this;
@@ -1288,7 +1340,7 @@ void D3D12CommandData::GetIndirectBuffer(size_t size, ID3D12Resource **buf, uint
m_IndirectOffset = AlignUp16(m_IndirectOffset + size);
}
uint32_t D3D12CommandData::HandlePreCallback(ID3D12GraphicsCommandList4 *list, bool dispatch,
uint32_t D3D12CommandData::HandlePreCallback(ID3D12GraphicsCommandListX *list, bool dispatch,
uint32_t multiDrawOffset)
{
if(!m_DrawcallCallback)
@@ -1374,7 +1426,7 @@ bool D3D12CommandData::IsPartialCmdList(ResourceId cmdid)
return false;
}
ID3D12GraphicsCommandList4 *D3D12CommandData::RerecordCmdList(ResourceId cmdid,
ID3D12GraphicsCommandListX *D3D12CommandData::RerecordCmdList(ResourceId cmdid,
PartialReplayIndex partialType)
{
if(m_OutsideCmdList != NULL)
+20 -20
View File
@@ -120,17 +120,17 @@ struct D3D12DrawcallCallback
// and do the real draw by returning true. OR they can do nothing in PreDraw,
// do the real draw, then in PostDraw return true to apply the modifications
// which are then undone in PostRedraw.
virtual void PreDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) = 0;
virtual bool PostDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) = 0;
virtual void PostRedraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) = 0;
virtual void PreDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) = 0;
virtual bool PostDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) = 0;
virtual void PostRedraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) = 0;
// same principle as above, but for dispatch calls
virtual void PreDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) = 0;
virtual bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) = 0;
virtual void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) = 0;
virtual void PreDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) = 0;
virtual bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) = 0;
virtual void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) = 0;
// called immediately before a command list is closed
virtual void PreCloseCommandList(ID3D12GraphicsCommandList4 *cmd) = 0;
virtual void PreCloseCommandList(ID3D12GraphicsCommandListX *cmd) = 0;
// if a command list is recorded once and submitted N > 1 times, then the same
// drawcall will have several EIDs that refer to it. We'll only do the full
// callbacks above for the first EID, then call this function for the others
@@ -140,31 +140,31 @@ struct D3D12DrawcallCallback
// helper functions to downcast command list because we know it's wrapped
void PreDraw(uint32_t eid, ID3D12GraphicsCommandList *cmd)
{
return PreDraw(eid, (ID3D12GraphicsCommandList4 *)cmd);
return PreDraw(eid, (ID3D12GraphicsCommandListX *)cmd);
}
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandList *cmd)
{
return PostDraw(eid, (ID3D12GraphicsCommandList4 *)cmd);
return PostDraw(eid, (ID3D12GraphicsCommandListX *)cmd);
}
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandList *cmd)
{
return PostRedraw(eid, (ID3D12GraphicsCommandList4 *)cmd);
return PostRedraw(eid, (ID3D12GraphicsCommandListX *)cmd);
}
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandList *cmd)
{
return PreDispatch(eid, (ID3D12GraphicsCommandList4 *)cmd);
return PreDispatch(eid, (ID3D12GraphicsCommandListX *)cmd);
}
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandList *cmd)
{
return PostDispatch(eid, (ID3D12GraphicsCommandList4 *)cmd);
return PostDispatch(eid, (ID3D12GraphicsCommandListX *)cmd);
}
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandList *cmd)
{
return PostRedispatch(eid, (ID3D12GraphicsCommandList4 *)cmd);
return PostRedispatch(eid, (ID3D12GraphicsCommandListX *)cmd);
}
void PreCloseCommandList(ID3D12GraphicsCommandList *cmd)
{
return PreCloseCommandList((ID3D12GraphicsCommandList4 *)cmd);
return PreCloseCommandList((ID3D12GraphicsCommandListX *)cmd);
}
};
@@ -189,7 +189,7 @@ struct BakedCmdListInfo
UINT realCount = 0;
};
std::vector<ID3D12GraphicsCommandList4 *> crackedLists;
std::vector<ID3D12GraphicsCommandListX *> crackedLists;
std::vector<ExecuteData> executeEvents;
std::vector<APIEvent> curEvents;
@@ -296,7 +296,7 @@ struct D3D12CommandData
// list subsection of command events, we don't go through the
// whole original command lists to set up the partial replay,
// so we just set this command list
ID3D12GraphicsCommandList4 *m_OutsideCmdList = NULL;
ID3D12GraphicsCommandListX *m_OutsideCmdList = NULL;
void InsertDrawsAndRefreshIDs(ResourceId cmd, std::vector<D3D12DrawcallTreeNode> &cmdBufNodes);
@@ -326,8 +326,8 @@ struct D3D12CommandData
std::vector<DebugMessage> m_EventMessages;
std::map<ResourceId, ID3D12GraphicsCommandList4 *> m_RerecordCmds;
std::vector<ID3D12GraphicsCommandList4 *> m_RerecordCmdList;
std::map<ResourceId, ID3D12GraphicsCommandListX *> m_RerecordCmds;
std::vector<ID3D12GraphicsCommandListX *> m_RerecordCmdList;
bool m_AddedDrawcall;
@@ -360,13 +360,13 @@ struct D3D12CommandData
// util function to handle fetching the right eventId, calling any
// aliases then calling PreDraw/PreDispatch.
uint32_t HandlePreCallback(ID3D12GraphicsCommandList4 *list, bool dispatch = false,
uint32_t HandlePreCallback(ID3D12GraphicsCommandListX *list, bool dispatch = false,
uint32_t multiDrawOffset = 0);
bool InRerecordRange(ResourceId cmdid);
bool HasRerecordCmdList(ResourceId cmdid);
bool IsPartialCmdList(ResourceId cmdid);
ID3D12GraphicsCommandList4 *RerecordCmdList(ResourceId cmdid,
ID3D12GraphicsCommandListX *RerecordCmdList(ResourceId cmdid,
PartialReplayIndex partialType = ePartialNum);
void AddDrawcall(const DrawcallDescription &d, bool hasEvents, bool addUsage = true);
+9
View File
@@ -34,6 +34,10 @@
#include "driver/shaders/dxbc/dxbc_compile.h"
#include "serialise/serialiser.h"
// we need to use the most-derived native interface all over the place. To make things easier when
// new versions come out we typedef it here when we don't need the specific interface
using ID3D12GraphicsCommandListX = ID3D12GraphicsCommandList5;
// replay only class for handling marker regions
struct D3D12MarkerRegion
{
@@ -371,6 +375,7 @@ struct D3D12CommandSignature
SERIALISE_INTERFACE(ID3D12GraphicsCommandList2); \
SERIALISE_INTERFACE(ID3D12GraphicsCommandList3); \
SERIALISE_INTERFACE(ID3D12GraphicsCommandList4); \
SERIALISE_INTERFACE(ID3D12GraphicsCommandList5); \
SERIALISE_INTERFACE(ID3D12RootSignature); \
SERIALISE_INTERFACE(ID3D12Resource); \
SERIALISE_INTERFACE(ID3D12QueryHeap); \
@@ -609,6 +614,8 @@ DECLARE_REFLECTION_ENUM(D3D12_COMMAND_LIST_FLAGS);
DECLARE_REFLECTION_ENUM(D3D12_RENDER_PASS_FLAGS);
DECLARE_REFLECTION_ENUM(D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE);
DECLARE_REFLECTION_ENUM(D3D12_RENDER_PASS_ENDING_ACCESS_TYPE);
DECLARE_REFLECTION_ENUM(D3D12_SHADING_RATE);
DECLARE_REFLECTION_ENUM(D3D12_SHADING_RATE_COMBINER);
DECLARE_REFLECTION_STRUCT(D3D12_RESOURCE_DESC);
DECLARE_REFLECTION_STRUCT(D3D12_COMMAND_QUEUE_DESC);
@@ -817,5 +824,7 @@ enum class D3D12Chunk : uint32_t
Device_CreateHeap1,
List_BeginRenderPass,
List_EndRenderPass,
List_RSSetShadingRate,
List_RSSetShadingRateImage,
Max,
};
+14 -14
View File
@@ -202,7 +202,7 @@ struct D3D12AMDDrawCallback : public D3D12DrawcallCallback
m_pDevice->GetQueue()->GetCommandData()->m_DrawcallCallback = NULL;
}
void PreDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PreDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
m_pEventIds->push_back(eid);
@@ -220,7 +220,7 @@ struct D3D12AMDDrawCallback : public D3D12DrawcallCallback
++*m_pSampleId;
}
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
WrappedID3D12GraphicsCommandList *pWrappedCmdList = (WrappedID3D12GraphicsCommandList *)cmd;
@@ -228,7 +228,7 @@ struct D3D12AMDDrawCallback : public D3D12DrawcallCallback
return false;
}
void PreCloseCommandList(ID3D12GraphicsCommandList4 *cmd) override
void PreCloseCommandList(ID3D12GraphicsCommandListX *cmd) override
{
WrappedID3D12GraphicsCommandList *pWrappedCmdList = (WrappedID3D12GraphicsCommandList *)cmd;
@@ -241,14 +241,14 @@ struct D3D12AMDDrawCallback : public D3D12DrawcallCallback
}
}
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override {}
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override {}
// we don't need to distinguish, call the Draw functions
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override { PreDraw(eid, cmd); }
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override { PreDraw(eid, cmd); }
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
return PostDraw(eid, cmd);
}
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
PostRedraw(eid, cmd);
}
@@ -378,7 +378,7 @@ struct D3D12GPUTimerCallback : public D3D12DrawcallCallback
m_pDevice->GetQueue()->GetCommandData()->m_DrawcallCallback = this;
}
~D3D12GPUTimerCallback() { m_pDevice->GetQueue()->GetCommandData()->m_DrawcallCallback = NULL; }
void PreDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PreDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
if(cmd->GetType() == D3D12_COMMAND_LIST_TYPE_DIRECT)
{
@@ -388,7 +388,7 @@ struct D3D12GPUTimerCallback : public D3D12DrawcallCallback
cmd->EndQuery(m_TimerQueryHeap, D3D12_QUERY_TYPE_TIMESTAMP, m_NumTimestampQueries * 2 + 0);
}
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
cmd->EndQuery(m_TimerQueryHeap, D3D12_QUERY_TYPE_TIMESTAMP, m_NumTimestampQueries * 2 + 1);
m_NumTimestampQueries++;
@@ -405,18 +405,18 @@ struct D3D12GPUTimerCallback : public D3D12DrawcallCallback
return false;
}
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override {}
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override {}
// we don't need to distinguish, call the Draw functions
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override { PreDraw(eid, cmd); }
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override { PreDraw(eid, cmd); }
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
return PostDraw(eid, cmd);
}
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
PostRedraw(eid, cmd);
}
void PreCloseCommandList(ID3D12GraphicsCommandList4 *cmd) override{};
void PreCloseCommandList(ID3D12GraphicsCommandListX *cmd) override{};
void AliasEvent(uint32_t primary, uint32_t alias) override
{
m_AliasEvents.push_back(make_rdcpair(primary, alias));
+2 -2
View File
@@ -341,7 +341,7 @@ D3D12DebugManager::D3D12DebugManager(WrappedID3D12Device *wrapper)
m_pDevice->InternalRef();
// safe to upcast - this is a wrapped object
m_DebugList = (ID3D12GraphicsCommandList4 *)list;
m_DebugList = (ID3D12GraphicsCommandListX *)list;
if(FAILED(hr))
{
@@ -471,7 +471,7 @@ D3D12_GPU_VIRTUAL_ADDRESS D3D12DebugManager::UploadConstants(const void *data, s
return ret;
}
ID3D12GraphicsCommandList4 *D3D12DebugManager::ResetDebugList()
ID3D12GraphicsCommandListX *D3D12DebugManager::ResetDebugList()
{
m_DebugList->Reset(m_DebugAlloc, NULL);
+2 -2
View File
@@ -128,7 +128,7 @@ public:
D3D12_GPU_VIRTUAL_ADDRESS UploadConstants(const void *data, size_t size);
ID3D12RootSignature *GetMeshRootSig() { return m_MeshRootSig; }
ID3D12GraphicsCommandList4 *ResetDebugList();
ID3D12GraphicsCommandListX *ResetDebugList();
void ResetDebugAlloc();
D3D12_CPU_DESCRIPTOR_HANDLE GetCPUHandle(CBVUAVSRVSlot slot);
@@ -197,6 +197,6 @@ private:
ID3DBlob *m_DepthArray2MS = NULL;
// Debug lists
ID3D12GraphicsCommandList4 *m_DebugList = NULL;
ID3D12GraphicsCommandListX *m_DebugList = NULL;
ID3D12CommandAllocator *m_DebugAlloc = NULL;
};
+97 -9
View File
@@ -88,7 +88,8 @@ HRESULT STDMETHODCALLTYPE DummyID3D12DebugDevice::QueryInterface(REFIID riid, vo
if(riid == __uuidof(ID3D12InfoQueue) || riid == __uuidof(ID3D12DebugDevice) ||
riid == __uuidof(ID3D12Device) || riid == __uuidof(ID3D12Device1) ||
riid == __uuidof(ID3D12Device2) || riid == __uuidof(ID3D12Device3) ||
riid == __uuidof(ID3D12Device4) || riid == __uuidof(ID3D12Device5))
riid == __uuidof(ID3D12Device4) || riid == __uuidof(ID3D12Device5) ||
riid == __uuidof(ID3D12Device6))
return m_pDevice->QueryInterface(riid, ppvObject);
if(riid == __uuidof(IUnknown))
@@ -156,13 +157,45 @@ HRESULT STDMETHODCALLTYPE WrappedDownlevelDevice::QueryVideoMemoryInfo(
return m_pDevice.QueryVideoMemoryInfo(NodeIndex, MemorySegmentGroup, pVideoMemoryInfo);
}
HRESULT STDMETHODCALLTYPE WrappedDRED::QueryInterface(REFIID riid, void **ppvObject)
{
return m_pDevice.QueryInterface(riid, ppvObject);
}
ULONG STDMETHODCALLTYPE WrappedDRED::AddRef()
{
return m_pDevice.AddRef();
}
ULONG STDMETHODCALLTYPE WrappedDRED::Release()
{
return m_pDevice.Release();
}
HRESULT STDMETHODCALLTYPE WrappedDREDSettings::QueryInterface(REFIID riid, void **ppvObject)
{
return m_pDevice.QueryInterface(riid, ppvObject);
}
ULONG STDMETHODCALLTYPE WrappedDREDSettings::AddRef()
{
return m_pDevice.AddRef();
}
ULONG STDMETHODCALLTYPE WrappedDREDSettings::Release()
{
return m_pDevice.Release();
}
WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitParams params,
bool enabledDebugLayer)
: m_RefCounter(realDevice, false),
m_SoftRefCounter(NULL, false),
m_pDevice(realDevice),
m_debugLayerEnabled(enabledDebugLayer),
m_WrappedDownlevel(*this)
m_WrappedDownlevel(*this),
m_DRED(*this),
m_DREDSettings(*this)
{
if(RenderDoc::Inst().GetCrashHandler())
RenderDoc::Inst().GetCrashHandler()->RegisterMemoryRegion(this, sizeof(WrappedID3D12Device));
@@ -181,6 +214,7 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara
m_pDevice3 = NULL;
m_pDevice4 = NULL;
m_pDevice5 = NULL;
m_pDevice6 = NULL;
m_pDownlevel = NULL;
if(m_pDevice)
{
@@ -189,6 +223,10 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara
m_pDevice->QueryInterface(__uuidof(ID3D12Device3), (void **)&m_pDevice3);
m_pDevice->QueryInterface(__uuidof(ID3D12Device4), (void **)&m_pDevice4);
m_pDevice->QueryInterface(__uuidof(ID3D12Device5), (void **)&m_pDevice5);
m_pDevice->QueryInterface(__uuidof(ID3D12Device6), (void **)&m_pDevice6);
m_pDevice->QueryInterface(__uuidof(ID3D12DeviceRemovedExtendedData), (void **)&m_DRED.m_pReal);
m_pDevice->QueryInterface(__uuidof(ID3D12DeviceRemovedExtendedDataSettings),
(void **)&m_DREDSettings.m_pReal);
m_pDevice->QueryInterface(__uuidof(ID3D12DeviceDownlevel), (void **)&m_pDownlevel);
for(size_t i = 0; i < ARRAY_COUNT(m_DescriptorIncrements); i++)
@@ -455,7 +493,10 @@ WrappedID3D12Device::~WrappedID3D12Device()
SAFE_DELETE(m_ResourceManager);
SAFE_RELEASE(m_DRED.m_pReal);
SAFE_RELEASE(m_DREDSettings.m_pReal);
SAFE_RELEASE(m_pDownlevel);
SAFE_RELEASE(m_pDevice6);
SAFE_RELEASE(m_pDevice5);
SAFE_RELEASE(m_pDevice4);
SAFE_RELEASE(m_pDevice3);
@@ -641,6 +682,19 @@ HRESULT WrappedID3D12Device::QueryInterface(REFIID riid, void **ppvObject)
return E_NOINTERFACE;
}
}
else if(riid == __uuidof(ID3D12Device6))
{
if(m_pDevice6)
{
AddRef();
*ppvObject = (ID3D12Device6 *)this;
return S_OK;
}
else
{
return E_NOINTERFACE;
}
}
else if(riid == __uuidof(ID3D12DeviceDownlevel))
{
if(m_pDownlevel)
@@ -724,6 +778,32 @@ HRESULT WrappedID3D12Device::QueryInterface(REFIID riid, void **ppvObject)
return S_OK;
}
}
else if(riid == __uuidof(ID3D12DeviceRemovedExtendedData))
{
if(m_DRED.m_pReal)
{
AddRef();
*ppvObject = (ID3D12DeviceRemovedExtendedData *)&m_DRED;
return S_OK;
}
else
{
return E_NOINTERFACE;
}
}
else if(riid == __uuidof(ID3D12DeviceRemovedExtendedDataSettings))
{
if(m_DREDSettings.m_pReal)
{
AddRef();
*ppvObject = (ID3D12DeviceRemovedExtendedDataSettings *)&m_DREDSettings;
return S_OK;
}
else
{
return E_NOINTERFACE;
}
}
else if(riid == IRenderDoc_uuid)
{
AddRef();
@@ -2327,6 +2407,14 @@ HRESULT STDMETHODCALLTYPE WrappedID3D12Device::QueryVideoMemoryInfo(
return m_pDownlevel->QueryVideoMemoryInfo(NodeIndex, MemorySegmentGroup, pVideoMemoryInfo);
}
HRESULT STDMETHODCALLTYPE WrappedID3D12Device::SetBackgroundProcessingMode(
D3D12_BACKGROUND_PROCESSING_MODE Mode, D3D12_MEASUREMENTS_ACTION MeasurementsAction,
_In_opt_ HANDLE hEventToSignalUponCompletion, _Out_opt_ BOOL *pbFurtherMeasurementsDesired)
{
return m_pDevice6->SetBackgroundProcessingMode(
Mode, MeasurementsAction, hEventToSignalUponCompletion, pbFurtherMeasurementsDesired);
}
byte *WrappedID3D12Device::GetTempMemory(size_t s)
{
TempMem *mem = (TempMem *)Threading::GetTLSValue(tempMemoryTLSSlot);
@@ -2561,9 +2649,9 @@ void WrappedID3D12Device::GPUSyncAllQueues()
GPUSync(m_Queues[i], m_QueueFences[i]);
}
ID3D12GraphicsCommandList4 *WrappedID3D12Device::GetNewList()
ID3D12GraphicsCommandListX *WrappedID3D12Device::GetNewList()
{
ID3D12GraphicsCommandList4 *ret = NULL;
ID3D12GraphicsCommandListX *ret = NULL;
if(!m_InternalCmds.freecmds.empty())
{
@@ -2580,7 +2668,7 @@ ID3D12GraphicsCommandList4 *WrappedID3D12Device::GetNewList()
InternalRef();
// safe to upcast because this is a wrapped object.
ret = (ID3D12GraphicsCommandList4 *)list;
ret = (ID3D12GraphicsCommandListX *)list;
RDCASSERTEQUAL(hr, S_OK);
@@ -2602,7 +2690,7 @@ ID3D12GraphicsCommandList4 *WrappedID3D12Device::GetNewList()
return ret;
}
ID3D12GraphicsCommandList4 *WrappedID3D12Device::GetInitialStateList()
ID3D12GraphicsCommandListX *WrappedID3D12Device::GetInitialStateList()
{
if(initStateCurBatch >= initialStateMaxBatch)
{
@@ -2631,7 +2719,7 @@ void WrappedID3D12Device::CloseInitialStateList()
initStateCurBatch = 0;
}
void WrappedID3D12Device::ExecuteList(ID3D12GraphicsCommandList4 *list,
void WrappedID3D12Device::ExecuteList(ID3D12GraphicsCommandListX *list,
WrappedID3D12CommandQueue *queue, bool InFrameCaptureBoundary)
{
if(queue == NULL)
@@ -2643,7 +2731,7 @@ void WrappedID3D12Device::ExecuteList(ID3D12GraphicsCommandList4 *list,
MarkListExecuted(list);
}
void WrappedID3D12Device::MarkListExecuted(ID3D12GraphicsCommandList4 *list)
void WrappedID3D12Device::MarkListExecuted(ID3D12GraphicsCommandListX *list)
{
for(auto it = m_InternalCmds.pendingcmds.begin(); it != m_InternalCmds.pendingcmds.end(); ++it)
{
@@ -3099,7 +3187,7 @@ void WrappedID3D12Device::ReplayLog(uint32_t startEventID, uint32_t endEventID,
// has chosen a subsection that lies within a command list
if(partial)
{
ID3D12GraphicsCommandList4 *list = cmd.m_OutsideCmdList = GetNewList();
ID3D12GraphicsCommandListX *list = cmd.m_OutsideCmdList = GetNewList();
cmd.m_RenderState.ApplyState(this, list);
}
+81 -10
View File
@@ -286,6 +286,59 @@ struct WrappedDownlevelDevice : public ID3D12DeviceDownlevel
_Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo);
};
struct WrappedDRED : public ID3D12DeviceRemovedExtendedData
{
WrappedID3D12Device &m_pDevice;
ID3D12DeviceRemovedExtendedData *m_pReal = NULL;
WrappedDRED(WrappedID3D12Device &dev) : m_pDevice(dev) {}
//////////////////////////////
// implement IUnknown
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
//////////////////////////////
// implement ID3D12DeviceRemovedExtendedDataSettings
virtual HRESULT STDMETHODCALLTYPE GetAutoBreadcrumbsOutput(D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT *pOutput)
{
return m_pReal->GetAutoBreadcrumbsOutput(pOutput);
}
virtual HRESULT STDMETHODCALLTYPE GetPageFaultAllocationOutput(D3D12_DRED_PAGE_FAULT_OUTPUT *pOutput)
{
return m_pReal->GetPageFaultAllocationOutput(pOutput);
}
};
struct WrappedDREDSettings : public ID3D12DeviceRemovedExtendedDataSettings
{
WrappedID3D12Device &m_pDevice;
ID3D12DeviceRemovedExtendedDataSettings *m_pReal = NULL;
WrappedDREDSettings(WrappedID3D12Device &dev) : m_pDevice(dev) {}
//////////////////////////////
// implement IUnknown
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
//////////////////////////////
// implement ID3D12DeviceRemovedExtendedDataSettings
virtual void STDMETHODCALLTYPE SetAutoBreadcrumbsEnablement(D3D12_DRED_ENABLEMENT setting)
{
m_pReal->SetAutoBreadcrumbsEnablement(setting);
}
virtual void STDMETHODCALLTYPE SetPageFaultEnablement(D3D12_DRED_ENABLEMENT setting)
{
m_pReal->SetPageFaultEnablement(setting);
}
virtual void STDMETHODCALLTYPE SetWatsonDumpEnablement(D3D12_DRED_ENABLEMENT setting)
{
m_pReal->SetWatsonDumpEnablement(setting);
}
};
class WrappedID3D12CommandQueue;
#define IMPLEMENT_FUNCTION_THREAD_SERIALISED(ret, func, ...) \
@@ -293,7 +346,7 @@ class WrappedID3D12CommandQueue;
template <typename SerialiserType> \
bool CONCAT(Serialise_, func(SerialiserType &ser, __VA_ARGS__));
class WrappedID3D12Device : public IFrameCapturer, public ID3DDevice, public ID3D12Device5
class WrappedID3D12Device : public IFrameCapturer, public ID3DDevice, public ID3D12Device6
{
private:
ID3D12Device *m_pDevice;
@@ -302,6 +355,7 @@ private:
ID3D12Device3 *m_pDevice3;
ID3D12Device4 *m_pDevice4;
ID3D12Device5 *m_pDevice5;
ID3D12Device6 *m_pDevice6;
ID3D12DeviceDownlevel *m_pDownlevel;
// list of all queues being captured
@@ -319,6 +373,8 @@ private:
UINT64 m_GPUSyncCounter;
WrappedDownlevelDevice m_WrappedDownlevel;
WrappedDRED m_DRED;
WrappedDREDSettings m_DREDSettings;
std::vector<ID3D12CommandAllocator *> m_CommandAllocators;
@@ -556,11 +612,11 @@ public:
submittedcmds.clear();
}
std::vector<ID3D12GraphicsCommandList4 *> freecmds;
std::vector<ID3D12GraphicsCommandListX *> freecmds;
// -> GetNextCmd() ->
std::vector<ID3D12GraphicsCommandList4 *> pendingcmds;
std::vector<ID3D12GraphicsCommandListX *> pendingcmds;
// -> ExecuteLists() ->
std::vector<ID3D12GraphicsCommandList4 *> submittedcmds;
std::vector<ID3D12GraphicsCommandListX *> submittedcmds;
// -> FlushLists()--------back to freecmds--------^
} m_InternalCmds;
@@ -568,19 +624,19 @@ public:
// creating fewer temporary lists and making too bloated lists
static const int initialStateMaxBatch = 100;
int initStateCurBatch;
ID3D12GraphicsCommandList4 *initStateCurList;
ID3D12GraphicsCommandListX *initStateCurList;
ID3D12GraphicsCommandList4 *GetNewList();
ID3D12GraphicsCommandList4 *GetInitialStateList();
ID3D12GraphicsCommandListX *GetNewList();
ID3D12GraphicsCommandListX *GetInitialStateList();
void CloseInitialStateList();
ID3D12Resource *GetUploadBuffer(uint64_t chunkOffset, uint64_t byteSize);
void ApplyInitialContents();
void AddCaptureSubmission();
void ExecuteList(ID3D12GraphicsCommandList4 *list, WrappedID3D12CommandQueue *queue = NULL,
void ExecuteList(ID3D12GraphicsCommandListX *list, WrappedID3D12CommandQueue *queue = NULL,
bool InFrameCaptureBoundary = false);
void MarkListExecuted(ID3D12GraphicsCommandList4 *list);
void MarkListExecuted(ID3D12GraphicsCommandListX *list);
void ExecuteLists(WrappedID3D12CommandQueue *queue = NULL, bool InFrameCaptureBoundary = false);
void FlushLists(bool forceSync = false, ID3D12CommandQueue *queue = NULL);
@@ -616,7 +672,8 @@ public:
{
if(iid == __uuidof(ID3D12Device) || iid == __uuidof(ID3D12Device1) ||
iid == __uuidof(ID3D12Device2) || iid == __uuidof(ID3D12Device3) ||
iid == __uuidof(ID3D12Device4) || iid == __uuidof(ID3D12Device5))
iid == __uuidof(ID3D12Device4) || iid == __uuidof(ID3D12Device5) ||
iid == __uuidof(ID3D12Device5))
return true;
return false;
@@ -635,6 +692,8 @@ public:
return (ID3D12Device4 *)this;
else if(iid == __uuidof(ID3D12Device5))
return (ID3D12Device5 *)this;
else if(iid == __uuidof(ID3D12Device6))
return (ID3D12Device6 *)this;
RDCERR("Requested unknown device interface %s", ToStr(iid).c_str());
@@ -700,6 +759,12 @@ public:
this->AddRef();
return S_OK;
}
else if(riid == __uuidof(ID3D12Device6))
{
*ppvDevice = (ID3D12Device6 *)this;
this->AddRef();
return S_OK;
}
return E_NOINTERFACE;
}
@@ -1055,4 +1120,10 @@ public:
virtual HRESULT STDMETHODCALLTYPE
QueryVideoMemoryInfo(UINT NodeIndex, DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,
_Out_ DXGI_QUERY_VIDEO_MEMORY_INFO *pVideoMemoryInfo);
//////////////////////////////
// implement ID3D12Device6
virtual HRESULT STDMETHODCALLTYPE SetBackgroundProcessingMode(
D3D12_BACKGROUND_PROCESSING_MODE Mode, D3D12_MEASUREMENTS_ACTION MeasurementsAction,
_In_opt_ HANDLE hEventToSignalUponCompletion, _Out_opt_ BOOL *pbFurtherMeasurementsDesired);
};
+6 -1
View File
@@ -278,7 +278,8 @@ HRESULT WrappedID3D12Device::CreateCommandList(UINT nodeMask, D3D12_COMMAND_LIST
if(riid != __uuidof(ID3D12GraphicsCommandList) && riid != __uuidof(ID3D12CommandList) &&
riid != __uuidof(ID3D12GraphicsCommandList1) && riid != __uuidof(ID3D12GraphicsCommandList2) &&
riid != __uuidof(ID3D12GraphicsCommandList3) && riid != __uuidof(ID3D12GraphicsCommandList4))
riid != __uuidof(ID3D12GraphicsCommandList3) && riid != __uuidof(ID3D12GraphicsCommandList4) &&
riid != __uuidof(ID3D12GraphicsCommandList5))
return E_NOINTERFACE;
void *realptr = NULL;
@@ -301,6 +302,8 @@ HRESULT WrappedID3D12Device::CreateCommandList(UINT nodeMask, D3D12_COMMAND_LIST
real = (ID3D12GraphicsCommandList3 *)realptr;
else if(riid == __uuidof(ID3D12GraphicsCommandList4))
real = (ID3D12GraphicsCommandList4 *)realptr;
else if(riid == __uuidof(ID3D12GraphicsCommandList5))
real = (ID3D12GraphicsCommandList5 *)realptr;
if(SUCCEEDED(ret))
{
@@ -351,6 +354,8 @@ HRESULT WrappedID3D12Device::CreateCommandList(UINT nodeMask, D3D12_COMMAND_LIST
*ppCommandList = (ID3D12GraphicsCommandList3 *)wrapped;
else if(riid == __uuidof(ID3D12GraphicsCommandList4))
*ppCommandList = (ID3D12GraphicsCommandList4 *)wrapped;
else if(riid == __uuidof(ID3D12GraphicsCommandList5))
*ppCommandList = (ID3D12GraphicsCommandList5 *)wrapped;
else if(riid == __uuidof(ID3D12CommandList))
*ppCommandList = (ID3D12CommandList *)wrapped;
else
@@ -84,7 +84,8 @@ HRESULT WrappedID3D12Device::CreateCommandList1(UINT nodeMask, D3D12_COMMAND_LIS
if(riid != __uuidof(ID3D12GraphicsCommandList) && riid != __uuidof(ID3D12CommandList) &&
riid != __uuidof(ID3D12GraphicsCommandList1) && riid != __uuidof(ID3D12GraphicsCommandList2) &&
riid != __uuidof(ID3D12GraphicsCommandList3) && riid != __uuidof(ID3D12GraphicsCommandList4))
riid != __uuidof(ID3D12GraphicsCommandList3) && riid != __uuidof(ID3D12GraphicsCommandList4) &&
riid != __uuidof(ID3D12GraphicsCommandList5))
return E_NOINTERFACE;
void *realptr = NULL;
@@ -106,6 +107,8 @@ HRESULT WrappedID3D12Device::CreateCommandList1(UINT nodeMask, D3D12_COMMAND_LIS
real = (ID3D12GraphicsCommandList3 *)realptr;
else if(riid == __uuidof(ID3D12GraphicsCommandList4))
real = (ID3D12GraphicsCommandList4 *)realptr;
else if(riid == __uuidof(ID3D12GraphicsCommandList5))
real = (ID3D12GraphicsCommandList5 *)realptr;
if(SUCCEEDED(ret))
{
@@ -152,6 +155,8 @@ HRESULT WrappedID3D12Device::CreateCommandList1(UINT nodeMask, D3D12_COMMAND_LIS
*ppCommandList = (ID3D12GraphicsCommandList3 *)wrapped;
else if(riid == __uuidof(ID3D12GraphicsCommandList4))
*ppCommandList = (ID3D12GraphicsCommandList4 *)wrapped;
else if(riid == __uuidof(ID3D12GraphicsCommandList5))
*ppCommandList = (ID3D12GraphicsCommandList5 *)wrapped;
else if(riid == __uuidof(ID3D12CommandList))
*ppCommandList = (ID3D12CommandList *)wrapped;
else
+9 -1
View File
@@ -258,7 +258,8 @@ private:
if(riid != __uuidof(ID3D12Device) && riid != __uuidof(ID3D12Device1) &&
riid != __uuidof(ID3D12Device2) && riid != __uuidof(ID3D12Device3) &&
riid != __uuidof(ID3D12Device4) && riid != __uuidof(ID3D12Device5))
riid != __uuidof(ID3D12Device4) && riid != __uuidof(ID3D12Device5) &&
riid != __uuidof(ID3D12Device6))
{
RDCERR("Unsupported UUID %s for D3D12CreateDevice", ToStr(riid).c_str());
return E_NOINTERFACE;
@@ -333,6 +334,11 @@ private:
ID3D12Device5 *dev5 = (ID3D12Device5 *)*ppDevice;
dev = (ID3D12Device *)dev5;
}
else if(riid == __uuidof(ID3D12Device6))
{
ID3D12Device6 *dev6 = (ID3D12Device6 *)*ppDevice;
dev = (ID3D12Device *)dev6;
}
WrappedID3D12Device *wrap = new WrappedID3D12Device(dev, params, EnableDebugLayer);
@@ -350,6 +356,8 @@ private:
*ppDevice = (ID3D12Device4 *)wrap;
else if(riid == __uuidof(ID3D12Device5))
*ppDevice = (ID3D12Device5 *)wrap;
else if(riid == __uuidof(ID3D12Device6))
*ppDevice = (ID3D12Device6 *)wrap;
}
}
else if(SUCCEEDED(ret))
@@ -637,7 +637,7 @@ void D3D12Replay::FlipOutputWindow(uint64_t id)
m_pDevice->GetQueue()->QueryInterface(__uuidof(ID3D12CommandQueueDownlevel), (void **)&downlevel);
downlevel->Present(list, res, outw.wnd, D3D12_DOWNLEVEL_PRESENT_FLAG_NONE);
SAFE_RELEASE(downlevel);
m_pDevice->MarkListExecuted((ID3D12GraphicsCommandList4 *)list);
m_pDevice->MarkListExecuted((ID3D12GraphicsCommandListX *)list);
list = m_pDevice->GetNewList();
+7 -7
View File
@@ -52,7 +52,7 @@ struct D3D12QuadOverdrawCallback : public D3D12DrawcallCallback
{
m_pDevice->GetQueue()->GetCommandData()->m_DrawcallCallback = NULL;
}
void PreDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd)
void PreDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd)
{
if(std::find(m_Events.begin(), m_Events.end(), eid) == m_Events.end())
return;
@@ -221,7 +221,7 @@ struct D3D12QuadOverdrawCallback : public D3D12DrawcallCallback
rs.ApplyState(m_pDevice, cmd);
}
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd)
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd)
{
if(std::find(m_Events.begin(), m_Events.end(), eid) == m_Events.end())
return false;
@@ -235,16 +235,16 @@ struct D3D12QuadOverdrawCallback : public D3D12DrawcallCallback
return true;
}
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd)
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd)
{
// nothing to do
}
// Dispatches don't rasterize, so do nothing
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) {}
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) { return false; }
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) {}
void PreCloseCommandList(ID3D12GraphicsCommandList4 *cmd) {}
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) {}
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) { return false; }
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) {}
void PreCloseCommandList(ID3D12GraphicsCommandListX *cmd) {}
void AliasEvent(uint32_t primary, uint32_t alias)
{
// don't care
+9 -9
View File
@@ -352,7 +352,7 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
recreate = true;
}
ID3D12GraphicsCommandList4 *list = NULL;
ID3D12GraphicsCommandListX *list = NULL;
if(!(drawcall->flags & DrawFlags::Indexed))
{
@@ -847,7 +847,7 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
D3D12_STREAM_OUTPUT_BUFFER_VIEW view;
ID3D12GraphicsCommandList4 *list = NULL;
ID3D12GraphicsCommandListX *list = NULL;
view.BufferFilledSizeLocation = m_SOBuffer->GetGPUVirtualAddress();
view.BufferLocation = m_SOBuffer->GetGPUVirtualAddress() + 64;
@@ -1341,19 +1341,19 @@ struct D3D12InitPostVSCallback : public D3D12DrawcallCallback
m_pDevice->GetQueue()->GetCommandData()->m_DrawcallCallback = this;
}
~D3D12InitPostVSCallback() { m_pDevice->GetQueue()->GetCommandData()->m_DrawcallCallback = NULL; }
void PreDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override
void PreDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override
{
if(std::find(m_Events.begin(), m_Events.end(), eid) != m_Events.end())
m_Replay->InitPostVSBuffers(eid);
}
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override { return false; }
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override {}
bool PostDraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override { return false; }
void PostRedraw(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override {}
// Dispatches don't rasterize, so do nothing
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override {}
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override { return false; }
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandList4 *cmd) override {}
void PreCloseCommandList(ID3D12GraphicsCommandList4 *cmd) override {}
void PreDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override {}
bool PostDispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override { return false; }
void PostRedispatch(uint32_t eid, ID3D12GraphicsCommandListX *cmd) override {}
void PreCloseCommandList(ID3D12GraphicsCommandListX *cmd) override {}
void AliasEvent(uint32_t primary, uint32_t alias) override
{
if(std::find(m_Events.begin(), m_Events.end(), primary) != m_Events.end())
+3 -3
View File
@@ -73,7 +73,7 @@ ResourceId D3D12RenderState::GetDSVID() const
return dsv.GetResResourceId();
}
void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsCommandList4 *cmd) const
void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsCommandListX *cmd) const
{
D3D12_COMMAND_LIST_TYPE type = cmd->GetType();
@@ -183,7 +183,7 @@ void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsComman
}
}
void D3D12RenderState::ApplyComputeRootElements(ID3D12GraphicsCommandList4 *cmd) const
void D3D12RenderState::ApplyComputeRootElements(ID3D12GraphicsCommandListX *cmd) const
{
for(size_t i = 0; i < compute.sigelems.size(); i++)
{
@@ -202,7 +202,7 @@ void D3D12RenderState::ApplyComputeRootElements(ID3D12GraphicsCommandList4 *cmd)
}
}
void D3D12RenderState::ApplyGraphicsRootElements(ID3D12GraphicsCommandList4 *cmd) const
void D3D12RenderState::ApplyGraphicsRootElements(ID3D12GraphicsCommandListX *cmd) const
{
for(size_t i = 0; i < graphics.sigelems.size(); i++)
{
+7 -3
View File
@@ -46,9 +46,9 @@ struct D3D12RenderState
D3D12RenderState() = default;
D3D12RenderState &operator=(const D3D12RenderState &o);
void ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsCommandList4 *list) const;
void ApplyComputeRootElements(ID3D12GraphicsCommandList4 *cmd) const;
void ApplyGraphicsRootElements(ID3D12GraphicsCommandList4 *cmd) const;
void ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsCommandListX *list) const;
void ApplyComputeRootElements(ID3D12GraphicsCommandListX *cmd) const;
void ApplyGraphicsRootElements(ID3D12GraphicsCommandListX *cmd) const;
std::vector<D3D12_VIEWPORT> views;
std::vector<D3D12_RECT> scissors;
@@ -61,6 +61,10 @@ struct D3D12RenderState
std::vector<ResourceId> GetRTVIDs() const;
ResourceId GetDSVID() const;
ResourceId shadingRateImage;
D3D12_SHADING_RATE shadingRate;
D3D12_SHADING_RATE_COMBINER shadingRateCombiners[2];
struct SignatureElement
{
SignatureElement() : type(eRootUnknown), offset(0) {}
+36 -2
View File
@@ -28,8 +28,8 @@
template <>
rdcstr DoStringise(const D3D12Chunk &el)
{
RDCCOMPILE_ASSERT((uint32_t)D3D12Chunk::Max == 1102, "Chunks changed without updating names");
RDCCOMPILE_ASSERT((uint32_t)D3D12Chunk::List_EndRenderPass == 1101,
RDCCOMPILE_ASSERT((uint32_t)D3D12Chunk::Max == 1104, "Chunks changed without updating names");
RDCCOMPILE_ASSERT((uint32_t)D3D12Chunk::List_RSSetShadingRateImage == 1103,
"New chunks must be appended otherwise it breaks old captures");
BEGIN_ENUM_STRINGISE(D3D12Chunk)
@@ -188,6 +188,10 @@ rdcstr DoStringise(const D3D12Chunk &el)
"ID3D12GraphicsCommandList2::WriteBufferImmediate");
STRINGISE_ENUM_CLASS_NAMED(List_BeginRenderPass, "ID3D12GraphicsCommandList4::BeginRenderPass");
STRINGISE_ENUM_CLASS_NAMED(List_EndRenderPass, "ID3D12GraphicsCommandList4::EndRenderPass");
STRINGISE_ENUM_CLASS_NAMED(List_RSSetShadingRate,
"ID3D12GraphicsCommandList5::RSSetShadingRate");
STRINGISE_ENUM_CLASS_NAMED(List_RSSetShadingRateImage,
"ID3D12GraphicsCommandList5::RSSetShadingRateImage");
STRINGISE_ENUM_CLASS_NAMED(Max, "Max Chunk");
}
END_ENUM_STRINGISE()
@@ -809,6 +813,36 @@ rdcstr DoStringise(const D3D12_RENDER_PASS_ENDING_ACCESS_TYPE &el)
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const D3D12_SHADING_RATE &el)
{
BEGIN_ENUM_STRINGISE(D3D12_SHADING_RATE);
{
STRINGISE_ENUM(D3D12_SHADING_RATE_1X1)
STRINGISE_ENUM(D3D12_SHADING_RATE_1X2)
STRINGISE_ENUM(D3D12_SHADING_RATE_2X1)
STRINGISE_ENUM(D3D12_SHADING_RATE_2X2)
STRINGISE_ENUM(D3D12_SHADING_RATE_2X4)
STRINGISE_ENUM(D3D12_SHADING_RATE_4X2)
STRINGISE_ENUM(D3D12_SHADING_RATE_4X4)
}
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const D3D12_SHADING_RATE_COMBINER &el)
{
BEGIN_ENUM_STRINGISE(D3D12_SHADING_RATE_COMBINER);
{
STRINGISE_ENUM(D3D12_SHADING_RATE_COMBINER_PASSTHROUGH)
STRINGISE_ENUM(D3D12_SHADING_RATE_COMBINER_OVERRIDE)
STRINGISE_ENUM(D3D12_SHADING_RATE_COMBINER_MIN)
STRINGISE_ENUM(D3D12_SHADING_RATE_COMBINER_MAX)
STRINGISE_ENUM(D3D12_SHADING_RATE_COMBINER_SUM)
}
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const D3D12_CLEAR_FLAGS &el)
{
@@ -104,6 +104,7 @@
<ClCompile Include="d3d12_command_list2_wrap.cpp" />
<ClCompile Include="d3d12_command_list3_wrap.cpp" />
<ClCompile Include="d3d12_command_list4_wrap.cpp" />
<ClCompile Include="d3d12_command_list5_wrap.cpp" />
<ClCompile Include="d3d12_command_list_wrap.cpp" />
<ClCompile Include="d3d12_command_queue_wrap.cpp" />
<ClCompile Include="d3d12_common.cpp" />
@@ -179,5 +179,8 @@
<ClCompile Include="d3d12_command_list4_wrap.cpp">
<Filter>Wrapped</Filter>
</ClCompile>
<ClCompile Include="d3d12_command_list5_wrap.cpp">
<Filter>Wrapped</Filter>
</ClCompile>
</ItemGroup>
</Project>
+18 -1
View File
@@ -2082,7 +2082,24 @@ enum D3D11_MESSAGE_ID
D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_USAGE = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_SIZE + 1 ) ,
D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_MISC_FLAGS = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_USAGE + 1 ) ,
D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_OFFSET = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_MISC_FLAGS + 1 ) ,
D3D11_MESSAGE_ID_D3D11_5_MESSAGES_END = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_OFFSET + 1 )
D3D11_MESSAGE_ID_CREATE_TRACKEDWORKLOAD = ( D3D11_MESSAGE_ID_DECODERBEGINFRAME_INVALID_HISTOGRAM_BUFFER_OFFSET + 1 ) ,
D3D11_MESSAGE_ID_LIVE_TRACKEDWORKLOAD = ( D3D11_MESSAGE_ID_CREATE_TRACKEDWORKLOAD + 1 ) ,
D3D11_MESSAGE_ID_DESTROY_TRACKEDWORKLOAD = ( D3D11_MESSAGE_ID_LIVE_TRACKEDWORKLOAD + 1 ) ,
D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_NULLPARAM = ( D3D11_MESSAGE_ID_DESTROY_TRACKEDWORKLOAD + 1 ) ,
D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_INVALID_MAX_INSTANCES = ( D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_NULLPARAM + 1 ) ,
D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_INVALID_DEADLINE_TYPE = ( D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_INVALID_MAX_INSTANCES + 1 ) ,
D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_INVALID_ENGINE_TYPE = ( D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_INVALID_DEADLINE_TYPE + 1 ) ,
D3D11_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOADS = ( D3D11_MESSAGE_ID_CREATE_TRACKED_WORKLOAD_INVALID_ENGINE_TYPE + 1 ) ,
D3D11_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOAD_PAIRS = ( D3D11_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOADS + 1 ) ,
D3D11_MESSAGE_ID_INCOMPLETE_TRACKED_WORKLOAD_PAIR = ( D3D11_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOAD_PAIRS + 1 ) ,
D3D11_MESSAGE_ID_OUT_OF_ORDER_TRACKED_WORKLOAD_PAIR = ( D3D11_MESSAGE_ID_INCOMPLETE_TRACKED_WORKLOAD_PAIR + 1 ) ,
D3D11_MESSAGE_ID_CANNOT_ADD_TRACKED_WORKLOAD = ( D3D11_MESSAGE_ID_OUT_OF_ORDER_TRACKED_WORKLOAD_PAIR + 1 ) ,
D3D11_MESSAGE_ID_TRACKED_WORKLOAD_NOT_SUPPORTED = ( D3D11_MESSAGE_ID_CANNOT_ADD_TRACKED_WORKLOAD + 1 ) ,
D3D11_MESSAGE_ID_TRACKED_WORKLOAD_ENGINE_TYPE_NOT_FOUND = ( D3D11_MESSAGE_ID_TRACKED_WORKLOAD_NOT_SUPPORTED + 1 ) ,
D3D11_MESSAGE_ID_NO_TRACKED_WORKLOAD_SLOT_AVAILABLE = ( D3D11_MESSAGE_ID_TRACKED_WORKLOAD_ENGINE_TYPE_NOT_FOUND + 1 ) ,
D3D11_MESSAGE_ID_END_TRACKED_WORKLOAD_INVALID_ARG = ( D3D11_MESSAGE_ID_NO_TRACKED_WORKLOAD_SLOT_AVAILABLE + 1 ) ,
D3D11_MESSAGE_ID_TRACKED_WORKLOAD_DISJOINT_FAILURE = ( D3D11_MESSAGE_ID_END_TRACKED_WORKLOAD_INVALID_ARG + 1 ) ,
D3D11_MESSAGE_ID_D3D11_5_MESSAGES_END = ( D3D11_MESSAGE_ID_TRACKED_WORKLOAD_DISJOINT_FAILURE + 1 )
} D3D11_MESSAGE_ID;
typedef struct D3D11_MESSAGE
File diff suppressed because it is too large Load Diff
+33 -4
View File
@@ -149,7 +149,7 @@ extern "C"{
#include "winapifamily.h"
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_c_ifspec;
@@ -558,7 +558,7 @@ enum D3D12_DEBUG_FEATURE
D3D12_DEBUG_FEATURE_ALLOW_BEHAVIOR_CHANGING_DEBUG_AIDS = 0x1,
D3D12_DEBUG_FEATURE_CONSERVATIVE_RESOURCE_STATE_TRACKING = 0x2,
D3D12_DEBUG_FEATURE_DISABLE_VIRTUALIZED_BUNDLES_VALIDATION = 0x4,
D3D12_DEBUG_FEATURE_VALID_MASK = ( ( D3D12_DEBUG_FEATURE_ALLOW_BEHAVIOR_CHANGING_DEBUG_AIDS | D3D12_DEBUG_FEATURE_CONSERVATIVE_RESOURCE_STATE_TRACKING ) | D3D12_DEBUG_FEATURE_DISABLE_VIRTUALIZED_BUNDLES_VALIDATION )
D3D12_DEBUG_FEATURE_EMULATE_WINDOWS7 = 0x8
} D3D12_DEBUG_FEATURE;
DEFINE_ENUM_FLAG_OPERATORS(D3D12_DEBUG_FEATURE)
@@ -2724,7 +2724,36 @@ enum D3D12_MESSAGE_ID
D3D12_MESSAGE_ID_TRACKED_WORKLOAD_NOT_SUPPORTED = 1212,
D3D12_MESSAGE_ID_RENDER_PASS_MISMATCHING_NO_ACCESS = 1213,
D3D12_MESSAGE_ID_RENDER_PASS_UNSUPPORTED_RESOLVE = 1214,
D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_RENDER_PASS_UNSUPPORTED_RESOLVE + 1 )
D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_INVALID_RESOURCE_PTR = 1215,
D3D12_MESSAGE_ID_WINDOWS7_FENCE_OUTOFORDER_SIGNAL = 1216,
D3D12_MESSAGE_ID_WINDOWS7_FENCE_OUTOFORDER_WAIT = 1217,
D3D12_MESSAGE_ID_VIDEO_CREATE_MOTION_ESTIMATOR_INVALID_ARGUMENT = 1218,
D3D12_MESSAGE_ID_VIDEO_CREATE_MOTION_VECTOR_HEAP_INVALID_ARGUMENT = 1219,
D3D12_MESSAGE_ID_ESTIMATE_MOTION_INVALID_ARGUMENT = 1220,
D3D12_MESSAGE_ID_RESOLVE_MOTION_VECTOR_HEAP_INVALID_ARGUMENT = 1221,
D3D12_MESSAGE_ID_GETGPUVIRTUALADDRESS_INVALID_HEAP_TYPE = 1222,
D3D12_MESSAGE_ID_SET_BACKGROUND_PROCESSING_MODE_INVALID_ARGUMENT = 1223,
D3D12_MESSAGE_ID_CREATE_COMMAND_LIST_INVALID_COMMAND_LIST_TYPE_FOR_FEATURE_LEVEL = 1224,
D3D12_MESSAGE_ID_CREATE_VIDEOEXTENSIONCOMMAND = 1225,
D3D12_MESSAGE_ID_LIVE_VIDEOEXTENSIONCOMMAND = 1226,
D3D12_MESSAGE_ID_DESTROY_VIDEOEXTENSIONCOMMAND = 1227,
D3D12_MESSAGE_ID_INVALID_VIDEO_EXTENSION_COMMAND_ID = 1228,
D3D12_MESSAGE_ID_VIDEO_EXTENSION_COMMAND_INVALID_ARGUMENT = 1229,
D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_NOT_UNIQUE_IN_DXIL_LIBRARY = 1230,
D3D12_MESSAGE_ID_VARIABLE_SHADING_RATE_NOT_ALLOWED_WITH_TIR = 1231,
D3D12_MESSAGE_ID_GEOMETRY_SHADER_OUTPUTTING_BOTH_VIEWPORT_ARRAY_INDEX_AND_SHADING_RATE_NOT_SUPPORTED_ON_DEVICE = 1232,
D3D12_MESSAGE_ID_RSSETSHADING_RATE_INVALID_SHADING_RATE = 1233,
D3D12_MESSAGE_ID_RSSETSHADING_RATE_SHADING_RATE_NOT_PERMITTED_BY_CAP = 1234,
D3D12_MESSAGE_ID_RSSETSHADING_RATE_INVALID_COMBINER = 1235,
D3D12_MESSAGE_ID_RSSETSHADINGRATEIMAGE_REQUIRES_TIER_2 = 1236,
D3D12_MESSAGE_ID_RSSETSHADINGRATE_REQUIRES_TIER_1 = 1237,
D3D12_MESSAGE_ID_SHADING_RATE_IMAGE_INCORRECT_FORMAT = 1238,
D3D12_MESSAGE_ID_SHADING_RATE_IMAGE_INCORRECT_ARRAY_SIZE = 1239,
D3D12_MESSAGE_ID_SHADING_RATE_IMAGE_INCORRECT_MIP_LEVEL = 1240,
D3D12_MESSAGE_ID_SHADING_RATE_IMAGE_INCORRECT_SAMPLE_COUNT = 1241,
D3D12_MESSAGE_ID_SHADING_RATE_IMAGE_INCORRECT_SAMPLE_QUALITY = 1242,
D3D12_MESSAGE_ID_NON_RETAIL_SHADER_MODEL_WONT_VALIDATE = 1243,
D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_NON_RETAIL_SHADER_MODEL_WONT_VALIDATE + 1 )
} D3D12_MESSAGE_ID;
static_assert(D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UNSUPPORTED == 1000, "Publicly released SDK D3D12_MESSAGE_ID enum values must not be changed. New enum values must be added to the end of the list.");
@@ -3168,7 +3197,7 @@ EXTERN_C const IID IID_ID3D12InfoQueue;
/* interface __MIDL_itf_d3d12sdklayers_0000_0013 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
DEFINE_GUID(IID_ID3D12Debug,0x344488b7,0x6846,0x474b,0xb9,0x89,0xf0,0x27,0x44,0x82,0x45,0xe0);
DEFINE_GUID(IID_ID3D12Debug1,0xaffaa4ca,0x63fe,0x4d8e,0xb8,0xad,0x15,0x90,0x00,0xaf,0x43,0x04);
+1 -1
View File
@@ -160,7 +160,6 @@ DEFINE_GUID(IID_IDirect3DAuthenticatedChannel9, 0xff24beee, 0xda21, 0x4beb, 0x98
// {FA0AB799-7A9C-48ca-8C5B-237E71A54434}
DEFINE_GUID(IID_IDirect3DCryptoSession9, 0xfa0ab799, 0x7a9c, 0x48ca, 0x8c, 0x5b, 0x23, 0x7e, 0x71, 0xa5, 0x44, 0x34);
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
@@ -248,6 +247,7 @@ _COM_SMARTPTR_TYPEDEF(IDirect3DDevice9Video, __uuidof(IDirect3DDevice9Video));
_COM_SMARTPTR_TYPEDEF(IDirect3DAuthenticatedChannel9, __uuidof(IDirect3DAuthenticatedChannel9));
_COM_SMARTPTR_TYPEDEF(IDirect3DCryptoSession9, __uuidof(IDirect3DCryptoSession9));
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
+1 -1
View File
@@ -1675,6 +1675,7 @@ typedef enum _D3DRESOURCETYPE {
/* CubeMap Face identifiers */
typedef enum _D3DCUBEMAP_FACES
{
@@ -2436,7 +2437,6 @@ typedef struct _D3DAES_CTR_IV
} D3DAES_CTR_IV;
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
+4 -1
View File
@@ -79,6 +79,7 @@ enum D3D_DRIVER_TYPE
typedef
enum D3D_FEATURE_LEVEL
{
D3D_FEATURE_LEVEL_1_0_CORE = 0x1000,
D3D_FEATURE_LEVEL_9_1 = 0x9100,
D3D_FEATURE_LEVEL_9_2 = 0x9200,
D3D_FEATURE_LEVEL_9_3 = 0x9300,
@@ -823,6 +824,7 @@ enum D3D_NAME
D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15,
D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16,
D3D_NAME_BARYCENTRICS = 23,
D3D_NAME_SHADINGRATE = 24,
D3D_NAME_TARGET = 64,
D3D_NAME_DEPTH = 65,
D3D_NAME_COVERAGE = 66,
@@ -854,7 +856,8 @@ enum D3D_NAME
D3D11_NAME_DEPTH_LESS_EQUAL = D3D_NAME_DEPTH_LESS_EQUAL,
D3D11_NAME_STENCIL_REF = D3D_NAME_STENCIL_REF,
D3D11_NAME_INNER_COVERAGE = D3D_NAME_INNER_COVERAGE,
D3D12_NAME_BARYCENTRICS = D3D_NAME_BARYCENTRICS
D3D12_NAME_BARYCENTRICS = D3D_NAME_BARYCENTRICS,
D3D12_NAME_SHADINGRATE = D3D_NAME_SHADINGRATE
} D3D_NAME;
typedef
+2 -2
View File
@@ -39,7 +39,7 @@ extern "C" {
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
//----------------------------------------------------------------------------
// D3DReadFileToBlob:
@@ -553,7 +553,7 @@ D3DDecompressShaders(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
_Out_writes_(uNumShaders) ID3DBlob** ppShaders,
_Out_opt_ UINT* pTotalShaders);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
+2 -2
View File
@@ -509,7 +509,7 @@ EXTERN_C const IID IID_IDXGIOutputDuplication;
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
typedef
enum DXGI_ALPHA_MODE
{
@@ -2446,7 +2446,7 @@ EXTERN_C const IID IID_IDXGIOutput1;
/* interface __MIDL_itf_dxgi1_2_0000_0009 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
DEFINE_GUID(IID_IDXGIDisplayControl,0xea9dbf1a,0xc88e,0x4486,0x85,0x4a,0x98,0xaa,0x01,0x38,0xf3,0x0c);
DEFINE_GUID(IID_IDXGIOutputDuplication,0x191cfac3,0xa341,0x470d,0xb2,0x6e,0xa8,0x64,0xf4,0x28,0x31,0x9c);
+4 -4
View File
@@ -108,7 +108,7 @@ extern "C"{
#include "winapifamily.h"
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
#define DXGI_CREATE_FACTORY_DEBUG 0x1
HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory);
HRESULT WINAPI DXGIGetDebugInterface1(UINT Flags, REFIID riid, _COM_Outptr_ void **pDebug);
@@ -1321,7 +1321,7 @@ EXTERN_C const IID IID_IDXGIFactory3;
/* interface __MIDL_itf_dxgi1_3_0000_0004 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
@@ -1798,7 +1798,7 @@ enum DXGI_OVERLAY_SUPPORT_FLAG
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_c_ifspec;
@@ -2093,7 +2093,7 @@ EXTERN_C const IID IID_IDXGIOutput3;
/* interface __MIDL_itf_dxgi1_3_0000_0008 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
DEFINE_GUID(IID_IDXGIDevice3,0x6007896c,0x3244,0x4afd,0xbf,0x18,0xa6,0xd3,0xbe,0xda,0x50,0x23);
DEFINE_GUID(IID_IDXGISwapChain2,0xa8be2ac4,0x199f,0x4946,0xb3,0x31,0x79,0x59,0x9f,0xb9,0x8d,0xe7);
+2 -2
View File
@@ -80,7 +80,7 @@ extern "C"{
#include "winapifamily.h"
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
typedef
enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG
{
@@ -1470,7 +1470,7 @@ EXTERN_C const IID IID_IDXGIAdapter3;
/* interface __MIDL_itf_dxgi1_4_0000_0004 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
DEFINE_GUID(IID_IDXGISwapChain3,0x94d99bdb,0xf1f8,0x4ab0,0xb2,0x36,0x7d,0xa0,0x17,0x0e,0xda,0xb1);
DEFINE_GUID(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78,0x84,0x03,0x2a,0x60);
+2 -2
View File
@@ -80,7 +80,7 @@ extern "C"{
#include "winapifamily.h"
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
typedef
enum DXGI_OUTDUPL_FLAG
{
@@ -1521,7 +1521,7 @@ EXTERN_C const IID IID_IDXGIFactory5;
/* interface __MIDL_itf_dxgi1_5_0000_0004 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
DEFINE_GUID(IID_IDXGIOutput5,0x80A07424,0xAB52,0x42EB,0x83,0x3C,0x0C,0x42,0xFD,0x28,0x2D,0x98);
DEFINE_GUID(IID_IDXGISwapChain4,0x3D585D5A,0xBD4A,0x489E,0xB1,0xF4,0x3D,0xBC,0xB6,0x45,0x2F,0xFB);
+2 -2
View File
@@ -81,7 +81,7 @@ extern "C"{
// Copyright (c) Microsoft Corporation. All Rights Reserved
#include "winapifamily.h"
#pragma region App Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
HRESULT WINAPI DXGIDeclareAdapterRemovalSupport();
typedef
enum DXGI_ADAPTER_FLAG3
@@ -1492,7 +1492,7 @@ EXTERN_C const IID IID_IDXGIFactory7;
/* interface __MIDL_itf_dxgi1_6_0000_0004 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e);
DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1);
+2 -2
View File
@@ -74,7 +74,7 @@ extern "C"{
#include "winapifamily.h"
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
#define DXGI_DEBUG_BINARY_VERSION ( 1 )
typedef
@@ -968,7 +968,7 @@ EXTERN_C const IID IID_IDXGIDebug1;
/* interface __MIDL_itf_dxgidebug_0000_0003 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+37 -25
View File
@@ -165,6 +165,7 @@ Abstract:
* WINAPI_PARTITION_PC_APP // specific to Desktop-only store apps
* WINAPI_PARTITION_PHONE_APP // specific to Phone-only store apps
* WINAPI_PARTITION_SYSTEM // specific to System applications
* WINAPI_PARTITION_GAMES // specific to games and apps
* The following partitions are indirect partitions and defined in
* winpackagefamily.h. These partitions are related to package based
@@ -183,6 +184,7 @@ Abstract:
#define WINAPI_FAMILY_PHONE_APP 3 /* Windows Phone Applications */
#define WINAPI_FAMILY_SYSTEM 4 /* Windows Drivers and Tools */
#define WINAPI_FAMILY_SERVER 5 /* Windows Server Applications */
#define WINAPI_FAMILY_GAMES 6 /* Windows Games and Applications */
#define WINAPI_FAMILY_DESKTOP_APP 100 /* Windows Desktop Applications */
/* The value of WINAPI_FAMILY_DESKTOP_APP may change in future SDKs. */
/* Additional WINAPI_FAMILY values may be defined in future SDKs. */
@@ -216,31 +218,33 @@ Abstract:
* An X indicates that the given partition is active for the given
* platform/family.
*
* +-------------------+---+
* | *Partition* | |
* +---+---+---+---+---+---+
* | | | | | | |
* | | | | | | |
* | | | | P | | |
* | | | | H | | |
* | D | | | O | | |
* | E | | P | N | S | S |
* | S | | C | E | Y | E |
* | K | | _ | _ | S | R |
* | T | A | A | A | T | V |
* +-------------------------+----+ O | P | P | P | E | E |
* | *Platform/Family* \| P | P | P | P | M | R |
* +------------------------------+---+---+---+---+---+---+
* | WINAPI_FAMILY_DESKTOP_APP | X | X | X | | | |
* +------------------------------+---+---+---+---+---+---+
* | WINAPI_FAMILY_PC_APP | | X | X | | | |
* +------------------------------+---+---+---+---+---+---+
* | WINAPI_FAMILY_PHONE_APP | | X | | X | | |
* +----------------------------- +---+---+---+---+---+---+
* | WINAPI_FAMILY_SYSTEM | | | | | X | |
* +----------------------------- +---+---+---+---+---+---+
* | WINAPI_FAMILY_SERVER | | | | | X | X |
* +------------------------------+---+---+---+---+---+---+
* +---------------------------+
* | *Partition* |
* +---+---+---+---+---+---+---+
* | | | | | | | |
* | | | | | | | |
* | | | | P | | | |
* | | | | H | | | |
* | D | | | O | | | |
* | E | | P | N | S | S | |
* | S | | C | E | Y | E | G |
* | K | | _ | _ | S | R | A |
* | T | A | A | A | T | V | M |
* +-------------------------+----+ O | P | P | P | E | E | E |
* | *Platform/Family* \| P | P | P | P | M | R | S |
* +------------------------------+---+---+---+---+---+---+---+
* | WINAPI_FAMILY_DESKTOP_APP | X | X | X | | | | |
* +------------------------------+---+---+---+---+---+---+---+
* | WINAPI_FAMILY_PC_APP | | X | X | | | | |
* +------------------------------+---+---+---+---+---+---+---+
* | WINAPI_FAMILY_PHONE_APP | | X | | X | | | |
* +----------------------------- +---+---+---+---+---+---+---+
* | WINAPI_FAMILY_SYSTEM | | | | | X | | |
* +----------------------------- +---+---+---+---+---+---+---+
* | WINAPI_FAMILY_SERVER | | | | | X | X | |
* +------------------------------+---+---+---+---+---+---+---+
* | WINAPI_FAMILY_GAMES | | | | | | | X |
* +------------------------------+---+---+---+---+---+---+---+
*
* The table above is encoded in the following expressions,
* each of which evaluates to 1 or 0.
@@ -252,6 +256,7 @@ Abstract:
WINAPI_FAMILY != WINAPI_FAMILY_PC_APP && \
WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP && \
WINAPI_FAMILY != WINAPI_FAMILY_SYSTEM && \
WINAPI_FAMILY != WINAPI_FAMILY_GAMES && \
WINAPI_FAMILY != WINAPI_FAMILY_SERVER
#error Unknown WINAPI_FAMILY value. Was it defined in terms of a WINAPI_PARTITION_* value?
#endif
@@ -277,6 +282,12 @@ Abstract:
#define WINAPI_PARTITION_PHONE_APP (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
#endif
#ifndef WINAPI_PARTITION_GAMES
#define WINAPI_PARTITION_GAMES \
(WINAPI_FAMILY == WINAPI_FAMILY_GAMES || \
WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
#endif
/*
* SYSTEM is the only partition defined here.
* All other System based editions are defined as packages
@@ -286,6 +297,7 @@ Abstract:
#ifndef WINAPI_PARTITION_SYSTEM
#define WINAPI_PARTITION_SYSTEM \
(WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM || \
WINAPI_FAMILY == WINAPI_FAMILY_GAMES || \
WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
#endif
+3 -1
View File
@@ -866,7 +866,9 @@
<ClCompile Include="core\bit_flag_iterator_tests.cpp">
<Filter>Core</Filter>
</ClCompile>
<ClCompile Include="maths\formatpacking.cpp" />
<ClCompile Include="maths\formatpacking.cpp">
<Filter>Common\Maths</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="os\win32\comexport.def">