aboutsummaryrefslogtreecommitdiff
path: root/src/States_DX12.h
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2016-03-25 13:01:54 +0100
committerlbavoil <[email protected]>2016-03-25 13:01:54 +0100
commit99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c (patch)
treefbcd4260d6c953d569a887505336a1c3f202e10f /src/States_DX12.h
downloadhbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.tar.xz
hbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.zip
GFSDK_HBAO+_distro_r3.0_cl20573789
Diffstat (limited to 'src/States_DX12.h')
-rw-r--r--src/States_DX12.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/States_DX12.h b/src/States_DX12.h
new file mode 100644
index 0000000..adf7bb8
--- /dev/null
+++ b/src/States_DX12.h
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+#if SUPPORT_D3D12
+
+#pragma once
+#include "Common.h"
+
+namespace GFSDK
+{
+namespace SSAO
+{
+namespace D3D12
+{
+
+//--------------------------------------------------------------------------------
+class States
+{
+public:
+ States()
+ {
+ }
+
+ void Create(GFSDK_D3D12_GraphicsContext* pD3DDevice);
+ void Release();
+
+ D3D12_BLEND_DESC* GetBlendStateMultiplyPreserveAlpha()
+ {
+ return &m_pBlendState_Multiply_PreserveAlpha;
+ }
+ D3D12_BLEND_DESC* GetBlendStateDisabledPreserveAlpha()
+ {
+ return &m_pBlendState_Disabled_PreserveAlpha;
+ }
+ D3D12_BLEND_DESC* GetBlendStateDisabled()
+ {
+ return &m_pBlendState_Disabled;
+ }
+ D3D12_DEPTH_STENCIL_DESC* GetDepthStencilStateDisabled()
+ {
+ return &m_pDepthStencilState_Disabled;
+ }
+ D3D12_RASTERIZER_DESC* GetRasterizerStateFullscreenNoScissor()
+ {
+ return &m_pRasterizerState_Fullscreen_NoScissor;
+ }
+ D3D12_SAMPLER_DESC& GetSamplerStatePointClamp()
+ {
+ return m_pSamplerState_PointClamp;
+ }
+ D3D12_SAMPLER_DESC& GetSamplerStatePointBorder()
+ {
+ return m_pSamplerState_PointBorder;
+ }
+ D3D12_SAMPLER_DESC& GetSamplerStateLinearClamp()
+ {
+ return m_pSamplerState_LinearClamp;
+ }
+#if ENABLE_DEBUG_MODES
+ D3D12_SAMPLER_DESC& GetSamplerStatePointWrap()
+ {
+ return m_pSamplerState_PointWrap;
+ }
+#endif
+
+private:
+ void CreateBlendStates();
+ void CreateDepthStencilStates();
+ void CreateRasterizerStates();
+ void CreateSamplerStates();
+
+ D3D12_BLEND_DESC m_pBlendState_Disabled;
+ D3D12_BLEND_DESC m_pBlendState_Multiply_PreserveAlpha;
+ D3D12_BLEND_DESC m_pBlendState_Disabled_PreserveAlpha;
+ D3D12_DEPTH_STENCIL_DESC m_pDepthStencilState_Disabled;
+ D3D12_RASTERIZER_DESC m_pRasterizerState_Fullscreen_NoScissor;
+ D3D12_SAMPLER_DESC m_pSamplerState_PointClamp;
+ D3D12_SAMPLER_DESC m_pSamplerState_PointBorder;
+ D3D12_SAMPLER_DESC m_pSamplerState_LinearClamp;
+#if ENABLE_DEBUG_MODES
+ D3D12_SAMPLER_DESC m_pSamplerState_PointWrap;
+#endif
+};
+
+} // namespace D3D12
+} // namespace SSAO
+} // namespace GFSDK
+#endif // SUPPORT_D3D12