// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Graphics/GPUPipelineState.h" #include "GPUShaderProgramDX11.h" #include "GPUDeviceDX11.h" #if GRAPHICS_API_DIRECTX11 /// /// Graphics pipeline state object for DirectX 11 backend. /// class GPUPipelineStateDX11 : public GPUResourceDX11 { public: int32 DepthStencilStateIndex; int32 RasterizerStateIndex; ID3D11BlendState* BlendState = nullptr; GPUShaderProgramVSDX11* VS = nullptr; GPUShaderProgramHSDX11* HS = nullptr; GPUShaderProgramDSDX11* DS = nullptr; GPUShaderProgramGSDX11* GS = nullptr; GPUShaderProgramPSDX11* PS = nullptr; D3D11_PRIMITIVE_TOPOLOGY PrimitiveTopology; public: /// /// Initializes a new instance of the class. /// /// The device. GPUPipelineStateDX11(GPUDeviceDX11* device) : GPUResourceDX11(device, StringView::Empty) { } public: // [GPUResourceDX11] ID3D11Resource* GetResource() final override; // [GPUPipelineState] bool IsValid() const override; bool Init(const Description& desc) override; protected: // [GPUResourceDX11] void OnReleaseGPU() final override; }; #endif