Diligent Engine  v.2.4.g
Namespaces | Macros | Functions | Variables
DeviceContextD3D11Impl.cpp File Reference
#include "pch.h"
#include "DeviceContextD3D11Impl.hpp"
#include "BufferD3D11Impl.hpp"
#include "ShaderD3D11Impl.hpp"
#include "Texture1D_D3D11.hpp"
#include "Texture2D_D3D11.hpp"
#include "Texture3D_D3D11.hpp"
#include "SamplerD3D11Impl.hpp"
#include "D3D11TypeConversions.hpp"
#include "TextureViewD3D11Impl.hpp"
#include "PipelineStateD3D11Impl.hpp"
#include "ShaderResourceBindingD3D11Impl.hpp"
#include "CommandListD3D11Impl.hpp"
#include "RenderDeviceD3D11Impl.hpp"
#include "FenceD3D11Impl.hpp"
#include "QueryD3D11Impl.hpp"

Namespaces

 Diligent
 The library uses Direct3D-style math:
 

Macros

#define COMMIT_SHADER(SN, ShaderName)
 
#define DEFINE_D3D11CTX_FUNC_POINTERS(ArrayName, FuncName)
 Helper macro used to create an array of device context methods to set particular resource for every shader stage. More...
 

Functions

void Diligent::UnbindView (ID3D11DeviceContext *pContext, TSetShaderResourcesType SetSRVMethod, UINT Slot)
 
void Diligent::UnbindView (ID3D11DeviceContext *pContext, TSetUnorderedAccessViewsType SetUAVMethod, UINT Slot)
 
template<typename TD3D11ResourceViewType , typename TSetD3D11View >
bool Diligent::UnbindPixelShaderUAV (ID3D11DeviceContext *pDeviceCtx, TD3D11ResourceViewType *CommittedD3D11Resources[], Uint32 NumCommittedSlots, Uint32 NumCommittedRenderTargets, TSetD3D11View SetD3D11ViewMethod)
 
template<>
bool Diligent::UnbindPixelShaderUAV< ID3D11UnorderedAccessView, TSetUnorderedAccessViewsType > (ID3D11DeviceContext *pDeviceCtx, ID3D11UnorderedAccessView *CommittedD3D11UAVs[], Uint32 NumCommittedUAVs, Uint32 NumCommittedRenderTargets, TSetUnorderedAccessViewsType SetD3D11UAVMethod)
 
template<typename TD3D11ResourceType , typename TSetD3D11ResMethodType >
void Diligent::SetD3D11ResourcesHelper (ID3D11DeviceContext *pDeviceCtx, TSetD3D11ResMethodType SetD3D11ResMethod, UINT StartSlot, UINT NumSlots, TD3D11ResourceType **ppResources)
 
template<>
void Diligent::SetD3D11ResourcesHelper (ID3D11DeviceContext *pDeviceCtx, TSetUnorderedAccessViewsType SetD3D11UAVMethod, UINT StartSlot, UINT NumSlots, ID3D11UnorderedAccessView **ppUAVs)
 
template<typename TD3D11ResourceType , typename TSetD3D11ResMethodType >
void Diligent::ReleaseCommittedShaderResourcesHelper (TD3D11ResourceType CommittedD3D11Res[], Uint8 NumCommittedResources, TSetD3D11ResMethodType SetD3D11ResMethod, ID3D11DeviceContext *pDeviceCtx)
 
void Diligent::ReleaseCommittedPSUAVs (ID3D11UnorderedAccessView *CommittedD3D11UAVs[], Uint8 NumCommittedResources, ID3D11DeviceContext *pDeviceCtx)
 

Variables

decltype(&ID3D11DeviceContext::CSSetUnorderedAccessViews) typedef Diligent::TSetUnorderedAccessViewsType
 

Macro Definition Documentation

◆ COMMIT_SHADER

#define COMMIT_SHADER (   SN,
  ShaderName 
)
Value:
do \
{ \
auto* pd3d11Shader = pPipelineStateD3D11->GetD3D11##ShaderName(); \
if (m_CommittedD3DShaders[SN##Ind] != pd3d11Shader) \
{ \
m_CommittedD3DShaders[SN##Ind] = pd3d11Shader; \
m_pd3d11DeviceContext->SN##SetShader(pd3d11Shader, nullptr, 0); \
} \
} while (false)

◆ DEFINE_D3D11CTX_FUNC_POINTERS

#define DEFINE_D3D11CTX_FUNC_POINTERS (   ArrayName,
  FuncName 
)
Value:
using T##FuncName##Type = decltype (&ID3D11DeviceContext::VS##FuncName); \
static const T##FuncName##Type ArrayName[] = \
{ \
&ID3D11DeviceContext::VS##FuncName, \
&ID3D11DeviceContext::PS##FuncName, \
&ID3D11DeviceContext::GS##FuncName, \
&ID3D11DeviceContext::HS##FuncName, \
&ID3D11DeviceContext::DS##FuncName, \
&ID3D11DeviceContext::CS##FuncName \
};

Helper macro used to create an array of device context methods to set particular resource for every shader stage.

Type
const D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type
Definition: PipelineStateD3D12Impl.cpp:69