diff --git a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUShaderProgramDX11.h b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUShaderProgramDX11.h index 246a5e24b..519afcbfc 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUShaderProgramDX11.h +++ b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUShaderProgramDX11.h @@ -14,11 +14,9 @@ template class GPUShaderProgramDX11 : public BaseType { protected: - BufferType* _buffer; public: - /// /// Initializes a new instance of the class. /// @@ -28,6 +26,9 @@ public: : _buffer(buffer) { BaseType::Init(initializer); +#if GPU_ENABLE_RESOURCE_NAMING + SetDebugObjectName(buffer, initializer.Name.Get(), initializer.Name.Length()); +#endif } /// @@ -39,24 +40,20 @@ public: } public: - /// /// Gets DirectX 11 buffer handle. /// - /// The DirectX 11 buffer. FORCE_INLINE BufferType* GetBufferHandleDX11() const { return _buffer; } public: - // [BaseType] uint32 GetBufferSize() const override { return 0; } - void* GetBufferHandle() const override { return _buffer; @@ -69,12 +66,10 @@ public: class GPUShaderProgramVSDX11 : public GPUShaderProgramDX11 { private: - byte _inputLayoutSize; ID3D11InputLayout* _inputLayout; public: - /// /// Initializes a new instance of the class. /// @@ -98,24 +93,20 @@ public: } public: - /// /// Gets the DirectX 11 input layout handle /// - /// DirectX 11 input layout FORCE_INLINE ID3D11InputLayout* GetInputLayoutDX11() const { return _inputLayout; } public: - // [GPUShaderProgramDX11] void* GetInputLayout() const override { return (void*)_inputLayout; } - byte GetInputLayoutSize() const override { return _inputLayoutSize; @@ -129,7 +120,6 @@ public: class GPUShaderProgramHSDX11 : public GPUShaderProgramDX11 { public: - /// /// Initializes a new instance of the class. /// @@ -149,7 +139,6 @@ public: class GPUShaderProgramDSDX11 : public GPUShaderProgramDX11 { public: - /// /// Initializes a new instance of the class. /// @@ -169,7 +158,6 @@ public: class GPUShaderProgramGSDX11 : public GPUShaderProgramDX11 { public: - /// /// Initializes a new instance of the class. /// @@ -188,7 +176,6 @@ public: class GPUShaderProgramPSDX11 : public GPUShaderProgramDX11 { public: - /// /// Initializes a new instance of the class. /// @@ -206,7 +193,6 @@ public: class GPUShaderProgramCSDX11 : public GPUShaderProgramDX11 { public: - /// /// Initializes a new instance of the class. /// diff --git a/Source/Engine/GraphicsDevice/DirectX/DX12/GPUShaderProgramDX12.h b/Source/Engine/GraphicsDevice/DirectX/DX12/GPUShaderProgramDX12.h index 843666307..12f2f2656 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX12/GPUShaderProgramDX12.h +++ b/Source/Engine/GraphicsDevice/DirectX/DX12/GPUShaderProgramDX12.h @@ -16,12 +16,9 @@ template class GPUShaderProgramDX12 : public BaseType { protected: - Array _data; public: - - GPUShaderProgramDX12(const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize) : Header(*header) { @@ -30,11 +27,9 @@ public: } public: - DxShaderHeader Header; public: - // [BaseType] void* GetBufferHandle() const override { @@ -52,12 +47,10 @@ public: class GPUShaderProgramVSDX12 : public GPUShaderProgramDX12 { private: - byte _inputLayoutSize; D3D12_INPUT_ELEMENT_DESC _inputLayout[VERTEX_SHADER_MAX_INPUT_ELEMENTS]; public: - GPUShaderProgramVSDX12(const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize, D3D12_INPUT_ELEMENT_DESC* inputLayout, byte inputLayoutSize) : GPUShaderProgramDX12(initializer, header, cacheBytes, cacheSize) , _inputLayoutSize(inputLayoutSize) @@ -67,7 +60,6 @@ public: } public: - // [GPUShaderProgramDX12] void* GetInputLayout() const override { @@ -86,7 +78,6 @@ public: class GPUShaderProgramHSDX12 : public GPUShaderProgramDX12 { public: - GPUShaderProgramHSDX12(const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize, int32 controlPointsCount) : GPUShaderProgramDX12(initializer, header, cacheBytes, cacheSize) { @@ -100,7 +91,6 @@ public: class GPUShaderProgramDSDX12 : public GPUShaderProgramDX12 { public: - GPUShaderProgramDSDX12(const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize) : GPUShaderProgramDX12(initializer, header, cacheBytes, cacheSize) { @@ -115,7 +105,6 @@ public: class GPUShaderProgramGSDX12 : public GPUShaderProgramDX12 { public: - GPUShaderProgramGSDX12(const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize) : GPUShaderProgramDX12(initializer, header, cacheBytes, cacheSize) { @@ -129,7 +118,6 @@ public: class GPUShaderProgramPSDX12 : public GPUShaderProgramDX12 { public: - GPUShaderProgramPSDX12(const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize) : GPUShaderProgramDX12(initializer, header, cacheBytes, cacheSize) { @@ -142,27 +130,24 @@ public: class GPUShaderProgramCSDX12 : public GPUShaderProgramDX12 { private: - GPUDeviceDX12* _device; Array _data; ID3D12PipelineState* _state; public: - GPUShaderProgramCSDX12(GPUDeviceDX12* device, const GPUShaderProgramInitializer& initializer, DxShaderHeader* header, byte* cacheBytes, uint32 cacheSize) : GPUShaderProgramDX12(initializer, header, cacheBytes, cacheSize) , _device(device) , _state(nullptr) { } - + ~GPUShaderProgramCSDX12() { _device->AddResourceToLateRelease(_state); } public: - /// /// Gets DirectX 12 compute pipeline state object ///