From 91b5105db54d15033c17525a20c57a5d0f953f9c Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 16 Dec 2019 21:52:43 +0000 Subject: [PATCH] [d3d9] Move capture struct and enum to stateblock header Makes more sense for it to be here. --- src/d3d9/d3d9_state.h | 55 -------------------------------------- src/d3d9/d3d9_stateblock.h | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/d3d9/d3d9_state.h b/src/d3d9/d3d9_state.h index df2516eb6..383ac19ce 100644 --- a/src/d3d9/d3d9_state.h +++ b/src/d3d9/d3d9_state.h @@ -280,61 +280,6 @@ namespace dxvk { : UpdateHelper(pState->psConsts); } - enum class D3D9CapturedStateFlag : uint32_t { - VertexDecl, - Indices, - RenderStates, - SamplerStates, - VertexBuffers, - Textures, - VertexShader, - PixelShader, - Viewport, - ScissorRect, - ClipPlanes, - VsConstants, - PsConstants, - StreamFreq, - Transforms, - TextureStages, - Material - }; - - using D3D9CapturedStateFlags = Flags; - - struct D3D9StateCaptures { - D3D9CapturedStateFlags flags; - - std::bitset renderStates; - - std::bitset samplers; - std::array< - std::bitset, - SamplerCount> samplerStates; - - std::bitset vertexBuffers; - std::bitset textures; - std::bitset clipPlanes; - std::bitset streamFreq; - std::bitset transforms; - std::bitset textureStages; - std::array< - std::bitset, - caps::TextureStageCount> textureStageStates; - - struct { - std::bitset fConsts; - std::bitset iConsts; - std::bitset bConsts; - } vsConsts; - - struct { - std::bitset fConsts; - std::bitset iConsts; - std::bitset bConsts; - } psConsts; - }; - struct Direct3DState9 : public D3D9CapturableState { std::array, caps::MaxSimultaneousRenderTargets> renderTargets; diff --git a/src/d3d9/d3d9_stateblock.h b/src/d3d9/d3d9_stateblock.h index 897cc47e5..887638605 100644 --- a/src/d3d9/d3d9_stateblock.h +++ b/src/d3d9/d3d9_stateblock.h @@ -6,6 +6,61 @@ namespace dxvk { + enum class D3D9CapturedStateFlag : uint32_t { + VertexDecl, + Indices, + RenderStates, + SamplerStates, + VertexBuffers, + Textures, + VertexShader, + PixelShader, + Viewport, + ScissorRect, + ClipPlanes, + VsConstants, + PsConstants, + StreamFreq, + Transforms, + TextureStages, + Material + }; + + using D3D9CapturedStateFlags = Flags; + + struct D3D9StateCaptures { + D3D9CapturedStateFlags flags; + + std::bitset renderStates; + + std::bitset samplers; + std::array< + std::bitset, + SamplerCount> samplerStates; + + std::bitset vertexBuffers; + std::bitset textures; + std::bitset clipPlanes; + std::bitset streamFreq; + std::bitset transforms; + std::bitset textureStages; + std::array< + std::bitset, + caps::TextureStageCount> textureStageStates; + + struct { + std::bitset fConsts; + std::bitset iConsts; + std::bitset bConsts; + } vsConsts; + + struct { + std::bitset fConsts; + std::bitset iConsts; + std::bitset bConsts; + } psConsts; + }; + enum class D3D9StateBlockType :uint32_t { None, VertexState,