Skip to content

Commit

Permalink
Add feature flag for supporting pre-patched shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
vdwtanner committed Jul 27, 2022
1 parent 3896870 commit 1cb1dff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace D3D11On12
const bool m_bSupportDisplayableTextures;
const bool m_bSupportDeferredContexts;
const bool m_bSupportsNewPresentPath;
const bool m_bSupportPrepatchedShaders;
};

};
1 change: 1 addition & 0 deletions interface/D3D11On12DDI.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ struct SOpenAdapterArgs
UINT D3D11On12InterfaceVersion = c_CurrentD3D11On12InterfaceVersion;

PrivateCallbacks2* Callbacks2;
bool bSupportPrepatchedShaders;
};

#define D3D11DDI_CREATEDEVICE_FLAG_IS_XBOX 0x80000000
Expand Down
5 changes: 3 additions & 2 deletions src/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HRESULT WINAPI OpenAdapter_D3D11On12(_Inout_ D3D10DDIARG_OPENADAPTER* pArgs, _In
namespace D3D11On12
{
//----------------------------------------------------------------------------------------------------------------------------------
Adapter::Adapter(D3D10DDIARG_OPENADAPTER *pOpenAdapter, SOpenAdapterArgs& Args) noexcept(false)
Adapter::Adapter(D3D10DDIARG_OPENADAPTER* pOpenAdapter, SOpenAdapterArgs& Args) noexcept(false)
: m_pUnderlyingDevice(Args.pDevice)
, m_p3DCommandQueue(Args.p3DCommandQueue)
, m_NodeIndex(Args.NodeIndex)
Expand All @@ -27,7 +27,8 @@ namespace D3D11On12
Args.bSupportDisplayableTextures : false)
, m_bSupportDeferredContexts(Args.D3D11On12InterfaceVersion >= 5 ?
Args.bSupportDeferredContexts : true)
, m_bSupportsNewPresentPath(Args.D3D11On12InterfaceVersion >=7 ? Args.Callbacks2->Present11On12CB != nullptr : false)
, m_bSupportsNewPresentPath(Args.D3D11On12InterfaceVersion >= 7 ? Args.Callbacks2->Present11On12CB != nullptr : false)
, m_bSupportPrepatchedShaders(Args.D3D11On12InterfaceVersion >= 7 ? Args.bSupportPrepatchedShaders : false)
{
static const D3D10_2DDI_ADAPTERFUNCS AdapterFuncs = {
CalcPrivateDeviceSize,
Expand Down

0 comments on commit 1cb1dff

Please sign in to comment.