git.s-ol.nu forks/DiligentCore / c072867
Added API function call type specification to fix c/c++ mismatch on x86 MSVC assiduous 3 years ago
106 changed file(s) with 1108 addition(s) and 927 deletion(s). Raw diff Collapse all Expand all
4747 const Char* Path,
4848 EFileAccessMode Access = EFileAccessMode::Read);
4949
50 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
50 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
5151
5252 /// Reads data from the stream
53 virtual void ReadBlob(IDataBlob* pData) override;
53 virtual void DILIGENT_CALL_TYPE ReadBlob(IDataBlob* pData) override;
5454
5555 /// Reads data from the stream
56 virtual bool Read(void* Data, size_t Size) override;
56 virtual bool DILIGENT_CALL_TYPE Read(void* Data, size_t Size) override;
5757
5858 /// Writes data to the stream
59 virtual bool Write(const void* Data, size_t Size) override;
59 virtual bool DILIGENT_CALL_TYPE Write(const void* Data, size_t Size) override;
6060
61 virtual size_t GetSize() override;
61 virtual size_t DILIGENT_CALL_TYPE GetSize() override;
6262
63 virtual bool IsValid() override;
63 virtual bool DILIGENT_CALL_TYPE IsValid() override;
6464
6565 private:
6666 FileWrapper m_FileWrpr;
4545
4646 DataBlobImpl(IReferenceCounters* pRefCounters, size_t InitialSize = 0);
4747
48 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
48 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
4949
5050 /// Sets the size of the internal data buffer
51 virtual void Resize(size_t NewSize) override;
51 virtual void DILIGENT_CALL_TYPE Resize(size_t NewSize) override;
5252
5353 /// Returns the size of the internal data buffer
54 virtual size_t GetSize() override;
54 virtual size_t DILIGENT_CALL_TYPE GetSize() override;
5555
5656 /// Returns the pointer to the internal data buffer
57 virtual void* GetDataPtr() override;
57 virtual void* DILIGENT_CALL_TYPE GetDataPtr() override;
5858
5959 private:
6060 std::vector<Uint8> m_DataBuff;
4747 MemoryFileStream(IReferenceCounters* pRefCounters,
4848 IDataBlob* pData);
4949
50 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
50 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
5151
5252 /// Reads data from the stream
53 virtual void ReadBlob(IDataBlob* pData) override;
53 virtual void DILIGENT_CALL_TYPE ReadBlob(IDataBlob* pData) override;
5454
5555 /// Reads data from the stream
56 virtual bool Read(void* Data, size_t Size) override;
56 virtual bool DILIGENT_CALL_TYPE Read(void* Data, size_t Size) override;
5757
5858 /// Writes data to the stream
59 virtual bool Write(const void* Data, size_t Size) override;
59 virtual bool DILIGENT_CALL_TYPE Write(const void* Data, size_t Size) override;
6060
61 virtual size_t GetSize() override;
61 virtual size_t DILIGENT_CALL_TYPE GetSize() override;
6262
63 virtual bool IsValid() override;
63 virtual bool DILIGENT_CALL_TYPE IsValid() override;
6464
6565 private:
6666 RefCntAutoPtr<IDataBlob> m_DataBlob;
5555 void ClassName::QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) \
5656 IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName)
5757
58 #define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName) \
59 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override \
58 #define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName) \
59 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override \
6060 IMPLEMENT_QUERY_INTERFACE_BODY(InterfaceID, ParentClassName)
6161
6262
6969 RefCountedObject<BaseInterface>{pRefCounters}
7070 {}
7171
72 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)
72 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)
7373 {
7474 if (ppInterface == nullptr)
7575 return;
524524 // "There remain strong references to the object being destroyed" );
525525 }
526526
527 inline virtual IReferenceCounters* GetReferenceCounters() const override final
527 inline virtual IReferenceCounters* DILIGENT_CALL_TYPE GetReferenceCounters() const override final
528528 {
529529 VERIFY_EXPR(m_pRefCounters != nullptr);
530530 return m_pRefCounters;
531531 }
532532
533 inline virtual ReferenceCounterValueType AddRef() override final
533 inline virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef() override final
534534 {
535535 VERIFY_EXPR(m_pRefCounters != nullptr);
536536 // Since type of m_pRefCounters is RefCountersImpl,
538538 return m_pRefCounters->AddStrongRef();
539539 }
540540
541 inline virtual ReferenceCounterValueType Release() override
541 inline virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release() override
542542 {
543543 VERIFY_EXPR(m_pRefCounters != nullptr);
544544 // Since type of m_pRefCounters is RefCountersImpl,
5353 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_DataBlob, TBase)
5454
5555 /// Sets the size of the internal data buffer
56 virtual void Resize(size_t NewSize) override
56 virtual void DILIGENT_CALL_TYPE Resize(size_t NewSize) override
5757 {
5858 m_String.resize(NewSize);
5959 }
6060
6161 /// Returns the size of the internal data buffer
62 virtual size_t GetSize() override
62 virtual size_t DILIGENT_CALL_TYPE GetSize() override
6363 {
6464 return m_String.length();
6565 }
6666
6767 /// Returns the pointer to the internal data buffer
68 virtual void* GetDataPtr() override
68 virtual void* DILIGENT_CALL_TYPE GetDataPtr() override
6969 {
7070 return &m_String[0];
7171 }
120120
121121 /// Implementation of IBuffer::CreateView(); calls CreateViewInternal() virtual function
122122 /// that creates buffer view for the specific engine implementation.
123 virtual void CreateView(const struct BufferViewDesc& ViewDesc, IBufferView** ppView) override;
123 virtual void DILIGENT_CALL_TYPE CreateView(const struct BufferViewDesc& ViewDesc, IBufferView** ppView) override;
124124
125125 /// Implementation of IBuffer::GetDefaultView().
126 virtual IBufferView* GetDefaultView(BUFFER_VIEW_TYPE ViewType) override;
126 virtual IBufferView* DILIGENT_CALL_TYPE GetDefaultView(BUFFER_VIEW_TYPE ViewType) override;
127127
128128 /// Creates default buffer views.
129129
134134 /// The function calls CreateViewInternal().
135135 void CreateDefaultViews();
136136
137 virtual void SetState(RESOURCE_STATE State) override final
137 virtual void DILIGENT_CALL_TYPE SetState(RESOURCE_STATE State) override final
138138 {
139139 this->m_State = State;
140140 }
141141
142 virtual RESOURCE_STATE GetState() const override final
142 virtual RESOURCE_STATE DILIGENT_CALL_TYPE GetState() const override final
143143 {
144144 return this->m_State;
145145 }
7575 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_BufferView, TDeviceObjectBase)
7676
7777 /// Implementation of IBufferView::GetBuffer()
78 virtual IBuffer* GetBuffer() override final
78 virtual IBuffer* DILIGENT_CALL_TYPE GetBuffer() override final
7979 {
8080 return m_pBuffer;
8181 }
9696
9797 /// Base implementation of IDeviceContext::SetVertexBuffers(); validates parameters and
9898 /// caches references to the buffers.
99 inline virtual void SetVertexBuffers(Uint32 StartSlot,
100 Uint32 NumBuffersSet,
101 IBuffer** ppBuffers,
102 Uint32* pOffsets,
103 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
104 SET_VERTEX_BUFFERS_FLAGS Flags) override = 0;
105
106 inline virtual void InvalidateState() override = 0;
99 inline virtual void DILIGENT_CALL_TYPE SetVertexBuffers(Uint32 StartSlot,
100 Uint32 NumBuffersSet,
101 IBuffer** ppBuffers,
102 Uint32* pOffsets,
103 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
104 SET_VERTEX_BUFFERS_FLAGS Flags) override = 0;
105
106 inline virtual void DILIGENT_CALL_TYPE InvalidateState() override = 0;
107107
108108 /// Base implementation of IDeviceContext::CommitShaderResources(); validates parameters.
109109 inline bool CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding,
111111 int);
112112
113113 /// Base implementation of IDeviceContext::SetIndexBuffer(); caches the strong reference to the index buffer
114 inline virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override = 0;
114 inline virtual void DILIGENT_CALL_TYPE SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override = 0;
115115
116116 /// Caches the viewports
117117 inline void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32& RTWidth, Uint32& RTHeight);
124124 inline bool SetRenderTargets(Uint32 NumRenderTargets, ITextureView* ppRenderTargets[], ITextureView* pDepthStencil);
125125
126126 /// Base implementation of IDeviceContext::UpdateBuffer(); validates input parameters.
127 virtual void UpdateBuffer(IBuffer* pBuffer, Uint32 Offset, Uint32 Size, const void* pData, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override = 0;
127 virtual void DILIGENT_CALL_TYPE UpdateBuffer(IBuffer* pBuffer,
128 Uint32 Offset,
129 Uint32 Size,
130 const void* pData,
131 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override = 0;
128132
129133 /// Base implementation of IDeviceContext::CopyBuffer(); validates input parameters.
130 virtual void CopyBuffer(IBuffer* pSrcBuffer,
131 Uint32 SrcOffset,
132 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
133 IBuffer* pDstBuffer,
134 Uint32 DstOffset,
135 Uint32 Size,
136 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override = 0;
134 virtual void DILIGENT_CALL_TYPE CopyBuffer(IBuffer* pSrcBuffer,
135 Uint32 SrcOffset,
136 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
137 IBuffer* pDstBuffer,
138 Uint32 DstOffset,
139 Uint32 Size,
140 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override = 0;
137141
138142 /// Base implementation of IDeviceContext::MapBuffer(); validates input parameters.
139 virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override = 0;
143 virtual void DILIGENT_CALL_TYPE MapBuffer(IBuffer* pBuffer,
144 MAP_TYPE MapType,
145 MAP_FLAGS MapFlags,
146 PVoid& pMappedData) override = 0;
140147
141148 /// Base implementation of IDeviceContext::UnmapBuffer()
142 virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override = 0;
149 virtual void DILIGENT_CALL_TYPE UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override = 0;
143150
144151 /// Base implementaiton of IDeviceContext::UpdateData(); validates input parameters
145 virtual void UpdateTexture(ITexture* pTexture,
146 Uint32 MipLevel,
147 Uint32 Slice,
148 const Box& DstBox,
149 const TextureSubResData& SubresData,
150 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
151 RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode) override = 0;
152 virtual void DILIGENT_CALL_TYPE UpdateTexture(ITexture* pTexture,
153 Uint32 MipLevel,
154 Uint32 Slice,
155 const Box& DstBox,
156 const TextureSubResData& SubresData,
157 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
158 RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode) override = 0;
152159
153160 /// Base implementaiton of IDeviceContext::CopyTexture(); validates input parameters
154 virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs) override = 0;
161 virtual void DILIGENT_CALL_TYPE CopyTexture(const CopyTextureAttribs& CopyAttribs) override = 0;
155162
156163 /// Base implementaiton of IDeviceContext::MapTextureSubresource()
157 virtual void MapTextureSubresource(ITexture* pTexture,
158 Uint32 MipLevel,
159 Uint32 ArraySlice,
160 MAP_TYPE MapType,
161 MAP_FLAGS MapFlags,
162 const Box* pMapRegion,
163 MappedTextureSubresource& MappedData) override = 0;
164 virtual void DILIGENT_CALL_TYPE MapTextureSubresource(ITexture* pTexture,
165 Uint32 MipLevel,
166 Uint32 ArraySlice,
167 MAP_TYPE MapType,
168 MAP_FLAGS MapFlags,
169 const Box* pMapRegion,
170 MappedTextureSubresource& MappedData) override = 0;
164171
165172 /// Base implementaiton of IDeviceContext::UnmapTextureSubresource()
166 virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override = 0;
167
168 virtual void GenerateMips(ITextureView* pTexView) override = 0;
169
170 virtual void ResolveTextureSubresource(ITexture* pSrcTexture,
171 ITexture* pDstTexture,
172 const ResolveTextureSubresourceAttribs& ResolveAttribs) override = 0;
173 virtual void DILIGENT_CALL_TYPE UnmapTextureSubresource(ITexture* pTexture,
174 Uint32 MipLevel,
175 Uint32 ArraySlice) override = 0;
176
177 virtual void DILIGENT_CALL_TYPE GenerateMips(ITextureView* pTexView) override = 0;
178
179 virtual void DILIGENT_CALL_TYPE ResolveTextureSubresource(ITexture* pSrcTexture,
180 ITexture* pDstTexture,
181 const ResolveTextureSubresourceAttribs& ResolveAttribs) override = 0;
173182
174183 /// Returns currently bound pipeline state and blend factors
175184 inline void GetPipelineState(IPipelineState** ppPSO, float* BlendFactors, Uint32& StencilRef);
107107 }
108108 }
109109
110 inline virtual Atomics::Long Release() override final
110 inline virtual Atomics::Long DILIGENT_CALL_TYPE Release() override final
111111 {
112112 // Render device owns allocators for all types of device objects,
113113 // so it must be destroyed after all device objects are released.
136136
137137 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_DeviceObject, TBase)
138138
139 virtual const ObjectDescType& GetDesc() const override final
139 virtual const ObjectDescType& DILIGENT_CALL_TYPE GetDesc() const override final
140140 {
141141 return m_Desc;
142142 }
143143
144144 /// Returns unique identifier
145 virtual Int32 GetUniqueID() const override final
145 virtual Int32 DILIGENT_CALL_TYPE GetUniqueID() const override final
146146 {
147147 /// \note
148148 /// This unique ID is used to unambiguously identify device object for
5555 {
5656 }
5757
58 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
58 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
5959 {
6060 if (ppInterface == nullptr)
6161 return;
6868 }
6969 }
7070
71 virtual ReferenceCounterValueType AddRef() override final
71 virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef() override final
7272 {
7373 return m_RefCounters.AddStrongRef();
7474 }
7575
76 virtual ReferenceCounterValueType Release() override final
76 virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release() override final
7777 {
7878 return m_RefCounters.ReleaseStrongRef();
7979 }
8080
81 virtual IReferenceCounters* GetReferenceCounters() const override final
81 virtual IReferenceCounters* DILIGENT_CALL_TYPE GetReferenceCounters() const override final
8282 {
8383 return const_cast<IReferenceCounters*>(static_cast<const IReferenceCounters*>(&m_RefCounters));
8484 }
8585
86 virtual const APIInfo& GetAPIInfo() const override final
86 virtual const APIInfo& DILIGENT_CALL_TYPE GetAPIInfo() const override final
8787 {
8888 return Diligent::GetAPIInfo();
8989 }
9090
91 virtual void CreateDefaultShaderSourceStreamFactory(const Char* SearchDirectories,
92 IShaderSourceInputStreamFactory** ppShaderSourceFactory) const override final
91 virtual void DILIGENT_CALL_TYPE CreateDefaultShaderSourceStreamFactory(const Char* SearchDirectories,
92 IShaderSourceInputStreamFactory** ppShaderSourceFactory) const override final
9393 {
9494 Diligent::CreateDefaultShaderSourceStreamFactory(SearchDirectories, ppShaderSourceFactory);
9595 }
106106
107107 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_Query, TDeviceObjectBase)
108108
109 virtual void Invalidate() override
109 virtual void DILIGENT_CALL_TYPE Invalidate() override
110110 {
111111 m_State = QueryState::Inactive;
112112 }
312312
313313 // It is important to have final implementation of Release() method to avoid
314314 // virtual calls
315 inline virtual ReferenceCounterValueType Release() override final
315 inline virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release() override final
316316 {
317317 return TObjectBase::Release();
318318 }
319319
320320 /// Implementation of IRenderDevice::CreateResourceMapping().
321 virtual void CreateResourceMapping(const ResourceMappingDesc& MappingDesc, IResourceMapping** ppMapping) override final;
321 virtual void DILIGENT_CALL_TYPE CreateResourceMapping(const ResourceMappingDesc& MappingDesc, IResourceMapping** ppMapping) override final;
322322
323323 /// Implementation of IRenderDevice::GetDeviceCaps().
324 virtual const DeviceCaps& GetDeviceCaps() const override final
324 virtual const DeviceCaps& DILIGENT_CALL_TYPE GetDeviceCaps() const override final
325325 {
326326 return m_DeviceCaps;
327327 }
328328
329329 /// Implementation of IRenderDevice::GetTextureFormatInfo().
330 virtual const TextureFormatInfo& GetTextureFormatInfo(TEXTURE_FORMAT TexFormat) override final
330 virtual const TextureFormatInfo& DILIGENT_CALL_TYPE GetTextureFormatInfo(TEXTURE_FORMAT TexFormat) override final
331331 {
332332 VERIFY(TexFormat >= TEX_FORMAT_UNKNOWN && TexFormat < TEX_FORMAT_NUM_FORMATS, "Texture format out of range");
333333 const auto& TexFmtInfo = m_TextureFormatsInfo[TexFormat];
336336 }
337337
338338 /// Implementation of IRenderDevice::GetTextureFormatInfoExt().
339 virtual const TextureFormatInfoExt& GetTextureFormatInfoExt(TEXTURE_FORMAT TexFormat) override final
339 virtual const TextureFormatInfoExt& DILIGENT_CALL_TYPE GetTextureFormatInfoExt(TEXTURE_FORMAT TexFormat) override final
340340 {
341341 VERIFY(TexFormat >= TEX_FORMAT_UNKNOWN && TexFormat < TEX_FORMAT_NUM_FORMATS, "Texture format out of range");
342342 const auto& TexFmtInfo = m_TextureFormatsInfo[TexFormat];
350350 return TexFmtInfo;
351351 }
352352
353 virtual IEngineFactory* GetEngineFactory() const override final
353 virtual IEngineFactory* DILIGENT_CALL_TYPE GetEngineFactory() const override final
354354 {
355355 return m_pEngineFactory.RawPtr<IEngineFactory>();
356356 }
108108
109109 ~ResourceMappingImpl();
110110
111 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
111 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
112112
113113 /// Implementation of IResourceMapping::AddResource()
114 virtual void AddResource(const Char* Name, IDeviceObject* pObject, bool bIsUnique) override final;
114 virtual void DILIGENT_CALL_TYPE AddResource(const Char* Name,
115 IDeviceObject* pObject,
116 bool bIsUnique) override final;
115117
116118 /// Implementation of IResourceMapping::AddResourceArray()
117 virtual void AddResourceArray(const Char* Name, Uint32 StartIndex, IDeviceObject* const* ppObjects, Uint32 NumElements, bool bIsUnique) override final;
119 virtual void DILIGENT_CALL_TYPE AddResourceArray(const Char* Name,
120 Uint32 StartIndex,
121 IDeviceObject* const* ppObjects,
122 Uint32 NumElements,
123 bool bIsUnique) override final;
118124
119125 /// Implementation of IResourceMapping::RemoveResourceByName()
120 virtual void RemoveResourceByName(const Char* Name, Uint32 ArrayIndex) override final;
126 virtual void DILIGENT_CALL_TYPE RemoveResourceByName(const Char* Name, Uint32 ArrayIndex) override final;
121127
122128 /// Implementation of IResourceMapping::GetResource()
123 virtual void GetResource(const Char* Name, IDeviceObject** ppResource, Uint32 ArrayIndex) override final;
129 virtual void DILIGENT_CALL_TYPE GetResource(const Char* Name,
130 IDeviceObject** ppResource,
131 Uint32 ArrayIndex) override final;
124132
125133 /// Returns number of resources in the resource mapping.
126 virtual size_t GetSize() override final;
134 virtual size_t DILIGENT_CALL_TYPE GetSize() override final;
127135
128136 private:
129137 ThreadingTools::LockHelper Lock();
6161 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_ShaderResourceBinding, TObjectBase)
6262
6363 /// Implementation of IShaderResourceBinding::GetPipelineState().
64 virtual IPipelineState* GetPipelineState() override final
64 virtual IPipelineState* DILIGENT_CALL_TYPE GetPipelineState() override final
6565 {
6666 return m_pPSO;
6767 }
343343 {
344344 }
345345
346 void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
346 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
347347 {
348348 if (ppInterface == nullptr)
349349 return;
356356 }
357357 }
358358
359 virtual Atomics::Long AddRef() override final
359 virtual Atomics::Long DILIGENT_CALL_TYPE AddRef() override final
360360 {
361361 return m_ParentResLayout.GetOwner().AddRef();
362362 }
363363
364 virtual Atomics::Long Release() override final
364 virtual Atomics::Long DILIGENT_CALL_TYPE Release() override final
365365 {
366366 return m_ParentResLayout.GetOwner().Release();
367367 }
368368
369 virtual IReferenceCounters* GetReferenceCounters() const override final
369 virtual IReferenceCounters* DILIGENT_CALL_TYPE GetReferenceCounters() const override final
370370 {
371371 return m_ParentResLayout.GetOwner().GetReferenceCounters();
372372 }
8383 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_SwapChain, TObjectBase)
8484
8585 /// Implementation of ISwapChain::GetDesc()
86 virtual const SwapChainDesc& GetDesc() const override final
86 virtual const SwapChainDesc& DILIGENT_CALL_TYPE GetDesc() const override final
8787 {
8888 return m_SwapChainDesc;
8989 }
130130
131131 /// Implementaiton of ITexture::CreateView(); calls CreateViewInternal() virtual function that
132132 /// creates texture view for the specific engine implementation.
133 virtual void CreateView(const struct TextureViewDesc& ViewDesc, ITextureView** ppView) override
133 virtual void DILIGENT_CALL_TYPE CreateView(const struct TextureViewDesc& ViewDesc, ITextureView** ppView) override
134134 {
135135 DEV_CHECK_ERR(ViewDesc.ViewType != TEXTURE_VIEW_UNDEFINED, "Texture view type is not specified");
136136 if (ViewDesc.ViewType == TEXTURE_VIEW_SHADER_RESOURCE)
158158 /// The function calls CreateViewInternal().
159159 void CreateDefaultViews();
160160
161 virtual void SetState(RESOURCE_STATE State) override final
161 virtual void DILIGENT_CALL_TYPE SetState(RESOURCE_STATE State) override final
162162 {
163163 this->m_State = State;
164164 }
165165
166 virtual RESOURCE_STATE GetState() const override final
166 virtual RESOURCE_STATE DILIGENT_CALL_TYPE GetState() const override final
167167 {
168168 return this->m_State;
169169 }
181181 }
182182
183183 /// Implementation of ITexture::GetDefaultView().
184 virtual ITextureView* GetDefaultView(TEXTURE_VIEW_TYPE ViewType) override
184 virtual ITextureView* DILIGENT_CALL_TYPE GetDefaultView(TEXTURE_VIEW_TYPE ViewType) override
185185 {
186186 switch (ViewType)
187187 {
7676 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_TextureView, TDeviceObjectBase)
7777
7878 /// Implementation of ITextureView::SetSampler()
79 virtual void SetSampler(ISampler* pSampler) override final
79 virtual void DILIGENT_CALL_TYPE SetSampler(ISampler* pSampler) override final
8080 {
8181 #ifdef DEVELOPMENT
8282 if (this->m_Desc.ViewType != TEXTURE_VIEW_SHADER_RESOURCE)
8686 }
8787
8888 /// Implementation of ITextureView::GetSampler()
89 virtual ISampler* GetSampler() override final
89 virtual ISampler* DILIGENT_CALL_TYPE GetSampler() override final
9090 {
9191 return m_pSampler;
9292 }
9797 }
9898
9999 /// Implementation of ITextureView::GetTexture()
100 virtual ITexture* GetTexture() override final
100 virtual ITexture* DILIGENT_CALL_TYPE GetTexture() override final
101101 {
102102 return m_pTexture;
103103 }
104104
105 const ITexture* GetTexture() const
105 const ITexture* DILIGENT_CALL_TYPE GetTexture() const
106106 {
107107 return m_pTexture;
108108 }
186186 {
187187 #if DILIGENT_CPP_INTERFACE
188188 /// Returns the buffer description used to create the object
189 virtual const BufferDesc& GetDesc() const override = 0;
189 virtual const BufferDesc& METHOD(GetDesc)() const override = 0;
190190 #endif
191191
192192 /// Creates a new buffer view
155155 {
156156 #if DILIGENT_CPP_INTERFACE
157157 /// Returns the buffer view description used to create the object
158 virtual const BufferViewDesc& GetDesc() const override = 0;
158 virtual const BufferViewDesc& METHOD(GetDesc)() const override = 0;
159159 #endif
160160
161161 /// Returns pointer to the referenced buffer object.
6262 {
6363 #if DILIGENT_CPP_INTERFACE
6464 /// Returns the fence description used to create the object
65 virtual const FenceDesc& GetDesc() const override = 0;
65 virtual const FenceDesc& METHOD(GetDesc)() const override = 0;
6666 #endif
6767
6868 /// Returns the last completed value signaled by the GPU
267267 {
268268 #if DILIGENT_CPP_INTERFACE
269269 /// Returns the blend state description used to create the object
270 virtual const PipelineStateDesc& GetDesc()const override = 0;
270 virtual const PipelineStateDesc& METHOD(GetDesc)()const override = 0;
271271 #endif
272272
273273
187187 {
188188 #if DILIGENT_CPP_INTERFACE
189189 /// Returns the Query description used to create the object.
190 virtual const QueryDesc& GetDesc() const override = 0;
190 virtual const QueryDesc& METHOD(GetDesc)() const override = 0;
191191 #endif
192192
193193 /// Gets the query data.
192192 {
193193 #if DILIGENT_CPP_INTERFACE
194194 /// Returns the sampler description used to create the object
195 virtual const SamplerDesc& GetDesc() const override = 0;
195 virtual const SamplerDesc& METHOD(GetDesc)() const override = 0;
196196 #endif
197197 };
198198 DILIGENT_END_INTERFACE
321321 {
322322 #if DILIGENT_CPP_INTERFACE
323323 /// Returns the shader description
324 virtual const ShaderDesc& GetDesc() const override = 0;
324 virtual const ShaderDesc& METHOD(GetDesc)() const override = 0;
325325 #endif
326326
327327 /// Returns the total number of shader resources
319319 {
320320 #if DILIGENT_CPP_INTERFACE
321321 /// Returns the texture description used to create the object
322 virtual const TextureDesc& GetDesc()const override = 0;
322 virtual const TextureDesc& METHOD(GetDesc)()const override = 0;
323323 #endif
324324
325325 /// Creates a new texture view
202202 {
203203 #if DILIGENT_CPP_INTERFACE
204204 /// Returns the texture view description used to create the object
205 virtual const TextureViewDesc& GetDesc() const override = 0;
205 virtual const TextureViewDesc& METHOD(GetDesc)() const override = 0;
206206 #endif
207207
208208 /// Sets the texture sampler to use for filtering operations
3939 public:
4040 DefaultShaderSourceStreamFactory(IReferenceCounters* pRefCounters, const Char* SearchDirectories);
4141
42 virtual void CreateInputStream(const Char* Name, IFileStream** ppStream) override final;
42 virtual void DILIGENT_CALL_TYPE CreateInputStream(const Char* Name, IFileStream** ppStream) override final;
4343
4444 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_IShaderSourceInputStreamFactory, ObjectBase<IShaderSourceInputStreamFactory>);
4545
6161
6262 ~BufferD3D11Impl();
6363
64 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
64 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6565
6666 /// Implementation of IBufferD3D11::GetD3D11Buffer().
67 virtual ID3D11Buffer* GetD3D11Buffer() override final { return m_pd3d11Buffer; }
67 virtual ID3D11Buffer* DILIGENT_CALL_TYPE GetD3D11Buffer() override final { return m_pd3d11Buffer; }
6868
6969 /// Implementation of IBuffer::GetNativeHandle().
70 virtual void* GetNativeHandle() override final { return GetD3D11Buffer(); }
70 virtual void* DILIGENT_CALL_TYPE GetNativeHandle() override final { return GetD3D11Buffer(); }
7171
7272 void AddState(RESOURCE_STATE State)
7373 {
5252 ID3D11View* pD3D11View,
5353 bool bIsDefaultView);
5454
55 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) final;
55 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) final;
5656
5757 /// Implementation of IBufferViewD3D11::GetD3D11View().
58 virtual ID3D11View* GetD3D11View() override final
58 virtual ID3D11View* DILIGENT_CALL_TYPE GetD3D11View() override final
5959 {
6060 return m_pD3D11View;
6161 }
6868 ID3D11DeviceContext* pd3d11DeviceContext,
6969 const struct EngineD3D11CreateInfo& EngineAttribs,
7070 bool bIsDeferred);
71 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
71 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
7272
7373 /// Implementation of IDeviceContext::SetPipelineState() in Direct3D11 backend.
74 virtual void SetPipelineState(IPipelineState* pPipelineState) override final;
74 virtual void DILIGENT_CALL_TYPE SetPipelineState(IPipelineState* pPipelineState) override final;
7575
7676 /// Implementation of IDeviceContext::TransitionShaderResources() in Direct3D11 backend.
77 virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding) override final;
77 virtual void DILIGENT_CALL_TYPE TransitionShaderResources(IPipelineState* pPipelineState,
78 IShaderResourceBinding* pShaderResourceBinding) override final;
7879
7980 /// Implementation of IDeviceContext::CommitShaderResources() in Direct3D11 backend.
80 virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
81 virtual void DILIGENT_CALL_TYPE CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding,
82 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
8183
8284 /// Implementation of IDeviceContext::SetStencilRef() in Direct3D11 backend.
83 virtual void SetStencilRef(Uint32 StencilRef) override final;
85 virtual void DILIGENT_CALL_TYPE SetStencilRef(Uint32 StencilRef) override final;
8486
8587 /// Implementation of IDeviceContext::SetBlendFactors() in Direct3D11 backend.
86 virtual void SetBlendFactors(const float* pBlendFactors = nullptr) override final;
88 virtual void DILIGENT_CALL_TYPE SetBlendFactors(const float* pBlendFactors = nullptr) override final;
8789
8890 /// Implementation of IDeviceContext::SetVertexBuffers() in Direct3D11 backend.
89 virtual void SetVertexBuffers(Uint32 StartSlot,
90 Uint32 NumBuffersSet,
91 IBuffer** ppBuffers,
92 Uint32* pOffsets,
93 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
94 SET_VERTEX_BUFFERS_FLAGS Flags) override final;
91 virtual void DILIGENT_CALL_TYPE SetVertexBuffers(Uint32 StartSlot,
92 Uint32 NumBuffersSet,
93 IBuffer** ppBuffers,
94 Uint32* pOffsets,
95 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
96 SET_VERTEX_BUFFERS_FLAGS Flags) override final;
9597
9698 /// Implementation of IDeviceContext::InvalidateState() in Direct3D11 backend.
97 virtual void InvalidateState() override final;
99 virtual void DILIGENT_CALL_TYPE InvalidateState() override final;
98100
99101 /// Implementation of IDeviceContext::SetIndexBuffer() in Direct3D11 backend.
100 virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
102 virtual void DILIGENT_CALL_TYPE SetIndexBuffer(IBuffer* pIndexBuffer,
103 Uint32 ByteOffset,
104 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
101105
102106 /// Implementation of IDeviceContext::SetViewports() in Direct3D11 backend.
103 virtual void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight) override final;
107 virtual void DILIGENT_CALL_TYPE SetViewports(Uint32 NumViewports,
108 const Viewport* pViewports,
109 Uint32 RTWidth,
110 Uint32 RTHeight) override final;
104111
105112 /// Implementation of IDeviceContext::SetScissorRects() in Direct3D11 backend.
106 virtual void SetScissorRects(Uint32 NumRects, const Rect* pRects, Uint32 RTWidth, Uint32 RTHeight) override final;
113 virtual void DILIGENT_CALL_TYPE SetScissorRects(Uint32 NumRects,
114 const Rect* pRects,
115 Uint32 RTWidth,
116 Uint32 RTHeight) override final;
107117
108118 /// Implementation of IDeviceContext::SetRenderTargets() in Direct3D11 backend.
109 virtual void SetRenderTargets(Uint32 NumRenderTargets,
110 ITextureView* ppRenderTargets[],
111 ITextureView* pDepthStencil,
112 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
119 virtual void DILIGENT_CALL_TYPE SetRenderTargets(Uint32 NumRenderTargets,
120 ITextureView* ppRenderTargets[],
121 ITextureView* pDepthStencil,
122 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
113123
114124 /// Implementation of IDeviceContext::Draw() in Direct3D11 backend.
115 virtual void Draw(const DrawAttribs& Attribs) override final;
125 virtual void DILIGENT_CALL_TYPE Draw(const DrawAttribs& Attribs) override final;
116126 /// Implementation of IDeviceContext::DrawIndexed() in Direct3D11 backend.
117 virtual void DrawIndexed(const DrawIndexedAttribs& Attribs) override final;
127 virtual void DILIGENT_CALL_TYPE DrawIndexed(const DrawIndexedAttribs& Attribs) override final;
118128 /// Implementation of IDeviceContext::DrawIndirect() in Direct3D11 backend.
119 virtual void DrawIndirect(const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
129 virtual void DILIGENT_CALL_TYPE DrawIndirect(const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
120130 /// Implementation of IDeviceContext::DrawIndexedIndirect() in Direct3D11 backend.
121 virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
131 virtual void DILIGENT_CALL_TYPE DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
122132
123133 /// Implementation of IDeviceContext::DispatchCompute() in Direct3D11 backend.
124 virtual void DispatchCompute(const DispatchComputeAttribs& Attribs) override final;
134 virtual void DILIGENT_CALL_TYPE DispatchCompute(const DispatchComputeAttribs& Attribs) override final;
125135 /// Implementation of IDeviceContext::DispatchComputeIndirect() in Direct3D11 backend.
126 virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
136 virtual void DILIGENT_CALL_TYPE DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
127137
128138 /// Implementation of IDeviceContext::ClearDepthStencil() in Direct3D11 backend.
129 virtual void ClearDepthStencil(ITextureView* pView,
130 CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
131 float fDepth,
132 Uint8 Stencil,
133 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
139 virtual void DILIGENT_CALL_TYPE ClearDepthStencil(ITextureView* pView,
140 CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
141 float fDepth,
142 Uint8 Stencil,
143 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
134144
135145 /// Implementation of IDeviceContext::ClearRenderTarget() in Direct3D11 backend.
136 virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
146 virtual void DILIGENT_CALL_TYPE ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
137147
138148 /// Implementation of IDeviceContext::UpdateBuffer() in Direct3D11 backend.
139 virtual void UpdateBuffer(IBuffer* pBuffer,
140 Uint32 Offset,
141 Uint32 Size,
142 const void* pData,
143 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
149 virtual void DILIGENT_CALL_TYPE UpdateBuffer(IBuffer* pBuffer,
150 Uint32 Offset,
151 Uint32 Size,
152 const void* pData,
153 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
144154
145155 /// Implementation of IDeviceContext::CopyBuffer() in Direct3D11 backend.
146 virtual void CopyBuffer(IBuffer* pSrcBuffer,
147 Uint32 SrcOffset,
148 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
149 IBuffer* pDstBuffer,
150 Uint32 DstOffset,
151 Uint32 Size,
152 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final;
156 virtual void DILIGENT_CALL_TYPE CopyBuffer(IBuffer* pSrcBuffer,
157 Uint32 SrcOffset,
158 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
159 IBuffer* pDstBuffer,
160 Uint32 DstOffset,
161 Uint32 Size,
162 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final;
153163
154164 /// Implementation of IDeviceContext::MapBuffer() in Direct3D11 backend.
155 virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override final;
165 virtual void DILIGENT_CALL_TYPE MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override final;
156166
157167 /// Implementation of IDeviceContext::UnmapBuffer() in Direct3D11 backend.
158 virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final;
168 virtual void DILIGENT_CALL_TYPE UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final;
159169
160170 /// Implementation of IDeviceContext::UpdateTexture() in Direct3D11 backend.
161 virtual void UpdateTexture(ITexture* pTexture,
162 Uint32 MipLevel,
163 Uint32 Slice,
164 const Box& DstBox,
165 const TextureSubResData& SubresData,
166 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
167 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
171 virtual void DILIGENT_CALL_TYPE UpdateTexture(ITexture* pTexture,
172 Uint32 MipLevel,
173 Uint32 Slice,
174 const Box& DstBox,
175 const TextureSubResData& SubresData,
176 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
177 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
168178
169179 /// Implementation of IDeviceContext::CopyTexture() in Direct3D11 backend.
170 virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs) override final;
180 virtual void DILIGENT_CALL_TYPE CopyTexture(const CopyTextureAttribs& CopyAttribs) override final;
171181
172182 /// Implementation of IDeviceContext::MapTextureSubresource() in Direct3D11 backend.
173 virtual void MapTextureSubresource(ITexture* pTexture,
174 Uint32 MipLevel,
175 Uint32 ArraySlice,
176 MAP_TYPE MapType,
177 MAP_FLAGS MapFlags,
178 const Box* pMapRegion,
179 MappedTextureSubresource& MappedData) override final;
183 virtual void DILIGENT_CALL_TYPE MapTextureSubresource(ITexture* pTexture,
184 Uint32 MipLevel,
185 Uint32 ArraySlice,
186 MAP_TYPE MapType,
187 MAP_FLAGS MapFlags,
188 const Box* pMapRegion,
189 MappedTextureSubresource& MappedData) override final;
180190
181191 /// Implementation of IDeviceContext::UnmapTextureSubresource() in Direct3D11 backend.
182 virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final;
192 virtual void DILIGENT_CALL_TYPE UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final;
183193
184194 /// Implementation of IDeviceContext::GenerateMips() in Direct3D11 backend.
185 virtual void GenerateMips(ITextureView* pTextureView) override final;
195 virtual void DILIGENT_CALL_TYPE GenerateMips(ITextureView* pTextureView) override final;
186196
187197 /// Implementation of IDeviceContext::FinishFrame() in Direct3D11 backend.
188 virtual void FinishFrame() override final;
198 virtual void DILIGENT_CALL_TYPE FinishFrame() override final;
189199
190200 /// Implementation of IDeviceContext::TransitionResourceStates() in Direct3D11 backend.
191 virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final;
201 virtual void DILIGENT_CALL_TYPE TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final;
192202
193203 /// Implementation of IDeviceContext::ResolveTextureSubresource() in Direct3D11 backend.
194 virtual void ResolveTextureSubresource(ITexture* pSrcTexture,
195 ITexture* pDstTexture,
196 const ResolveTextureSubresourceAttribs& ResolveAttribs) override final;
204 virtual void DILIGENT_CALL_TYPE ResolveTextureSubresource(ITexture* pSrcTexture,
205 ITexture* pDstTexture,
206 const ResolveTextureSubresourceAttribs& ResolveAttribs) override final;
197207
198208 /// Implementation of IDeviceContext::FinishCommandList() in Direct3D11 backend.
199 void FinishCommandList(class ICommandList** ppCommandList) override final;
209 void DILIGENT_CALL_TYPE FinishCommandList(class ICommandList** ppCommandList) override final;
200210
201211 /// Implementation of IDeviceContext::ExecuteCommandList() in Direct3D11 backend.
202 virtual void ExecuteCommandList(class ICommandList* pCommandList) override final;
212 virtual void DILIGENT_CALL_TYPE ExecuteCommandList(class ICommandList* pCommandList) override final;
203213
204214 /// Implementation of IDeviceContext::SignalFence() in Direct3D11 backend.
205 virtual void SignalFence(IFence* pFence, Uint64 Value) override final;
215 virtual void DILIGENT_CALL_TYPE SignalFence(IFence* pFence, Uint64 Value) override final;
206216
207217 /// Implementation of IDeviceContext::WaitForFence() in Direct3D11 backend.
208 virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final;
218 virtual void DILIGENT_CALL_TYPE WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final;
209219
210220 /// Implementation of IDeviceContext::WaitForIdle() in Direct3D11 backend.
211 virtual void WaitForIdle() override final;
221 virtual void DILIGENT_CALL_TYPE WaitForIdle() override final;
212222
213223 /// Implementation of IDeviceContext::BeginQuery() in Direct3D11 backend.
214 virtual void BeginQuery(IQuery* pQuery) override final;
224 virtual void DILIGENT_CALL_TYPE BeginQuery(IQuery* pQuery) override final;
215225
216226 /// Implementation of IDeviceContext::EndQuery() in Direct3D11 backend.
217 virtual void EndQuery(IQuery* pQuery) override final;
227 virtual void DILIGENT_CALL_TYPE EndQuery(IQuery* pQuery) override final;
218228
219229 /// Implementation of IDeviceContext::Flush() in Direct3D11 backend.
220 virtual void Flush() override final;
230 virtual void DILIGENT_CALL_TYPE Flush() override final;
221231
222232 /// Implementation of IDeviceContextD3D11::GetD3D11DeviceContext().
223 virtual ID3D11DeviceContext* GetD3D11DeviceContext() override final { return m_pd3d11DeviceContext; }
233 virtual ID3D11DeviceContext* DILIGENT_CALL_TYPE GetD3D11DeviceContext() override final { return m_pd3d11DeviceContext; }
224234
225235 void CommitRenderTargets();
226236
5454 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_FenceD3D11, TFenceBase);
5555
5656 /// Implementation of IFence::GetCompletedValue() in Direct3D11 backend.
57 virtual Uint64 GetCompletedValue() override final;
57 virtual Uint64 DILIGENT_CALL_TYPE GetCompletedValue() override final;
5858
5959 /// Implementation of IFence::Reset() in Direct3D11 backend.
60 virtual void Reset(Uint64 Value) override final;
60 virtual void DILIGENT_CALL_TYPE Reset(Uint64 Value) override final;
6161
6262 void AddPendingQuery(CComPtr<ID3D11DeviceContext> pCtx, CComPtr<ID3D11Query> pQuery, Uint64 Value)
6363 {
5252 const PipelineStateDesc& PipelineDesc);
5353 ~PipelineStateD3D11Impl();
5454
55 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
55 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5656
5757 /// Implementation of IPipelineState::BindStaticResources() in Direct3D11 backend.
58 virtual void BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags) override final;
58 virtual void DILIGENT_CALL_TYPE BindStaticResources(Uint32 ShaderFlags,
59 IResourceMapping* pResourceMapping,
60 Uint32 Flags) override final;
5961
6062 /// Implementation of IPipelineState::GetStaticVariableCount() in Direct3D11 backend.
61 virtual Uint32 GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
63 virtual Uint32 DILIGENT_CALL_TYPE GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
6264
6365 /// Implementation of IPipelineState::GetStaticVariableByName() in Direct3D11 backend.
64 virtual IShaderResourceVariable* GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
66 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByName(SHADER_TYPE ShaderType,
67 const Char* Name) override final;
6568
6669 /// Implementation of IPipelineState::GetStaticVariableByIndex() in Direct3D11 backend.
67 virtual IShaderResourceVariable* GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
70 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByIndex(SHADER_TYPE ShaderType,
71 Uint32 Index) override final;
6872
6973 /// Implementation of IPipelineState::CreateShaderResourceBinding() in Direct3D11 backend.
70 virtual void CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding, bool InitStaticResources) override final;
74 virtual void DILIGENT_CALL_TYPE CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding,
75 bool InitStaticResources) override final;
7176
7277 /// Implementation of IPipelineState::IsCompatibleWith() in Direct3D11 backend.
73 virtual bool IsCompatibleWith(const IPipelineState* pPSO) const override final;
78 virtual bool DILIGENT_CALL_TYPE IsCompatibleWith(const IPipelineState* pPSO) const override final;
7479
7580
7681 /// Implementation of IPipelineStateD3D11::GetD3D11BlendState() method.
77 virtual ID3D11BlendState* GetD3D11BlendState() override final;
82 virtual ID3D11BlendState* DILIGENT_CALL_TYPE GetD3D11BlendState() override final;
7883
7984 /// Implementation of IPipelineStateD3D11::GetD3D11RasterizerState() method.
80 virtual ID3D11RasterizerState* GetD3D11RasterizerState() override final;
85 virtual ID3D11RasterizerState* DILIGENT_CALL_TYPE GetD3D11RasterizerState() override final;
8186
8287 /// Implementation of IPipelineStateD3D11::GetD3D11DepthStencilState() method.
83 virtual ID3D11DepthStencilState* GetD3D11DepthStencilState() override final;
88 virtual ID3D11DepthStencilState* DILIGENT_CALL_TYPE GetD3D11DepthStencilState() override final;
8489
8590 /// Implementation of IPipelineStateD3D11::GetD3D11InputLayout() method.
86 virtual ID3D11InputLayout* GetD3D11InputLayout() override final;
91 virtual ID3D11InputLayout* DILIGENT_CALL_TYPE GetD3D11InputLayout() override final;
8792
8893 /// Implementation of IPipelineStateD3D11::GetD3D11VertexShader() method.
89 virtual ID3D11VertexShader* GetD3D11VertexShader() override final;
94 virtual ID3D11VertexShader* DILIGENT_CALL_TYPE GetD3D11VertexShader() override final;
9095
9196 /// Implementation of IPipelineStateD3D11::GetD3D11PixelShader() method.
92 virtual ID3D11PixelShader* GetD3D11PixelShader() override final;
97 virtual ID3D11PixelShader* DILIGENT_CALL_TYPE GetD3D11PixelShader() override final;
9398
9499 /// Implementation of IPipelineStateD3D11::GetD3D11GeometryShader() method.
95 virtual ID3D11GeometryShader* GetD3D11GeometryShader() override final;
100 virtual ID3D11GeometryShader* DILIGENT_CALL_TYPE GetD3D11GeometryShader() override final;
96101
97102 /// Implementation of IPipelineStateD3D11::GetD3D11DomainShader() method.
98 virtual ID3D11DomainShader* GetD3D11DomainShader() override final;
103 virtual ID3D11DomainShader* DILIGENT_CALL_TYPE GetD3D11DomainShader() override final;
99104
100105 /// Implementation of IPipelineStateD3D11::GetD3D11HullShader() method.
101 virtual ID3D11HullShader* GetD3D11HullShader() override final;
106 virtual ID3D11HullShader* DILIGENT_CALL_TYPE GetD3D11HullShader() override final;
102107
103108 /// Implementation of IPipelineStateD3D11::GetD3D11ComputeShader() method.
104 virtual ID3D11ComputeShader* GetD3D11ComputeShader() override final;
109 virtual ID3D11ComputeShader* DILIGENT_CALL_TYPE GetD3D11ComputeShader() override final;
105110
106111
107112 SRBMemoryAllocator& GetSRBMemoryAllocator()
5555 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_QueryD3D11, TQueryBase);
5656
5757 /// Implementation of IQuery::GetData().
58 virtual bool GetData(void* pData, Uint32 DataSize, bool AutoInvalidate) override final;
58 virtual bool DILIGENT_CALL_TYPE GetData(void* pData, Uint32 DataSize, bool AutoInvalidate) override final;
5959
6060 /// Implementation of IQuery::Invalidate().
61 virtual void Invalidate() override final
61 virtual void DILIGENT_CALL_TYPE Invalidate() override final
6262 {
6363 m_DisjointQuery.reset();
6464 TQueryBase::Invalidate();
6565 }
6666
6767 /// Implementation of IQueryD3D11::GetD3D11Query().
68 virtual ID3D11Query* GetD3D11Query() override final
68 virtual ID3D11Query* DILIGENT_CALL_TYPE GetD3D11Query() override final
6969 {
7070 return m_pd3d11Query;
7171 }
4848 const EngineD3D11CreateInfo& EngineAttribs,
4949 ID3D11Device* pd3d11Device,
5050 Uint32 NumDeferredContexts);
51 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
51 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5252
5353 /// Implementation of IRenderDevice::CreateBuffer() in Direct3D11 backend.
54 virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* pBuffData, IBuffer** ppBuffer) override final;
54 virtual void DILIGENT_CALL_TYPE CreateBuffer(const BufferDesc& BuffDesc,
55 const BufferData* pBuffData,
56 IBuffer** ppBuffer) override final;
5557
5658 /// Implementation of IRenderDevice::CreateShader() in Direct3D11 backend.
57 virtual void CreateShader(const ShaderCreateInfo& ShaderCI, IShader** ppShader) override final;
59 virtual void DILIGENT_CALL_TYPE CreateShader(const ShaderCreateInfo& ShaderCI,
60 IShader** ppShader) override final;
5861
5962 /// Implementation of IRenderDevice::CreateTexture() in Direct3D11 backend.
60 virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData* pData, ITexture** ppTexture) override final;
63 virtual void DILIGENT_CALL_TYPE CreateTexture(const TextureDesc& TexDesc,
64 const TextureData* pData,
65 ITexture** ppTexture) override final;
6166
6267 /// Implementation of IRenderDevice::CreateSampler() in Direct3D11 backend.
63 virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler) override final;
68 virtual void DILIGENT_CALL_TYPE CreateSampler(const SamplerDesc& SamplerDesc,
69 ISampler** ppSampler) override final;
6470
6571 /// Implementation of IRenderDevice::CreatePipelineState() in Direct3D11 backend.
66 virtual void CreatePipelineState(const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState) override final;
72 virtual void DILIGENT_CALL_TYPE CreatePipelineState(const PipelineStateDesc& PipelineDesc,
73 IPipelineState** ppPipelineState) override final;
6774
6875 /// Implementation of IRenderDevice::CreateFence() in Direct3D11 backend.
69 virtual void CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
76 virtual void DILIGENT_CALL_TYPE CreateFence(const FenceDesc& Desc,
77 IFence** ppFence) override final;
7078
7179 /// Implementation of IRenderDevice::CreateQuery() in Direct3D11 backend.
72 virtual void CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
80 virtual void DILIGENT_CALL_TYPE CreateQuery(const QueryDesc& Desc,
81 IQuery** ppQuery) override final;
7382
7483 /// Implementation of IRenderDeviceD3D11::GetD3D11Device() in Direct3D11 backend.
75 ID3D11Device* GetD3D11Device() override final { return m_pd3d11Device; }
84 ID3D11Device* DILIGENT_CALL_TYPE GetD3D11Device() override final { return m_pd3d11Device; }
7685
7786 /// Implementation of IRenderDeviceD3D11::CreateBufferFromD3DResource() in Direct3D11 backend.
78 virtual void CreateBufferFromD3DResource(ID3D11Buffer* pd3d11Buffer, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer) override final;
87 virtual void DILIGENT_CALL_TYPE CreateBufferFromD3DResource(ID3D11Buffer* pd3d11Buffer, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer) override final;
7988
8089 /// Implementation of IRenderDeviceD3D11::CreateTextureFromD3DResource() for 1D textures in Direct3D11 backend.
81 virtual void CreateTexture1DFromD3DResource(ID3D11Texture1D* pd3d11Texture, RESOURCE_STATE InitialState, ITexture** ppTexture) override final;
90 virtual void DILIGENT_CALL_TYPE CreateTexture1DFromD3DResource(ID3D11Texture1D* pd3d11Texture,
91 RESOURCE_STATE InitialState,
92 ITexture** ppTexture) override final;
8293
8394 /// Implementation of IRenderDeviceD3D11::CreateTextureFromD3DResource() for 2D textures in Direct3D11 backend.
84 virtual void CreateTexture2DFromD3DResource(ID3D11Texture2D* pd3d11Texture, RESOURCE_STATE InitialState, ITexture** ppTexture) override final;
95 virtual void DILIGENT_CALL_TYPE CreateTexture2DFromD3DResource(ID3D11Texture2D* pd3d11Texture,
96 RESOURCE_STATE InitialState,
97 ITexture** ppTexture) override final;
8598
8699 /// Implementation of IRenderDeviceD3D11::CreateTextureFromD3DResource() for 3D textures in Direct3D11 backend.
87 virtual void CreateTexture3DFromD3DResource(ID3D11Texture3D* pd3d11Texture, RESOURCE_STATE InitialState, ITexture** ppTexture) override final;
100 virtual void DILIGENT_CALL_TYPE CreateTexture3DFromD3DResource(ID3D11Texture3D* pd3d11Texture,
101 RESOURCE_STATE InitialState,
102 ITexture** ppTexture) override final;
88103
89104 /// Implementation of IRenderDevice::ReleaseStaleResources() in Direct3D11 backend.
90 virtual void ReleaseStaleResources(bool ForceRelease = false) override final {}
105 virtual void DILIGENT_CALL_TYPE ReleaseStaleResources(bool ForceRelease = false) override final {}
91106
92107 /// Implementation of IRenderDevice::IdleGPU() in Direct3D11 backend.
93 virtual void IdleGPU() override final;
108 virtual void DILIGENT_CALL_TYPE IdleGPU() override final;
94109
95110 size_t GetCommandQueueCount() const { return 1; }
96111 Uint64 GetCommandQueueMask() const { return Uint64{1}; }
5050 const SamplerDesc& SamplerDesc);
5151 ~SamplerD3D11Impl();
5252
53 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
53 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5454
5555 /// Implementation of ISamplerD3D11::ISamplerD3D11() method.
56 virtual ID3D11SamplerState* GetD3D11SamplerState() override final { return m_pd3dSampler; }
56 virtual ID3D11SamplerState* DILIGENT_CALL_TYPE GetD3D11SamplerState() override final { return m_pd3dSampler; }
5757
5858 private:
5959 /// D3D11 sampler
5656 const ShaderCreateInfo& ShaderCI);
5757 ~ShaderD3D11Impl();
5858
59 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
59 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6060
6161 /// Implementation of IShader::GetResourceCount() in Direct3D11 backend.
62 virtual Uint32 GetResourceCount() const override final
62 virtual Uint32 DILIGENT_CALL_TYPE GetResourceCount() const override final
6363 {
6464 return m_pShaderResources->GetTotalResources();
6565 }
6666
6767 /// Implementation of IShader::GetResource() in Direct3D11 backend.
68 virtual void GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const override final
68 virtual void DILIGENT_CALL_TYPE GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const override final
6969 {
7070 ResourceDesc = m_pShaderResources->GetHLSLShaderResourceDesc(Index);
7171 }
7272
7373 /// Implementation of IShaderD3D::GetHLSLResource() method.
74 virtual void GetHLSLResource(Uint32 Index, HLSLShaderResourceDesc& ResourceDesc) const override final
74 virtual void DILIGENT_CALL_TYPE GetHLSLResource(Uint32 Index, HLSLShaderResourceDesc& ResourceDesc) const override final
7575 {
7676 ResourceDesc = m_pShaderResources->GetHLSLShaderResourceDesc(Index);
7777 }
7878
7979 /// Implementation of IShaderD3D11::GetD3D11Shader() method.
80 virtual ID3D11DeviceChild* GetD3D11Shader() override final
80 virtual ID3D11DeviceChild* DILIGENT_CALL_TYPE GetD3D11Shader() override final
8181 {
8282 return m_pShader;
8383 }
5252 bool IsInternal);
5353 ~ShaderResourceBindingD3D11Impl();
5454
55 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
55 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5656
5757 /// Implementation of IShaderResourceBinding::BindResources() in Direct3D11 backend.
58 virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags) override final;
58 virtual void DILIGENT_CALL_TYPE BindResources(Uint32 ShaderFlags,
59 IResourceMapping* pResMapping,
60 Uint32 Flags) override final;
5961
6062 /// Implementation of IShaderResourceBinding::GetVariableByName() in Direct3D11 backend.
61 virtual IShaderResourceVariable* GetVariableByName(SHADER_TYPE ShaderType, const char* Name) override final;
63 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetVariableByName(SHADER_TYPE ShaderType, const char* Name) override final;
6264
6365 /// Implementation of IShaderResourceBinding::GetVariableCount() in Direct3D11 backend.
64 virtual Uint32 GetVariableCount(SHADER_TYPE ShaderType) const override final;
66 virtual Uint32 DILIGENT_CALL_TYPE GetVariableCount(SHADER_TYPE ShaderType) const override final;
6567
6668 /// Implementation of IShaderResourceBinding::GetVariableByIndex() in Direct3D11 backend.
67 virtual IShaderResourceVariable* GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
69 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
6870
6971 /// Implementation of IShaderResourceBinding::InitializeStaticResources() in Direct3D11 backend.
70 virtual void InitializeStaticResources(const IPipelineState* pPipelineState) override final;
72 virtual void DILIGENT_CALL_TYPE InitializeStaticResources(const IPipelineState* pPipelineState) override final;
7173
7274 ShaderResourceCacheD3D11& GetResourceCache(Uint32 Ind)
7375 {
8383 // Non-virtual function
8484 __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
8585
86 virtual void Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
87
88 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
89 {
90 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
91 for (Uint32 elem = 0; elem < NumElements; ++elem)
92 BindResource(ppObjects[elem], FirstElement + elem);
93 }
94
95 virtual bool IsBound(Uint32 ArrayIndex) const override final
86 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
87
88 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
89 Uint32 FirstElement,
90 Uint32 NumElements) override final
91 {
92 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
93 for (Uint32 elem = 0; elem < NumElements; ++elem)
94 BindResource(ppObjects[elem], FirstElement + elem);
95 }
96
97 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
9698 {
9799 VERIFY_EXPR(ArrayIndex < m_Attribs.BindCount);
98100 return m_ParentResLayout.m_ResourceCache.IsCBBound(m_Attribs.BindPoint + ArrayIndex);
112114 // Non-virtual function
113115 __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
114116
115 virtual void Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
116
117 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
118 {
119 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
120 for (Uint32 elem = 0; elem < NumElements; ++elem)
121 BindResource(ppObjects[elem], FirstElement + elem);
122 }
123
124 virtual bool IsBound(Uint32 ArrayIndex) const override final
117 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
118
119 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
120 Uint32 FirstElement,
121 Uint32 NumElements) override final
122 {
123 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
124 for (Uint32 elem = 0; elem < NumElements; ++elem)
125 BindResource(ppObjects[elem], FirstElement + elem);
126 }
127
128 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
125129 {
126130 VERIFY_EXPR(ArrayIndex < m_Attribs.BindCount);
127131 return m_ParentResLayout.m_ResourceCache.IsSRVBound(m_Attribs.BindPoint + ArrayIndex, true);
145149 // Provide non-virtual function
146150 __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
147151
148 virtual void Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
149
150 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
151 {
152 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
153 for (Uint32 elem = 0; elem < NumElements; ++elem)
154 BindResource(ppObjects[elem], FirstElement + elem);
155 }
156
157 __forceinline virtual bool IsBound(Uint32 ArrayIndex) const override final
152 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
153
154 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
155 Uint32 FirstElement,
156 Uint32 NumElements) override final
157 {
158 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
159 for (Uint32 elem = 0; elem < NumElements; ++elem)
160 BindResource(ppObjects[elem], FirstElement + elem);
161 }
162
163 __forceinline virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
158164 {
159165 VERIFY_EXPR(ArrayIndex < m_Attribs.BindCount);
160166 return m_ParentResLayout.m_ResourceCache.IsUAVBound(m_Attribs.BindPoint + ArrayIndex, true);
172178 // Non-virtual function
173179 __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
174180
175 virtual void Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
176
177 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
178 {
179 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
180 for (Uint32 elem = 0; elem < NumElements; ++elem)
181 BindResource(ppObjects[elem], FirstElement + elem);
182 }
183
184 virtual bool IsBound(Uint32 ArrayIndex) const override final
181 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
182
183 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
184 Uint32 FirstElement,
185 Uint32 NumElements) override final
186 {
187 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
188 for (Uint32 elem = 0; elem < NumElements; ++elem)
189 BindResource(ppObjects[elem], FirstElement + elem);
190 }
191
192 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
185193 {
186194 VERIFY_EXPR(ArrayIndex < m_Attribs.BindCount);
187195 return m_ParentResLayout.m_ResourceCache.IsUAVBound(m_Attribs.BindPoint + ArrayIndex, false);
199207 // Non-virtual function
200208 __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
201209
202 virtual void Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
203
204 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
205 {
206 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
207 for (Uint32 elem = 0; elem < NumElements; ++elem)
208 BindResource(ppObjects[elem], FirstElement + elem);
209 }
210
211 virtual bool IsBound(Uint32 ArrayIndex) const override final
210 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
211
212 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
213 Uint32 FirstElement,
214 Uint32 NumElements) override final
215 {
216 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
217 for (Uint32 elem = 0; elem < NumElements; ++elem)
218 BindResource(ppObjects[elem], FirstElement + elem);
219 }
220
221 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
212222 {
213223 VERIFY_EXPR(ArrayIndex < m_Attribs.BindCount);
214224 return m_ParentResLayout.m_ResourceCache.IsSRVBound(m_Attribs.BindPoint + ArrayIndex, false);
226236 // Non-virtual function
227237 __forceinline void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
228238
229 virtual void Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
230
231 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
232 {
233 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
234 for (Uint32 elem = 0; elem < NumElements; ++elem)
235 BindResource(ppObjects[elem], FirstElement + elem);
236 }
237
238 virtual bool IsBound(Uint32 ArrayIndex) const override final
239 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final { BindResource(pObject, 0); }
240
241 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
242 Uint32 FirstElement,
243 Uint32 NumElements) override final
244 {
245 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.BindCount, FirstElement, NumElements);
246 for (Uint32 elem = 0; elem < NumElements; ++elem)
247 BindResource(ppObjects[elem], FirstElement + elem);
248 }
249
250 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
239251 {
240252 VERIFY_EXPR(ArrayIndex < m_Attribs.BindCount);
241253 return m_ParentResLayout.m_ResourceCache.IsSamplerBound(m_Attribs.BindPoint + ArrayIndex);
4949 void* pNativeWndHandle);
5050 ~SwapChainD3D11Impl();
5151
52 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
52 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5353
5454 /// Implementation of ISwapChain::Present() in Direct3D11 backend.
55 virtual void Present(Uint32 SyncInterval) override final;
55 virtual void DILIGENT_CALL_TYPE Present(Uint32 SyncInterval) override final;
5656
5757 /// Implementation of ISwapChain::Resize() in Direct3D11 backend.
58 virtual void Resize(Uint32 NewWidth, Uint32 NewHeight) override final;
58 virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight) override final;
5959
6060 /// Implementation of ISwapChainD3D11::GetDXGISwapChain() in Direct3D11 backend.
61 virtual IDXGISwapChain* GetDXGISwapChain() override final { return m_pSwapChain; }
61 virtual IDXGISwapChain* DILIGENT_CALL_TYPE GetDXGISwapChain() override final { return m_pSwapChain; }
6262
6363 /// Implementation of ISwapChainD3D11::GetCurrentBackBufferRTV() in Direct3D11 backend.
64 virtual ITextureViewD3D11* GetCurrentBackBufferRTV() override final { return m_pRenderTargetView; }
64 virtual ITextureViewD3D11* DILIGENT_CALL_TYPE GetCurrentBackBufferRTV() override final { return m_pRenderTargetView; }
6565
6666 /// Implementation of ISwapChainD3D11::GetDepthBufferDSV() in Direct3D11 backend.
67 virtual ITextureViewD3D11* GetDepthBufferDSV() override final { return m_pDepthStencilView; }
67 virtual ITextureViewD3D11* DILIGENT_CALL_TYPE GetDepthBufferDSV() override final { return m_pDepthStencilView; }
6868
6969 private:
7070 virtual void UpdateSwapChain(bool CreateNew) override final;
5454 const TextureData* pInitData = nullptr);
5555 ~TextureBaseD3D11();
5656
57 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
57 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5858
5959 /// Implementation of ITextureD3D11::GetD3D11Texture().
60 virtual ID3D11Resource* GetD3D11Texture() override final { return m_pd3d11Texture; }
60 virtual ID3D11Resource* DILIGENT_CALL_TYPE GetD3D11Texture() override final { return m_pd3d11Texture; }
6161
6262 /// Implementation of ITexture::GetNativeHandle().
63 virtual void* GetNativeHandle() override final { return GetD3D11Texture(); }
63 virtual void* DILIGENT_CALL_TYPE GetNativeHandle() override final { return GetD3D11Texture(); }
6464
6565 void AddState(RESOURCE_STATE State)
6666 {
5252 ID3D11View* pD3D11View,
5353 bool bIsDefaultView);
5454
55 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
55 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5656
5757 /// Implementation of ITextureViewD3D11::GetD3D11View().
58 virtual ID3D11View* GetD3D11View() override final
58 virtual ID3D11View* DILIGENT_CALL_TYPE GetD3D11View() override final
5959 {
6060 return m_pD3D11View;
6161 }
5757 TBase{IID_EngineFactoryD3D11}
5858 {}
5959
60 void CreateDeviceAndContextsD3D11(const EngineD3D11CreateInfo& EngineCI,
61 IRenderDevice** ppDevice,
62 IDeviceContext** ppContexts) override final;
63
64 void CreateSwapChainD3D11(IRenderDevice* pDevice,
65 IDeviceContext* pImmediateContext,
66 const SwapChainDesc& SCDesc,
67 const FullScreenModeDesc& FSDesc,
68 void* pNativeWndHandle,
69 ISwapChain** ppSwapChain) override final;
70
71 void AttachToD3D11Device(void* pd3d11NativeDevice,
72 void* pd3d11ImmediateContext,
73 const EngineD3D11CreateInfo& EngineCI,
74 IRenderDevice** ppDevice,
75 IDeviceContext** ppContexts) override final;
60 virtual void DILIGENT_CALL_TYPE CreateDeviceAndContextsD3D11(const EngineD3D11CreateInfo& EngineCI,
61 IRenderDevice** ppDevice,
62 IDeviceContext** ppContexts) override final;
63
64 virtual void DILIGENT_CALL_TYPE CreateSwapChainD3D11(IRenderDevice* pDevice,
65 IDeviceContext* pImmediateContext,
66 const SwapChainDesc& SCDesc,
67 const FullScreenModeDesc& FSDesc,
68 void* pNativeWndHandle,
69 ISwapChain** ppSwapChain) override final;
70
71 virtual void DILIGENT_CALL_TYPE AttachToD3D11Device(void* pd3d11NativeDevice,
72 void* pd3d11ImmediateContext,
73 const EngineD3D11CreateInfo& EngineCI,
74 IRenderDevice** ppDevice,
75 IDeviceContext** ppContexts) override final;
7676 };
7777
7878
6262 ID3D12Resource* pd3d12Buffer);
6363 ~BufferD3D12Impl();
6464
65 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
65 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6666
6767 #ifdef DEVELOPMENT
6868 void DvpVerifyDynamicAllocation(class DeviceContextD3D12Impl* pCtx) const;
6969 #endif
7070
7171 /// Implementation of IBufferD3D12::GetD3D12Buffer().
72 virtual ID3D12Resource* GetD3D12Buffer(Uint64& DataStartByteOffset, IDeviceContext* pContext) override final;
72 virtual ID3D12Resource* DILIGENT_CALL_TYPE GetD3D12Buffer(Uint64& DataStartByteOffset, IDeviceContext* pContext) override final;
7373
7474 /// Implementation of IBuffer::GetNativeHandle().
75 virtual void* GetNativeHandle() override final
75 virtual void* DILIGENT_CALL_TYPE GetNativeHandle() override final
7676 {
7777 VERIFY(GetD3D12Resource() != nullptr, "The buffer is dynamic and has no pointer to D3D12 resource");
7878 Uint64 DataStartByteOffset = 0;
8282 }
8383
8484 /// Implementation of IBufferD3D12::SetD3D12ResourceState().
85 virtual void SetD3D12ResourceState(D3D12_RESOURCE_STATES state) override final;
85 virtual void DILIGENT_CALL_TYPE SetD3D12ResourceState(D3D12_RESOURCE_STATES state) override final;
8686
8787 /// Implementation of IBufferD3D12::GetD3D12ResourceState().
88 virtual D3D12_RESOURCE_STATES GetD3D12ResourceState() const override final;
88 virtual D3D12_RESOURCE_STATES DILIGENT_CALL_TYPE GetD3D12ResourceState() const override final;
8989
9090 __forceinline D3D12_GPU_VIRTUAL_ADDRESS GetGPUAddress(Uint32 ContextId, class DeviceContextD3D12Impl* pCtx)
9191 {
5353 DescriptorHeapAllocation&& HandleAlloc,
5454 bool bIsDefaultView);
5555
56 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
56 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5757
5858 /// Implementation of IBufferViewD3D12::GetCPUDescriptorHandle().
59 virtual D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() override final { return m_DescriptorHandle.GetCpuHandle(); }
59 virtual D3D12_CPU_DESCRIPTOR_HANDLE DILIGENT_CALL_TYPE GetCPUDescriptorHandle() override final
60 {
61 return m_DescriptorHandle.GetCpuHandle();
62 }
6063
6164 protected:
6265 // Allocation in a CPU-only descriptor heap
4545 CommandQueueD3D12Impl(IReferenceCounters* pRefCounters, ID3D12CommandQueue* pd3d12NativeCmdQueue, ID3D12Fence* pd3d12Fence);
4646 ~CommandQueueD3D12Impl();
4747
48 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
48 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
4949
5050 // Implementation of ICommandQueueD3D12::GetNextFenceValue().
51 virtual Uint64 GetNextFenceValue() const override final { return m_NextFenceValue; }
51 virtual Uint64 DILIGENT_CALL_TYPE GetNextFenceValue() const override final { return m_NextFenceValue; }
5252
5353 // Implementation of ICommandQueueD3D12::Submit().
54 virtual Uint64 Submit(ID3D12GraphicsCommandList* commandList) override final;
54 virtual Uint64 DILIGENT_CALL_TYPE Submit(ID3D12GraphicsCommandList* commandList) override final;
5555
5656 // Implementation of ICommandQueueD3D12::GetD3D12CommandQueue().
57 virtual ID3D12CommandQueue* GetD3D12CommandQueue() override final { return m_pd3d12CmdQueue; }
57 virtual ID3D12CommandQueue* DILIGENT_CALL_TYPE GetD3D12CommandQueue() override final { return m_pd3d12CmdQueue; }
5858
5959 // Implementation of ICommandQueueD3D12::WaitForIdle().
60 virtual Uint64 WaitForIdle() override final;
60 virtual Uint64 DILIGENT_CALL_TYPE WaitForIdle() override final;
6161
6262 // Implementation of ICommandQueueD3D12::GetCompletedFenceValue().
63 virtual Uint64 GetCompletedFenceValue() override final;
63 virtual Uint64 DILIGENT_CALL_TYPE GetCompletedFenceValue() override final;
6464
6565 // Implementation of ICommandQueueD3D12::SignalFence().
66 virtual void SignalFence(ID3D12Fence* pFence, Uint64 Value) override final;
66 virtual void DILIGENT_CALL_TYPE SignalFence(ID3D12Fence* pFence, Uint64 Value) override final;
6767
6868 private:
6969 // A value that will be signaled by the command queue next
6868 Uint32 CommandQueueId);
6969 ~DeviceContextD3D12Impl();
7070
71 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
71 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
7272
7373 /// Implementation of IDeviceContext::SetPipelineState() in Direct3D12 backend.
74 virtual void SetPipelineState(IPipelineState* pPipelineState) override final;
74 virtual void DILIGENT_CALL_TYPE SetPipelineState(IPipelineState* pPipelineState) override final;
7575
7676 /// Implementation of IDeviceContext::TransitionShaderResources() in Direct3D12 backend.
77 virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding) override final;
77 virtual void DILIGENT_CALL_TYPE TransitionShaderResources(IPipelineState* pPipelineState,
78 IShaderResourceBinding* pShaderResourceBinding) override final;
7879
7980 /// Implementation of IDeviceContext::CommitShaderResources() in Direct3D12 backend.
80 virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
81 virtual void DILIGENT_CALL_TYPE CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding,
82 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
8183
8284 /// Implementation of IDeviceContext::SetStencilRef() in Direct3D12 backend.
83 virtual void SetStencilRef(Uint32 StencilRef) override final;
85 virtual void DILIGENT_CALL_TYPE SetStencilRef(Uint32 StencilRef) override final;
8486
8587 /// Implementation of IDeviceContext::SetBlendFactors() in Direct3D12 backend.
86 virtual void SetBlendFactors(const float* pBlendFactors = nullptr) override final;
88 virtual void DILIGENT_CALL_TYPE SetBlendFactors(const float* pBlendFactors = nullptr) override final;
8789
8890 /// Implementation of IDeviceContext::SetVertexBuffers() in Direct3D12 backend.
89 virtual void SetVertexBuffers(Uint32 StartSlot,
90 Uint32 NumBuffersSet,
91 IBuffer** ppBuffers,
92 Uint32* pOffsets,
93 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
94 SET_VERTEX_BUFFERS_FLAGS Flags) override final;
91 virtual void DILIGENT_CALL_TYPE SetVertexBuffers(Uint32 StartSlot,
92 Uint32 NumBuffersSet,
93 IBuffer** ppBuffers,
94 Uint32* pOffsets,
95 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
96 SET_VERTEX_BUFFERS_FLAGS Flags) override final;
9597
9698 /// Implementation of IDeviceContext::InvalidateState() in Direct3D12 backend.
97 virtual void InvalidateState() override final;
99 virtual void DILIGENT_CALL_TYPE InvalidateState() override final;
98100
99101 /// Implementation of IDeviceContext::SetIndexBuffer() in Direct3D12 backend.
100 virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
102 virtual void DILIGENT_CALL_TYPE SetIndexBuffer(IBuffer* pIndexBuffer,
103 Uint32 ByteOffset,
104 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
101105
102106 /// Implementation of IDeviceContext::SetViewports() in Direct3D12 backend.
103 virtual void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight) override final;
107 virtual void DILIGENT_CALL_TYPE SetViewports(Uint32 NumViewports,
108 const Viewport* pViewports,
109 Uint32 RTWidth,
110 Uint32 RTHeight) override final;
104111
105112 /// Implementation of IDeviceContext::SetScissorRects() in Direct3D12 backend.
106 virtual void SetScissorRects(Uint32 NumRects, const Rect* pRects, Uint32 RTWidth, Uint32 RTHeight) override final;
113 virtual void DILIGENT_CALL_TYPE SetScissorRects(Uint32 NumRects,
114 const Rect* pRects,
115 Uint32 RTWidth,
116 Uint32 RTHeight) override final;
107117
108118 /// Implementation of IDeviceContext::SetRenderTargets() in Direct3D12 backend.
109 virtual void SetRenderTargets(Uint32 NumRenderTargets,
110 ITextureView* ppRenderTargets[],
111 ITextureView* pDepthStencil,
112 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
119 virtual void DILIGENT_CALL_TYPE SetRenderTargets(Uint32 NumRenderTargets,
120 ITextureView* ppRenderTargets[],
121 ITextureView* pDepthStencil,
122 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
113123
114124 // clang-format off
115125 /// Implementation of IDeviceContext::Draw() in Direct3D12 backend.
116 virtual void Draw (const DrawAttribs& Attribs) override final;
126 virtual void DILIGENT_CALL_TYPE Draw (const DrawAttribs& Attribs) override final;
117127 /// Implementation of IDeviceContext::DrawIndexed() in Direct3D12 backend.
118 virtual void DrawIndexed (const DrawIndexedAttribs& Attribs) override final;
128 virtual void DILIGENT_CALL_TYPE DrawIndexed (const DrawIndexedAttribs& Attribs) override final;
119129 /// Implementation of IDeviceContext::DrawIndirect() in Direct3D12 backend.
120 virtual void DrawIndirect (const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
130 virtual void DILIGENT_CALL_TYPE DrawIndirect (const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
121131 /// Implementation of IDeviceContext::DrawIndexedIndirect() in Direct3D12 backend.
122 virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
132 virtual void DILIGENT_CALL_TYPE DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
123133
124134
125135 /// Implementation of IDeviceContext::DispatchCompute() in Direct3D12 backend.
126 virtual void DispatchCompute (const DispatchComputeAttribs& Attribs) override final;
136 virtual void DILIGENT_CALL_TYPE DispatchCompute (const DispatchComputeAttribs& Attribs) override final;
127137 /// Implementation of IDeviceContext::DispatchComputeIndirect() in Direct3D12 backend.
128 virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
138 virtual void DILIGENT_CALL_TYPE DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
129139 // clang-format on
130140
131141 /// Implementation of IDeviceContext::ClearDepthStencil() in Direct3D12 backend.
132 virtual void ClearDepthStencil(ITextureView* pView,
133 CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
134 float fDepth,
135 Uint8 Stencil,
136 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
142 virtual void DILIGENT_CALL_TYPE ClearDepthStencil(ITextureView* pView,
143 CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
144 float fDepth,
145 Uint8 Stencil,
146 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
137147
138148 /// Implementation of IDeviceContext::ClearRenderTarget() in Direct3D12 backend.
139 virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
149 virtual void DILIGENT_CALL_TYPE ClearRenderTarget(ITextureView* pView,
150 const float* RGBA,
151 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
140152
141153 /// Implementation of IDeviceContext::UpdateBuffer() in Direct3D12 backend.
142 virtual void UpdateBuffer(IBuffer* pBuffer,
143 Uint32 Offset,
144 Uint32 Size,
145 const void* pData,
146 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
154 virtual void DILIGENT_CALL_TYPE UpdateBuffer(IBuffer* pBuffer,
155 Uint32 Offset,
156 Uint32 Size,
157 const void* pData,
158 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
147159
148160 /// Implementation of IDeviceContext::CopyBuffer() in Direct3D12 backend.
149 virtual void CopyBuffer(IBuffer* pSrcBuffer,
150 Uint32 SrcOffset,
151 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
152 IBuffer* pDstBuffer,
153 Uint32 DstOffset,
154 Uint32 Size,
155 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final;
161 virtual void DILIGENT_CALL_TYPE CopyBuffer(IBuffer* pSrcBuffer,
162 Uint32 SrcOffset,
163 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
164 IBuffer* pDstBuffer,
165 Uint32 DstOffset,
166 Uint32 Size,
167 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final;
156168
157169 /// Implementation of IDeviceContext::MapBuffer() in Direct3D12 backend.
158 virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override final;
170 virtual void DILIGENT_CALL_TYPE MapBuffer(IBuffer* pBuffer,
171 MAP_TYPE MapType,
172 MAP_FLAGS MapFlags,
173 PVoid& pMappedData) override final;
159174
160175 /// Implementation of IDeviceContext::UnmapBuffer() in Direct3D12 backend.
161 virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final;
176 virtual void DILIGENT_CALL_TYPE UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final;
162177
163178 /// Implementation of IDeviceContext::UpdateTexture() in Direct3D12 backend.
164 virtual void UpdateTexture(ITexture* pTexture,
165 Uint32 MipLevel,
166 Uint32 Slice,
167 const Box& DstBox,
168 const TextureSubResData& SubresData,
169 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
170 RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode) override final;
179 virtual void DILIGENT_CALL_TYPE UpdateTexture(ITexture* pTexture,
180 Uint32 MipLevel,
181 Uint32 Slice,
182 const Box& DstBox,
183 const TextureSubResData& SubresData,
184 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
185 RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode) override final;
171186
172187 /// Implementation of IDeviceContext::CopyTexture() in Direct3D12 backend.
173 virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs) override final;
188 virtual void DILIGENT_CALL_TYPE CopyTexture(const CopyTextureAttribs& CopyAttribs) override final;
174189
175190 /// Implementation of IDeviceContext::MapTextureSubresource() in Direct3D12 backend.
176 virtual void MapTextureSubresource(ITexture* pTexture,
177 Uint32 MipLevel,
178 Uint32 ArraySlice,
179 MAP_TYPE MapType,
180 MAP_FLAGS MapFlags,
181 const Box* pMapRegion,
182 MappedTextureSubresource& MappedData) override final;
191 virtual void DILIGENT_CALL_TYPE MapTextureSubresource(ITexture* pTexture,
192 Uint32 MipLevel,
193 Uint32 ArraySlice,
194 MAP_TYPE MapType,
195 MAP_FLAGS MapFlags,
196 const Box* pMapRegion,
197 MappedTextureSubresource& MappedData) override final;
183198
184199 /// Implementation of IDeviceContext::UnmapTextureSubresource() in Direct3D12 backend.
185 virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final;
200 virtual void DILIGENT_CALL_TYPE UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final;
186201
187202 /// Implementation of IDeviceContext::FinishFrame() in Direct3D12 backend.
188 virtual void FinishFrame() override final;
203 virtual void DILIGENT_CALL_TYPE FinishFrame() override final;
189204
190205 /// Implementation of IDeviceContext::TransitionResourceStates() in Direct3D12 backend.
191 virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final;
206 virtual void DILIGENT_CALL_TYPE TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final;
192207
193208 /// Implementation of IDeviceContext::ResolveTextureSubresource() in Direct3D12 backend.
194 virtual void ResolveTextureSubresource(ITexture* pSrcTexture,
195 ITexture* pDstTexture,
196 const ResolveTextureSubresourceAttribs& ResolveAttribs) override final;
209 virtual void DILIGENT_CALL_TYPE ResolveTextureSubresource(ITexture* pSrcTexture,
210 ITexture* pDstTexture,
211 const ResolveTextureSubresourceAttribs& ResolveAttribs) override final;
197212
198213 /// Implementation of IDeviceContext::FinishCommandList() in Direct3D12 backend.
199 virtual void FinishCommandList(class ICommandList** ppCommandList) override final;
214 virtual void DILIGENT_CALL_TYPE FinishCommandList(class ICommandList** ppCommandList) override final;
200215
201216 /// Implementation of IDeviceContext::ExecuteCommandList() in Direct3D12 backend.
202 virtual void ExecuteCommandList(class ICommandList* pCommandList) override final;
217 virtual void DILIGENT_CALL_TYPE ExecuteCommandList(class ICommandList* pCommandList) override final;
203218
204219 /// Implementation of IDeviceContext::SignalFence() in Direct3D12 backend.
205 virtual void SignalFence(IFence* pFence, Uint64 Value) override final;
220 virtual void DILIGENT_CALL_TYPE SignalFence(IFence* pFence, Uint64 Value) override final;
206221
207222 /// Implementation of IDeviceContext::WaitForFence() in Direct3D12 backend.
208 virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final;
223 virtual void DILIGENT_CALL_TYPE WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final;
209224
210225 /// Implementation of IDeviceContext::WaitForIdle() in Direct3D12 backend.
211 virtual void WaitForIdle() override final;
226 virtual void DILIGENT_CALL_TYPE WaitForIdle() override final;
212227
213228 /// Implementation of IDeviceContext::BeginQuery() in Direct3D12 backend.
214 virtual void BeginQuery(IQuery* pQuery) override final;
229 virtual void DILIGENT_CALL_TYPE BeginQuery(IQuery* pQuery) override final;
215230
216231 /// Implementation of IDeviceContext::EndQuery() in Direct3D12 backend.
217 virtual void EndQuery(IQuery* pQuery) override final;
232 virtual void DILIGENT_CALL_TYPE EndQuery(IQuery* pQuery) override final;
218233
219234 /// Implementation of IDeviceContext::Flush() in Direct3D12 backend.
220 virtual void Flush() override final;
235 virtual void DILIGENT_CALL_TYPE Flush() override final;
221236
222237 /// Implementation of IDeviceContext::TransitionTextureState() in Direct3D12 backend.
223 virtual void TransitionTextureState(ITexture* pTexture, D3D12_RESOURCE_STATES State) override final;
238 virtual void DILIGENT_CALL_TYPE TransitionTextureState(ITexture* pTexture, D3D12_RESOURCE_STATES State) override final;
224239
225240 /// Implementation of IDeviceContext::TransitionBufferState() in Direct3D12 backend.
226 virtual void TransitionBufferState(IBuffer* pBuffer, D3D12_RESOURCE_STATES State) override final;
241 virtual void DILIGENT_CALL_TYPE TransitionBufferState(IBuffer* pBuffer, D3D12_RESOURCE_STATES State) override final;
227242
228243 /// Implementation of IDeviceContextD3D12::ID3D12GraphicsCommandList() in Direct3D12 backend.
229 virtual ID3D12GraphicsCommandList* GetD3D12CommandList() override final;
244 virtual ID3D12GraphicsCommandList* DILIGENT_CALL_TYPE GetD3D12CommandList() override final;
230245
231246 ///// Number of different shader types (Vertex, Pixel, Geometry, Domain, Hull, Compute)
232247 //static constexpr int NumShaderTypes = 6;
275290 const Box& DstBox,
276291 RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode);
277292
278 virtual void GenerateMips(ITextureView* pTexView) override final;
293 virtual void DILIGENT_CALL_TYPE GenerateMips(ITextureView* pTexView) override final;
279294
280295 D3D12DynamicAllocation AllocateDynamicSpace(size_t NumBytes, size_t Alignment);
281296
5353 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_FenceD3D12, TFenceBase);
5454
5555 /// Implementation of IFence::GetCompletedValue() in Direct3D12 backend.
56 virtual Uint64 GetCompletedValue() override final;
56 virtual Uint64 DILIGENT_CALL_TYPE GetCompletedValue() override final;
5757
5858 /// Implementation of IFence::GetCompletedValue() in Direct3D12 backend.
59 virtual void Reset(Uint64 Value) override final;
59 virtual void DILIGENT_CALL_TYPE Reset(Uint64 Value) override final;
6060
6161 /// Implementation of IFenceD3D12::GetD3D12Fence().
62 ID3D12Fence* GetD3D12Fence() override final { return m_pd3d12Fence; }
62 virtual ID3D12Fence* DILIGENT_CALL_TYPE GetD3D12Fence() override final { return m_pd3d12Fence; }
6363
6464 /// Implementation of IFenceD3D12::WaitForCompletion().
65 virtual void WaitForCompletion(Uint64 Value) override final;
65 virtual void DILIGENT_CALL_TYPE WaitForCompletion(Uint64 Value) override final;
6666
6767 private:
6868 CComPtr<ID3D12Fence> m_pd3d12Fence; ///< D3D12 Fence object
5252 PipelineStateD3D12Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D12Impl* pDeviceD3D12, const PipelineStateDesc& PipelineDesc);
5353 ~PipelineStateD3D12Impl();
5454
55 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
55 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5656
5757 /// Implementation of IPipelineState::BindStaticResources() in Direct3D12 backend.
58 virtual void BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags) override final;
58 virtual void DILIGENT_CALL_TYPE BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags) override final;
5959
6060 /// Implementation of IPipelineState::GetStaticVariableCount() in Direct3D12 backend.
61 virtual Uint32 GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
61 virtual Uint32 DILIGENT_CALL_TYPE GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
6262
6363 /// Implementation of IPipelineState::GetStaticVariableByName() in Direct3D12 backend.
64 virtual IShaderResourceVariable* GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
64 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
6565
6666 /// Implementation of IPipelineState::GetStaticVariableByIndex() in Direct3D12 backend.
67 virtual IShaderResourceVariable* GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
67 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
6868
6969 /// Implementation of IPipelineState::CreateShaderResourceBinding() in Direct3D12 backend.
70 virtual void CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding, bool InitStaticResources) override final;
70 virtual void DILIGENT_CALL_TYPE CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding, bool InitStaticResources) override final;
7171
7272 /// Implementation of IPipelineState::IsCompatibleWith() in Direct3D12 backend.
73 virtual bool IsCompatibleWith(const IPipelineState* pPSO) const override final;
73 virtual bool DILIGENT_CALL_TYPE IsCompatibleWith(const IPipelineState* pPSO) const override final;
7474
7575 /// Implementation of IPipelineStateD3D12::GetD3D12PipelineState().
76 virtual ID3D12PipelineState* GetD3D12PipelineState() const override final { return m_pd3d12PSO; }
76 virtual ID3D12PipelineState* DILIGENT_CALL_TYPE DILIGENT_CALL_TYPE GetD3D12PipelineState() const override final { return m_pd3d12PSO; }
7777
7878 /// Implementation of IPipelineStateD3D12::GetD3D12RootSignature().
79 virtual ID3D12RootSignature* GetD3D12RootSignature() const override final { return m_RootSig.GetD3D12RootSignature(); }
79 virtual ID3D12RootSignature* DILIGENT_CALL_TYPE GetD3D12RootSignature() const override final { return m_RootSig.GetD3D12RootSignature(); }
8080
8181 struct CommitAndTransitionResourcesAttribs
8282 {
5454 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_QueryD3D12, TQueryBase);
5555
5656 /// Implementation of IQuery::GetData().
57 virtual bool GetData(void* pData, Uint32 DataSize, bool AutoInvalidate) override final;
57 virtual bool DILIGENT_CALL_TYPE GetData(void* pData, Uint32 DataSize, bool AutoInvalidate) override final;
5858
5959 /// Implementation of IQueryD3D12::GetD3D12QueryHeap().
60 virtual ID3D12QueryHeap* GetD3D12QueryHeap() override final
60 virtual ID3D12QueryHeap* DILIGENT_CALL_TYPE GetD3D12QueryHeap() override final
6161 {
6262 return m_pDevice->GetQueryManager().GetQueryHeap(m_Desc.Type);
6363 }
6464
6565 /// Implementation of IQueryD3D12::GetQueryHeapIndex().
66 virtual Uint32 GetQueryHeapIndex() const override final
66 virtual Uint32 DILIGENT_CALL_TYPE GetQueryHeapIndex() const override final
6767 {
6868 return m_QueryHeapIndex;
6969 }
5858 ICommandQueueD3D12** ppCmdQueues);
5959 ~RenderDeviceD3D12Impl();
6060
61 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
61 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6262
6363 /// Implementation of IRenderDevice::CreatePipelineState() in Direct3D12 backend.
64 virtual void CreatePipelineState(const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState) override final;
64 virtual void DILIGENT_CALL_TYPE CreatePipelineState(const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState) override final;
6565
6666 /// Implementation of IRenderDevice::CreateBuffer() in Direct3D12 backend.
67 virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* pBuffData, IBuffer** ppBuffer) override final;
67 virtual void DILIGENT_CALL_TYPE CreateBuffer(const BufferDesc& BuffDesc,
68 const BufferData* pBuffData,
69 IBuffer** ppBuffer) override final;
6870
6971 /// Implementation of IRenderDevice::CreateShader() in Direct3D12 backend.
70 virtual void CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader** ppShader) override final;
72 virtual void DILIGENT_CALL_TYPE CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader** ppShader) override final;
7173
7274 /// Implementation of IRenderDevice::CreateTexture() in Direct3D12 backend.
73 virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData* pData, ITexture** ppTexture) override final;
75 virtual void DILIGENT_CALL_TYPE CreateTexture(const TextureDesc& TexDesc,
76 const TextureData* pData,
77 ITexture** ppTexture) override final;
7478
75 void CreateTexture(const TextureDesc& TexDesc, ID3D12Resource* pd3d12Texture, RESOURCE_STATE InitialState, class TextureD3D12Impl** ppTexture);
79 void CreateTexture(const TextureDesc& TexDesc,
80 ID3D12Resource* pd3d12Texture,
81 RESOURCE_STATE InitialState,
82 class TextureD3D12Impl** ppTexture);
7683
7784 /// Implementation of IRenderDevice::CreateSampler() in Direct3D12 backend.
78 virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler) override final;
85 virtual void DILIGENT_CALL_TYPE CreateSampler(const SamplerDesc& SamplerDesc,
86 ISampler** ppSampler) override final;
7987
8088 /// Implementation of IRenderDevice::CreateFence() in Direct3D12 backend.
81 virtual void CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
89 virtual void DILIGENT_CALL_TYPE CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
8290
8391 /// Implementation of IRenderDevice::CreateQuery() in Direct3D12 backend.
84 virtual void CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
92 virtual void DILIGENT_CALL_TYPE CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
8593
8694 /// Implementation of IRenderDeviceD3D12::GetD3D12Device().
87 virtual ID3D12Device* GetD3D12Device() override final { return m_pd3d12Device; }
95 virtual ID3D12Device* DILIGENT_CALL_TYPE GetD3D12Device() override final { return m_pd3d12Device; }
8896
8997 /// Implementation of IRenderDeviceD3D12::CreateTextureFromD3DResource().
90 virtual void CreateTextureFromD3DResource(ID3D12Resource* pd3d12Texture, RESOURCE_STATE InitialState, ITexture** ppTexture) override final;
98 virtual void DILIGENT_CALL_TYPE CreateTextureFromD3DResource(ID3D12Resource* pd3d12Texture,
99 RESOURCE_STATE InitialState,
100 ITexture** ppTexture) override final;
91101
92102 /// Implementation of IRenderDeviceD3D12::CreateBufferFromD3DResource().
93 virtual void CreateBufferFromD3DResource(ID3D12Resource* pd3d12Buffer, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer) override final;
103 virtual void DILIGENT_CALL_TYPE CreateBufferFromD3DResource(ID3D12Resource* pd3d12Buffer,
104 const BufferDesc& BuffDesc,
105 RESOURCE_STATE InitialState,
106 IBuffer** ppBuffer) override final;
94107
95108 DescriptorHeapAllocation AllocateDescriptor(D3D12_DESCRIPTOR_HEAP_TYPE Type, UINT Count = 1);
96109 DescriptorHeapAllocation AllocateGPUDescriptors(D3D12_DESCRIPTOR_HEAP_TYPE Type, UINT Count = 1);
97110
98111 /// Implementation of IRenderDevice::IdleGPU() in Direct3D12 backend.
99 virtual void IdleGPU() override final;
112 virtual void DILIGENT_CALL_TYPE IdleGPU() override final;
100113
101114 using PooledCommandContext = std::unique_ptr<CommandContext, STDDeleterRawMem<CommandContext>>;
102115 PooledCommandContext AllocateCommandContext(const Char* ID = "");
116129 void FlushStaleResources(Uint32 CmdQueueIndex);
117130
118131 /// Implementation of IRenderDevice::() in Direct3D12 backend.
119 virtual void ReleaseStaleResources(bool ForceRelease = false) override final;
132 virtual void DILIGENT_CALL_TYPE ReleaseStaleResources(bool ForceRelease = false) override final;
120133
121134 D3D12DynamicMemoryManager& GetDynamicMemoryManager() { return m_DynamicMemoryManager; }
122135
5151 const SamplerDesc& SamplerDesc);
5252 ~SamplerD3D12Impl();
5353
54 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
54 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5555
5656 /// Implementation of ISamplerD3D12::GetCPUDescriptorHandle().
57 virtual D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() override { return m_Descriptor.GetCpuHandle(); }
57 virtual D3D12_CPU_DESCRIPTOR_HANDLE DILIGENT_CALL_TYPE GetCPUDescriptorHandle() override { return m_Descriptor.GetCpuHandle(); }
5858
5959 private:
6060 friend class ShaderD3D12Impl;
5353 const ShaderCreateInfo& ShaderCI);
5454 ~ShaderD3D12Impl();
5555
56 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
56 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5757
5858 /// Implementation of IShader::GetResourceCount() in Direct3D12 backend.
59 virtual Uint32 GetResourceCount() const override final
59 virtual Uint32 DILIGENT_CALL_TYPE GetResourceCount() const override final
6060 {
6161 return m_pShaderResources->GetTotalResources();
6262 }
6363
6464 /// Implementation of IShader::GetResource() in Direct3D12 backend.
65 virtual void GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const override final
65 virtual void DILIGENT_CALL_TYPE GetResourceDesc(Uint32 Index, ShaderResourceDesc& ResourceDesc) const override final
6666 {
6767 ResourceDesc = m_pShaderResources->GetHLSLShaderResourceDesc(Index);
6868 }
6969
7070 /// Implementation of IShaderD3D::GetHLSLResource() in Direct3D12 backend.
71 virtual void GetHLSLResource(Uint32 Index, HLSLShaderResourceDesc& ResourceDesc) const override final
71 virtual void DILIGENT_CALL_TYPE GetHLSLResource(Uint32 Index, HLSLShaderResourceDesc& ResourceDesc) const override final
7272 {
7373 ResourceDesc = m_pShaderResources->GetHLSLShaderResourceDesc(Index);
7474 }
5252 bool IsPSOInternal);
5353 ~ShaderResourceBindingD3D12Impl();
5454
55 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
55 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5656
57 virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags) override;
57 virtual void DILIGENT_CALL_TYPE BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags) override;
5858
59 virtual IShaderResourceVariable* GetVariableByName(SHADER_TYPE ShaderType, const char* Name) override;
59 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetVariableByName(SHADER_TYPE ShaderType, const char* Name) override;
6060
61 virtual Uint32 GetVariableCount(SHADER_TYPE ShaderType) const override final;
61 virtual Uint32 DILIGENT_CALL_TYPE GetVariableCount(SHADER_TYPE ShaderType) const override final;
6262
63 virtual IShaderResourceVariable* GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
63 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
6464
65 virtual void InitializeStaticResources(const IPipelineState* pPipelineState) override final;
65 virtual void DILIGENT_CALL_TYPE InitializeStaticResources(const IPipelineState* pPipelineState) override final;
6666
6767 ShaderResourceCacheD3D12& GetResourceCache() { return m_ShaderResourceCache; }
6868
141141 ShaderVariableD3D12Impl& operator= (ShaderVariableD3D12Impl&&) = delete;
142142 // clang-format on
143143
144 virtual IReferenceCounters* GetReferenceCounters() const override final
144 virtual IReferenceCounters* DILIGENT_CALL_TYPE GetReferenceCounters() const override final
145145 {
146146 return m_ParentManager.m_Owner.GetReferenceCounters();
147147 }
148148
149 virtual Atomics::Long AddRef() override final
149 virtual Atomics::Long DILIGENT_CALL_TYPE AddRef() override final
150150 {
151151 return m_ParentManager.m_Owner.AddRef();
152152 }
153153
154 virtual Atomics::Long Release() override final
154 virtual Atomics::Long DILIGENT_CALL_TYPE Release() override final
155155 {
156156 return m_ParentManager.m_Owner.Release();
157157 }
158158
159 void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
159 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final
160160 {
161161 if (ppInterface == nullptr)
162162 return;
169169 }
170170 }
171171
172 virtual SHADER_RESOURCE_VARIABLE_TYPE GetType() const override final
172 virtual SHADER_RESOURCE_VARIABLE_TYPE DILIGENT_CALL_TYPE GetType() const override final
173173 {
174174 return m_Resource.GetVariableType();
175175 }
176176
177 virtual void Set(IDeviceObject* pObject) override final
177 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final
178178 {
179179 m_Resource.BindResource(pObject, 0, m_ParentManager.m_ResourceCache);
180180 }
181181
182 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
182 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
183183 {
184184 VerifyAndCorrectSetArrayArguments(m_Resource.Attribs.Name, m_Resource.Attribs.BindCount, FirstElement, NumElements);
185185 for (Uint32 Elem = 0; Elem < NumElements; ++Elem)
186186 m_Resource.BindResource(ppObjects[Elem], FirstElement + Elem, m_ParentManager.m_ResourceCache);
187187 }
188188
189 virtual void GetResourceDesc(ShaderResourceDesc& ResourceDesc) const override final
189 virtual void DILIGENT_CALL_TYPE GetResourceDesc(ShaderResourceDesc& ResourceDesc) const override final
190190 {
191191 ResourceDesc = GetHLSLResourceDesc();
192192 }
193193
194 virtual HLSLShaderResourceDesc GetHLSLResourceDesc() const override final
194 virtual HLSLShaderResourceDesc DILIGENT_CALL_TYPE GetHLSLResourceDesc() const override final
195195 {
196196 return m_Resource.Attribs.GetHLSLResourceDesc();
197197 }
198198
199 virtual Uint32 GetIndex() const override final
199 virtual Uint32 DILIGENT_CALL_TYPE GetIndex() const override final
200200 {
201201 return m_ParentManager.GetVariableIndex(*this);
202202 }
203203
204 virtual bool IsBound(Uint32 ArrayIndex) const override final
204 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
205205 {
206206 return m_Resource.IsBound(ArrayIndex, m_ParentManager.m_ResourceCache);
207207 }
5050 void* pNativeWndHandle);
5151 ~SwapChainD3D12Impl();
5252
53 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
53 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5454
5555 /// Implementation of ISwapChain::Present() in Direct3D12 backend.
56 virtual void Present(Uint32 SyncInterval) override final;
56 virtual void DILIGENT_CALL_TYPE Present(Uint32 SyncInterval) override final;
5757
5858 /// Implementation of ISwapChain::Resize() in Direct3D12 backend.
59 virtual void Resize(Uint32 NewWidth, Uint32 NewHeight) override final;
59 virtual void DILIGENT_CALL_TYPE Resize(Uint32 NewWidth, Uint32 NewHeight) override final;
6060
6161 /// Implementation of ISwapChainD3D12::GetDXGISwapChain().
62 virtual IDXGISwapChain* GetDXGISwapChain() override final { return m_pSwapChain; }
62 virtual IDXGISwapChain* DILIGENT_CALL_TYPE GetDXGISwapChain() override final { return m_pSwapChain; }
6363
6464 /// Implementation of ISwapChain::GetCurrentBackBufferRTV() in Direct3D12 backend.
65 virtual ITextureViewD3D12* GetCurrentBackBufferRTV() override final
65 virtual ITextureViewD3D12* DILIGENT_CALL_TYPE GetCurrentBackBufferRTV() override final
6666 {
6767 auto CurrentBackBufferIndex = m_pSwapChain->GetCurrentBackBufferIndex();
6868 VERIFY_EXPR(CurrentBackBufferIndex >= 0 && CurrentBackBufferIndex < m_SwapChainDesc.BufferCount);
7070 }
7171
7272 /// Implementation of ISwapChain::GetDepthBufferDSV() in Direct3D12 backend.
73 virtual ITextureViewD3D12* GetDepthBufferDSV() override final { return m_pDepthBufferDSV; }
73 virtual ITextureViewD3D12* DILIGENT_CALL_TYPE GetDepthBufferDSV() override final { return m_pDepthBufferDSV; }
7474
7575 private:
7676 virtual void UpdateSwapChain(bool CreateNew) override final;
6464 ID3D12Resource* pTexture);
6565 ~TextureD3D12Impl();
6666
67 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
67 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6868
6969 /// Implementation of ITextureD3D12::GetD3D12Texture().
70 virtual ID3D12Resource* GetD3D12Texture() override final { return GetD3D12Resource(); }
70 virtual ID3D12Resource* DILIGENT_CALL_TYPE GetD3D12Texture() override final { return GetD3D12Resource(); }
7171
7272 /// Implementation of ITexture::GetNativeHandle() in Direct3D12 backend.
73 virtual void* GetNativeHandle() override final { return GetD3D12Texture(); }
73 virtual void* DILIGENT_CALL_TYPE GetNativeHandle() override final { return GetD3D12Texture(); }
7474
7575 /// Implementation of ITextureD3D12::SetD3D12ResourceState().
76 virtual void SetD3D12ResourceState(D3D12_RESOURCE_STATES state) override final;
76 virtual void DILIGENT_CALL_TYPE SetD3D12ResourceState(D3D12_RESOURCE_STATES state) override final;
7777
7878 /// Implementation of ITextureD3D12::GetD3D12ResourceState().
79 virtual D3D12_RESOURCE_STATES GetD3D12ResourceState() const override final;
79 virtual D3D12_RESOURCE_STATES DILIGENT_CALL_TYPE GetD3D12ResourceState() const override final;
8080
8181 D3D12_RESOURCE_DESC GetD3D12TextureDesc() const;
8282
5656 bool bIsDefaultView);
5757 ~TextureViewD3D12Impl();
5858
59 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
59 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6060
6161 /// Implementation of ITextureViewD3D12::GetCPUDescriptorHandle().
62 virtual D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() override final
62 virtual D3D12_CPU_DESCRIPTOR_HANDLE DILIGENT_CALL_TYPE GetCPUDescriptorHandle() override final
6363 {
6464 return m_Descriptor.GetCpuHandle();
6565 }
6767 TBase{IID_EngineFactoryD3D12}
6868 {}
6969
70 bool LoadD3D12(const char* DllName) override final;
71
72 void CreateDeviceAndContextsD3D12(const EngineD3D12CreateInfo& EngineCI,
73 IRenderDevice** ppDevice,
74 IDeviceContext** ppContexts) override final;
75
76 void AttachToD3D12Device(void* pd3d12NativeDevice,
77 size_t CommandQueueCount,
78 ICommandQueueD3D12** ppCommandQueues,
79 const EngineD3D12CreateInfo& EngineCI,
80 IRenderDevice** ppDevice,
81 IDeviceContext** ppContexts) override final;
82
83 void CreateSwapChainD3D12(IRenderDevice* pDevice,
84 IDeviceContext* pImmediateContext,
85 const SwapChainDesc& SwapChainDesc,
86 const FullScreenModeDesc& FSDesc,
87 void* pNativeWndHandle,
88 ISwapChain** ppSwapChain) override final;
89
90 virtual void EnumerateAdapters(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
91 Uint32& NumAdapters,
92 AdapterAttribs* Adapters) override final;
93
94 virtual void EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
95 Uint32 AdapterId,
96 Uint32 OutputId,
97 TEXTURE_FORMAT Format,
98 Uint32& NumDisplayModes,
99 DisplayModeAttribs* DisplayModes) override final;
70 bool DILIGENT_CALL_TYPE LoadD3D12(const char* DllName) override final;
71
72 virtual void DILIGENT_CALL_TYPE CreateDeviceAndContextsD3D12(const EngineD3D12CreateInfo& EngineCI,
73 IRenderDevice** ppDevice,
74 IDeviceContext** ppContexts) override final;
75
76 virtual void DILIGENT_CALL_TYPE AttachToD3D12Device(void* pd3d12NativeDevice,
77 size_t CommandQueueCount,
78 ICommandQueueD3D12** ppCommandQueues,
79 const EngineD3D12CreateInfo& EngineCI,
80 IRenderDevice** ppDevice,
81 IDeviceContext** ppContexts) override final;
82
83 virtual void DILIGENT_CALL_TYPE CreateSwapChainD3D12(IRenderDevice* pDevice,
84 IDeviceContext* pImmediateContext,
85 const SwapChainDesc& SwapChainDesc,
86 const FullScreenModeDesc& FSDesc,
87 void* pNativeWndHandle,
88 ISwapChain** ppSwapChain) override final;
89
90 virtual void DILIGENT_CALL_TYPE EnumerateAdapters(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
91 Uint32& NumAdapters,
92 AdapterAttribs* Adapters) override final;
93
94 virtual void DILIGENT_CALL_TYPE EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
95 Uint32 AdapterId,
96 Uint32 OutputId,
97 TEXTURE_FORMAT Format,
98 Uint32& NumDisplayModes,
99 DisplayModeAttribs* DisplayModes) override final;
100100
101101
102102 private:
4646 {}
4747
4848
49 virtual void EnumerateAdapters(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
50 Uint32& NumAdapters,
51 AdapterAttribs* Adapters) override
49 virtual void DILIGENT_CALL_TYPE EnumerateAdapters(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
50 Uint32& NumAdapters,
51 AdapterAttribs* Adapters) override
5252 {
5353 auto DXGIAdapters = FindCompatibleAdapters(MinFeatureLevel);
5454
8585 }
8686
8787
88 virtual void EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
89 Uint32 AdapterId,
90 Uint32 OutputId,
91 TEXTURE_FORMAT Format,
92 Uint32& NumDisplayModes,
93 DisplayModeAttribs* DisplayModes) override
88 virtual void DILIGENT_CALL_TYPE EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFeatureLevel,
89 Uint32 AdapterId,
90 Uint32 OutputId,
91 TEXTURE_FORMAT Format,
92 Uint32& NumDisplayModes,
93 DisplayModeAttribs* DisplayModes) override
9494 {
9595 auto DXGIAdapters = FindCompatibleAdapters(MinFeatureLevel);
9696 if (AdapterId >= DXGIAdapters.size())
5959 {
6060 }
6161
62 virtual SHADER_RESOURCE_VARIABLE_TYPE GetType() const override final
62 virtual SHADER_RESOURCE_VARIABLE_TYPE DILIGENT_CALL_TYPE GetType() const override final
6363 {
6464 return m_VariableType;
6565 }
6666
67 virtual void GetResourceDesc(ShaderResourceDesc& ResourceDesc) const override final
67 virtual void DILIGENT_CALL_TYPE GetResourceDesc(ShaderResourceDesc& ResourceDesc) const override final
6868 {
6969 ResourceDesc = GetHLSLResourceDesc();
7070 }
7171
72 virtual HLSLShaderResourceDesc GetHLSLResourceDesc() const override final
72 virtual HLSLShaderResourceDesc DILIGENT_CALL_TYPE GetHLSLResourceDesc() const override final
7373 {
7474 return m_Attribs.GetHLSLResourceDesc();
7575 }
7676
77 virtual Uint32 GetIndex() const override final
77 virtual Uint32 DILIGENT_CALL_TYPE GetIndex() const override final
7878 {
7979 return m_ParentResLayout.GetVariableIndex(*this);
8080 }
208208 pSwapChain1->QueryInterface(__uuidof(m_pSwapChain), reinterpret_cast<void**>(static_cast<DXGISwapChainType**>(&m_pSwapChain)));
209209 }
210210
211 virtual void SetFullscreenMode(const DisplayModeAttribs& DisplayMode) override final
211 virtual void DILIGENT_CALL_TYPE SetFullscreenMode(const DisplayModeAttribs& DisplayMode) override final
212212 {
213213 if (m_pSwapChain)
214214 {
230230 }
231231 }
232232
233 virtual void SetWindowedMode() override final
233 virtual void DILIGENT_CALL_TYPE SetWindowedMode() override final
234234 {
235235 if (m_FSDesc.Fullscreen)
236236 {
4141 {
4242 public:
4343 /// Returns HLSL ShaderResourceVariable resource description
44 virtual HLSLShaderResourceDesc GetHLSLResourceDesc() const = 0;
44 virtual HLSLShaderResourceDesc DILIGENT_CALL_TYPE GetHLSLResourceDesc() const = 0;
4545 };
4646
4747 } // namespace Diligent
6767 {
6868 }
6969
70 virtual ICommandQueueType* LockCommandQueue() override final
70 virtual ICommandQueueType* DILIGENT_CALL_TYPE LockCommandQueue() override final
7171 {
7272 if (this->m_bIsDeferred)
7373 {
7777 return this->m_pDevice->LockCommandQueue(m_CommandQueueId);
7878 }
7979
80 virtual void UnlockCommandQueue() override final
80 virtual void DILIGENT_CALL_TYPE UnlockCommandQueue() override final
8181 {
8282 if (this->m_bIsDeferred)
8383 {
233233 return m_CommandQueues[QueueIndex].ReleaseQueue;
234234 }
235235
236 const CommandQueueType& GetCommandQueue(Uint32 QueueIndex) const
236 const CommandQueueType& DILIGENT_CALL_TYPE GetCommandQueue(Uint32 QueueIndex) const
237237 {
238238 VERIFY_EXPR(QueueIndex < m_CmdQueueCount);
239239 return *m_CommandQueues[QueueIndex].CmdQueue;
240240 }
241241
242 virtual Uint64 GetCompletedFenceValue(Uint32 QueueIndex) override final
242 virtual Uint64 DILIGENT_CALL_TYPE GetCompletedFenceValue(Uint32 QueueIndex) override final
243243 {
244244 return m_CommandQueues[QueueIndex].CmdQueue->GetCompletedFenceValue();
245245 }
246246
247 virtual Uint64 GetNextFenceValue(Uint32 QueueIndex) override final
247 virtual Uint64 DILIGENT_CALL_TYPE GetNextFenceValue(Uint32 QueueIndex) override final
248248 {
249249 return m_CommandQueues[QueueIndex].CmdQueue->GetNextFenceValue();
250250 }
251251
252 virtual Bool IsFenceSignaled(Uint32 QueueIndex, Uint64 FenceValue) override final
252 virtual Bool DILIGENT_CALL_TYPE IsFenceSignaled(Uint32 QueueIndex, Uint64 FenceValue) override final
253253 {
254254 return FenceValue <= GetCompletedFenceValue(QueueIndex);
255255 }
6565 ~BufferGLImpl();
6666
6767 /// Queries the specific interface, see IObject::QueryInterface() for details
68 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
68 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
6969
7070 void UpdateData(GLContextState& CtxState, Uint32 Offset, Uint32 Size, const void* pData);
7171 void CopyData(GLContextState& CtxState, BufferGLImpl& SrcBufferGL, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size);
7878 const GLObjectWrappers::GLBufferObj& GetGLHandle() { return m_GlBuffer; }
7979
8080 /// Implementation of IBufferGL::GetGLBufferHandle().
81 virtual GLuint GetGLBufferHandle() override final { return GetGLHandle(); }
81 virtual GLuint DILIGENT_CALL_TYPE GetGLBufferHandle() override final { return GetGLHandle(); }
8282
8383 /// Implementation of IBuffer::GetNativeHandle() in OpenGL backend.
84 virtual void* GetNativeHandle() override final { return reinterpret_cast<void*>(static_cast<size_t>(GetGLBufferHandle())); }
84 virtual void* DILIGENT_CALL_TYPE GetNativeHandle() override final
85 {
86 return reinterpret_cast<void*>(static_cast<size_t>(GetGLBufferHandle()));
87 }
8588
8689 private:
8790 virtual void CreateViewInternal(const struct BufferViewDesc& ViewDesc, IBufferView** ppView, bool bIsDefaultView) override;
5050 bool bIsDefaultView);
5151
5252 /// Queries the specific interface, see IObject::QueryInterface() for details
53 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
53 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5454
5555 const GLObjectWrappers::GLTextureObj& GetTexBufferHandle() { return m_GLTexBuffer; }
5656
5757 DeviceContextGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDeviceGL, bool bIsDeferred);
5858
5959 /// Queries the specific interface, see IObject::QueryInterface() for details.
60 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
60 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
6161
6262 /// Implementation of IDeviceContext::SetPipelineState() in OpenGL backend.
63 virtual void SetPipelineState(IPipelineState* pPipelineState) override final;
63 virtual void DILIGENT_CALL_TYPE SetPipelineState(IPipelineState* pPipelineState) override final;
6464
6565 /// Implementation of IDeviceContext::TransitionShaderResources() in OpenGL backend.
66 virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding) override final;
66 virtual void DILIGENT_CALL_TYPE TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding) override final;
6767
6868 /// Implementation of IDeviceContext::CommitShaderResources() in OpenGL backend.
69 virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
69 virtual void DILIGENT_CALL_TYPE CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding,
70 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
7071
7172 /// Implementation of IDeviceContext::SetStencilRef() in OpenGL backend.
72 virtual void SetStencilRef(Uint32 StencilRef) override final;
73 virtual void DILIGENT_CALL_TYPE SetStencilRef(Uint32 StencilRef) override final;
7374
7475 /// Implementation of IDeviceContext::SetBlendFactors() in OpenGL backend.
75 virtual void SetBlendFactors(const float* pBlendFactors = nullptr) override final;
76 virtual void DILIGENT_CALL_TYPE SetBlendFactors(const float* pBlendFactors = nullptr) override final;
7677
7778 /// Implementation of IDeviceContext::SetVertexBuffers() in OpenGL backend.
78 virtual void SetVertexBuffers(Uint32 StartSlot,
79 Uint32 NumBuffersSet,
80 IBuffer** ppBuffers,
81 Uint32* pOffsets,
82 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
83 SET_VERTEX_BUFFERS_FLAGS Flags) override final;
79 virtual void DILIGENT_CALL_TYPE SetVertexBuffers(Uint32 StartSlot,
80 Uint32 NumBuffersSet,
81 IBuffer** ppBuffers,
82 Uint32* pOffsets,
83 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
84 SET_VERTEX_BUFFERS_FLAGS Flags) override final;
8485
8586 /// Implementation of IDeviceContext::InvalidateState() in OpenGL backend.
86 virtual void InvalidateState() override final;
87 virtual void DILIGENT_CALL_TYPE InvalidateState() override final;
8788
8889 /// Implementation of IDeviceContext::SetIndexBuffer() in OpenGL backend.
89 virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
90 virtual void DILIGENT_CALL_TYPE SetIndexBuffer(IBuffer* pIndexBuffer,
91 Uint32 ByteOffset,
92 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
9093
9194 /// Implementation of IDeviceContext::SetViewports() in OpenGL backend.
92 virtual void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight) override final;
95 virtual void DILIGENT_CALL_TYPE SetViewports(Uint32 NumViewports,
96 const Viewport* pViewports,
97 Uint32 RTWidth,
98 Uint32 RTHeight) override final;
9399
94100 /// Implementation of IDeviceContext::SetScissorRects() in OpenGL backend.
95 virtual void SetScissorRects(Uint32 NumRects, const Rect* pRects, Uint32 RTWidth, Uint32 RTHeight) override final;
101 virtual void DILIGENT_CALL_TYPE SetScissorRects(Uint32 NumRects,
102 const Rect* pRects,
103 Uint32 RTWidth,
104 Uint32 RTHeight) override final;
96105
97106 /// Implementation of IDeviceContext::SetRenderTargets() in OpenGL backend.
98 virtual void SetRenderTargets(Uint32 NumRenderTargets,
99 ITextureView* ppRenderTargets[],
100 ITextureView* pDepthStencil,
101 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
107 virtual void DILIGENT_CALL_TYPE SetRenderTargets(Uint32 NumRenderTargets,
108 ITextureView* ppRenderTargets[],
109 ITextureView* pDepthStencil,
110 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
102111
103112 // clang-format off
104113
105114 /// Implementation of IDeviceContext::Draw() in OpenGL backend.
106 virtual void Draw (const DrawAttribs& Attribs) override final;
115 virtual void DILIGENT_CALL_TYPE Draw (const DrawAttribs& Attribs) override final;
107116 /// Implementation of IDeviceContext::DrawIndexed() in OpenGL backend.
108 virtual void DrawIndexed (const DrawIndexedAttribs& Attribs) override final;
117 virtual void DILIGENT_CALL_TYPE DrawIndexed (const DrawIndexedAttribs& Attribs) override final;
109118 /// Implementation of IDeviceContext::DrawIndirect() in OpenGL backend.
110 virtual void DrawIndirect (const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
119 virtual void DILIGENT_CALL_TYPE DrawIndirect (const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
111120 /// Implementation of IDeviceContext::DrawIndexedIndirect() in OpenGL backend.
112 virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
121 virtual void DILIGENT_CALL_TYPE DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
113122
114123 /// Implementation of IDeviceContext::DispatchCompute() in OpenGL backend.
115 virtual void DispatchCompute (const DispatchComputeAttribs& Attribs) override final;
124 virtual void DILIGENT_CALL_TYPE DispatchCompute (const DispatchComputeAttribs& Attribs) override final;
116125 /// Implementation of IDeviceContext::DispatchComputeIndirect() in OpenGL backend.
117 virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
126 virtual void DILIGENT_CALL_TYPE DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final;
118127
119128 // clang-format on
120129
121130 /// Implementation of IDeviceContext::ClearDepthStencil() in OpenGL backend.
122 virtual void ClearDepthStencil(ITextureView* pView,
123 CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
124 float fDepth,
125 Uint8 Stencil,
126 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
131 virtual void DILIGENT_CALL_TYPE ClearDepthStencil(ITextureView* pView,
132 CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
133 float fDepth,
134 Uint8 Stencil,
135 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
127136
128137 /// Implementation of IDeviceContext::ClearRenderTarget() in OpenGL backend.
129 virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
138 virtual void DILIGENT_CALL_TYPE ClearRenderTarget(ITextureView* pView,
139 const float* RGBA,
140 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
130141
131142 /// Implementation of IDeviceContext::UpdateBuffer() in OpenGL backend.
132 virtual void UpdateBuffer(IBuffer* pBuffer,
133 Uint32 Offset,
134 Uint32 Size,
135 const void* pData,
136 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
143 virtual void DILIGENT_CALL_TYPE UpdateBuffer(IBuffer* pBuffer,
144 Uint32 Offset,
145 Uint32 Size,
146 const void* pData,
147 RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final;
137148
138149 /// Implementation of IDeviceContext::CopyBuffer() in OpenGL backend.
139 virtual void CopyBuffer(IBuffer* pSrcBuffer,
140 Uint32 SrcOffset,
141 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
142 IBuffer* pDstBuffer,
143 Uint32 DstOffset,
144 Uint32 Size,
145 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final;
150 virtual void DILIGENT_CALL_TYPE CopyBuffer(IBuffer* pSrcBuffer,
151 Uint32 SrcOffset,
152 RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
153 IBuffer* pDstBuffer,
154 Uint32 DstOffset,
155 Uint32 Size,
156 RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final;
146157
147158 /// Implementation of IDeviceContext::MapBuffer() in OpenGL backend.
148 virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override final;
159 virtual void DILIGENT_CALL_TYPE MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override final;
149160
150161 /// Implementation of IDeviceContext::UnmapBuffer() in OpenGL backend.
151 virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final;
162 virtual void DILIGENT_CALL_TYPE UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final;
152163
153164 /// Implementation of IDeviceContext::UpdateTexture() in OpenGL backend.
154 virtual void UpdateTexture(ITexture* pTexture,
155 Uint32 MipLevel,
156 Uint32 Slice,
157 const Box& DstBox,
158 const TextureSubResData& SubresData,
159 RESOURCE_STATE_TRANSITION_MODE SrcBufferStateTransitionMode,
160 RESOURCE_STATE_TRANSITION_MODE TextureStateTransitionMode) override final;
165 virtual void DILIGENT_CALL_TYPE UpdateTexture(ITexture* pTexture,
166 Uint32 MipLevel,
167 Uint32 Slice,
168 const Box& DstBox,
169 const TextureSubResData& SubresData,
170 RESOURCE_STATE_TRANSITION_MODE SrcBufferStateTransitionMode,
171 RESOURCE_STATE_TRANSITION_MODE TextureStateTransitionMode) override final;
161172
162173 /// Implementation of IDeviceContext::CopyTexture() in OpenGL backend.
163 virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs) override final;
174 virtual void DILIGENT_CALL_TYPE CopyTexture(const CopyTextureAttribs& CopyAttribs) override final;
164175
165176 /// Implementation of IDeviceContext::MapTextureSubresource() in OpenGL backend.
166 virtual void MapTextureSubresource(ITexture* pTexture,
167 Uint32 MipLevel,
168 Uint32 ArraySlice,
169 MAP_TYPE MapType,
170 MAP_FLAGS MapFlags,
171 const Box* pMapRegion,
172 MappedTextureSubresource& MappedData) override final;
177 virtual void DILIGENT_CALL_TYPE MapTextureSubresource(ITexture* pTexture,
178 Uint32 MipLevel,
179 Uint32 ArraySlice,
180 MAP_TYPE MapType,
181 MAP_FLAGS MapFlags,
182 const Box* pMapRegion,
183 MappedTextureSubresource& MappedData) override final;
173184
174185 /// Implementation of IDeviceContext::UnmapTextureSubresource() in OpenGL backend.
175 virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final;
186 virtual void DILIGENT_CALL_TYPE UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final;
176187
177188 /// Implementation of IDeviceContext::GenerateMips() in OpenGL backend.
178 virtual void GenerateMips(ITextureView* pTexView) override;
189 virtual void DILIGENT_CALL_TYPE GenerateMips(ITextureView* pTexView) override;
179190
180191 /// Implementation of IDeviceContext::FinishFrame() in OpenGL backend.
181 virtual void FinishFrame() override final;
192 virtual void DILIGENT_CALL_TYPE FinishFrame() override final;
182193
183194 /// Implementation of IDeviceContext::TransitionResourceStates() in OpenGL backend.
184 virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final;
195 virtual void DILIGENT_CALL_TYPE TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final;
185196
186197 /// Implementation of IDeviceContext::ResolveTextureSubresource() in OpenGL backend.
187 virtual void ResolveTextureSubresource(ITexture* pSrcTexture,
188 ITexture* pDstTexture,
189 const ResolveTextureSubresourceAttribs& ResolveAttribs) override final;
198 virtual void DILIGENT_CALL_TYPE ResolveTextureSubresource(ITexture* pSrcTexture,
199 ITexture* pDstTexture,
200 const ResolveTextureSubresourceAttribs& ResolveAttribs) override final;
190201
191202 /// Implementation of IDeviceContext::FinishCommandList() in OpenGL backend.
192 virtual void FinishCommandList(class ICommandList** ppCommandList) override final;
203 virtual void DILIGENT_CALL_TYPE FinishCommandList(class ICommandList** ppCommandList) override final;
193204
194205 /// Implementation of IDeviceContext::ExecuteCommandList() in OpenGL backend.
195 virtual void ExecuteCommandList(class ICommandList* pCommandList) override final;
206 virtual void DILIGENT_CALL_TYPE ExecuteCommandList(class ICommandList* pCommandList) override final;
196207
197208 /// Implementation of IDeviceContext::SignalFence() in OpenGL backend.
198 virtual void SignalFence(IFence* pFence, Uint64 Value) override final;
209 virtual void DILIGENT_CALL_TYPE SignalFence(IFence* pFence, Uint64 Value) override final;
199210
200211 /// Implementation of IDeviceContext::WaitForFence() in OpenGL backend.
201 virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final;
212 virtual void DILIGENT_CALL_TYPE WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final;
202213
203214 /// Implementation of IDeviceContext::WaitForIdle() in OpenGL backend.
204 virtual void WaitForIdle() override final;
215 virtual void DILIGENT_CALL_TYPE WaitForIdle() override final;
205216
206217 /// Implementation of IDeviceContext::BeginQuery() in OpenGL backend.
207 virtual void BeginQuery(IQuery* pQuery) override final;
218 virtual void DILIGENT_CALL_TYPE BeginQuery(IQuery* pQuery) override final;
208219
209220 /// Implementation of IDeviceContext::EndQuery() in OpenGL backend.
210 virtual void EndQuery(IQuery* pQuery) override final;
221 virtual void DILIGENT_CALL_TYPE EndQuery(IQuery* pQuery) override final;
211222
212223 /// Implementation of IDeviceContext::Flush() in OpenGL backend.
213 virtual void Flush() override final;
224 virtual void DILIGENT_CALL_TYPE Flush() override final;
214225
215226 /// Implementation of IDeviceContextGL::UpdateCurrentGLContext().
216 virtual bool UpdateCurrentGLContext() override final;
227 virtual bool DILIGENT_CALL_TYPE UpdateCurrentGLContext() override final;
217228
218229 void BindProgramResources(Uint32& NewMemoryBarriers, IShaderResourceBinding* pResBinding);
219230
221232
222233 void CommitRenderTargets();
223234
224 virtual void SetSwapChain(ISwapChainGL* pSwapChain) override final;
235 virtual void DILIGENT_CALL_TYPE SetSwapChain(ISwapChainGL* pSwapChain) override final;
225236
226237 virtual void ResetRenderTargets() override final;
227238
5555 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_FenceGL, TFenceBase);
5656
5757 /// Implementation of IFence::GetCompletedValue() in OpenGL backend.
58 virtual Uint64 GetCompletedValue() override final;
58 virtual Uint64 DILIGENT_CALL_TYPE GetCompletedValue() override final;
5959
6060 /// Implementation of IFence::Reset() in OpenGL backend.
61 virtual void Reset(Uint64 Value) override final;
61 virtual void DILIGENT_CALL_TYPE Reset(Uint64 Value) override final;
6262
6363 void AddPendingFence(GLObjectWrappers::GLSyncObj&& Fence, Uint64 Value)
6464 {
124124 VERIFY_EXPR(StaticSamplerIdx < 0 || ResourceAttribs.ResourceType == SHADER_RESOURCE_TYPE_TEXTURE_SRV);
125125 }
126126
127 virtual SHADER_RESOURCE_VARIABLE_TYPE GetType() const override final
127 virtual SHADER_RESOURCE_VARIABLE_TYPE DILIGENT_CALL_TYPE GetType() const override final
128128 {
129129 return m_VariableType;
130130 }
131131
132 virtual void GetResourceDesc(ShaderResourceDesc& ResourceDesc) const override final
132 virtual void DILIGENT_CALL_TYPE GetResourceDesc(ShaderResourceDesc& ResourceDesc) const override final
133133 {
134134 ResourceDesc = m_Attribs.GetResourceDesc();
135135 }
136136
137 virtual Uint32 GetIndex() const override final
137 virtual Uint32 DILIGENT_CALL_TYPE GetIndex() const override final
138138 {
139139 return m_ParentResLayout.GetVariableIndex(*this);
140140 }
156156 // Non-virtual function
157157 void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
158158
159 virtual void Set(IDeviceObject* pObject) override final
159 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final
160160 {
161161 BindResource(pObject, 0);
162162 }
163163
164 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
164 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
165 Uint32 FirstElement,
166 Uint32 NumElements) override final
165167 {
166168 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.ArraySize, FirstElement, NumElements);
167169 for (Uint32 elem = 0; elem < NumElements; ++elem)
168170 BindResource(ppObjects[elem], FirstElement + elem);
169171 }
170172
171 virtual bool IsBound(Uint32 ArrayIndex) const override final
173 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
172174 {
173175 VERIFY_EXPR(ArrayIndex < m_Attribs.ArraySize);
174176 return m_ParentResLayout.m_pResourceCache->IsUBBound(m_Attribs.Binding + ArrayIndex);
188190 // Non-virtual function
189191 void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
190192
191 virtual void Set(IDeviceObject* pObject) override final
193 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final
192194 {
193195 BindResource(pObject, 0);
194196 }
195197
196 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
198 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
199 Uint32 FirstElement,
200 Uint32 NumElements) override final
197201 {
198202 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.ArraySize, FirstElement, NumElements);
199203 for (Uint32 elem = 0; elem < NumElements; ++elem)
200204 BindResource(ppObjects[elem], FirstElement + elem);
201205 }
202206
203 virtual bool IsBound(Uint32 ArrayIndex) const override final
207 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
204208 {
205209 VERIFY_EXPR(ArrayIndex < m_Attribs.ArraySize);
206210 return m_ParentResLayout.m_pResourceCache->IsSamplerBound(m_Attribs.Binding + ArrayIndex, m_Attribs.ResourceType == SHADER_RESOURCE_TYPE_TEXTURE_SRV);
219223 // Provide non-virtual function
220224 void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
221225
222 virtual void Set(IDeviceObject* pObject) override final
226 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final
223227 {
224228 BindResource(pObject, 0);
225229 }
226230
227 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
231 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
232 Uint32 FirstElement,
233 Uint32 NumElements) override final
228234 {
229235 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.ArraySize, FirstElement, NumElements);
230236 for (Uint32 elem = 0; elem < NumElements; ++elem)
231237 BindResource(ppObjects[elem], FirstElement + elem);
232238 }
233239
234 virtual bool IsBound(Uint32 ArrayIndex) const override final
240 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
235241 {
236242 VERIFY_EXPR(ArrayIndex < m_Attribs.ArraySize);
237243 return m_ParentResLayout.m_pResourceCache->IsImageBound(m_Attribs.Binding + ArrayIndex, m_Attribs.ResourceType == SHADER_RESOURCE_TYPE_TEXTURE_UAV);
250256 // Non-virtual function
251257 void BindResource(IDeviceObject* pObject, Uint32 ArrayIndex);
252258
253 virtual void Set(IDeviceObject* pObject) override final
259 virtual void DILIGENT_CALL_TYPE Set(IDeviceObject* pObject) override final
254260 {
255261 BindResource(pObject, 0);
256262 }
257263
258 virtual void SetArray(IDeviceObject* const* ppObjects, Uint32 FirstElement, Uint32 NumElements) override final
264 virtual void DILIGENT_CALL_TYPE SetArray(IDeviceObject* const* ppObjects,
265 Uint32 FirstElement,
266 Uint32 NumElements) override final
259267 {
260268 VerifyAndCorrectSetArrayArguments(m_Attribs.Name, m_Attribs.ArraySize, FirstElement, NumElements);
261269 for (Uint32 elem = 0; elem < NumElements; ++elem)
262270 BindResource(ppObjects[elem], FirstElement + elem);
263271 }
264272
265 virtual bool IsBound(Uint32 ArrayIndex) const override final
273 virtual bool DILIGENT_CALL_TYPE IsBound(Uint32 ArrayIndex) const override final
266274 {
267275 VERIFY_EXPR(ArrayIndex < m_Attribs.ArraySize);
268276 return m_ParentResLayout.m_pResourceCache->IsSSBOBound(m_Attribs.Binding + ArrayIndex);
5555 ~PipelineStateGLImpl();
5656
5757 /// Queries the specific interface, see IObject::QueryInterface() for details
58 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
58 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
5959
6060 /// Implementation of IPipelineState::BindStaticResources() in OpenGL backend.
61 virtual void BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags) override final;
61 virtual void DILIGENT_CALL_TYPE BindStaticResources(Uint32 ShaderFlags,
62 IResourceMapping* pResourceMapping,
63 Uint32 Flags) override final;
6264
6365 /// Implementation of IPipelineState::GetStaticVariableCount() in OpenGL backend.
64 virtual Uint32 GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
66 virtual Uint32 DILIGENT_CALL_TYPE GetStaticVariableCount(SHADER_TYPE ShaderType) const override final;
6567
6668 /// Implementation of IPipelineState::GetStaticVariableByName() in OpenGL backend.
67 virtual IShaderResourceVariable* GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
69 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByName(SHADER_TYPE ShaderType, const Char* Name) override final;
6870
6971 /// Implementation of IPipelineState::GetStaticVariableByIndex() in OpenGL backend.
70 virtual IShaderResourceVariable* GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
72 virtual IShaderResourceVariable* DILIGENT_CALL_TYPE GetStaticVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final;
7173
7274 /// Implementation of IPipelineState::CreateShaderResourceBinding() in OpenGL backend.
73 virtual void CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding, bool InitStaticResources) override final;
75 virtual void DILIGENT_CALL_TYPE CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding,
76 bool InitStaticResources) override final;
7477
7578 /// Implementation of IPipelineState::IsCompatibleWith() in OpenGL backend.
76 virtual bool IsCompatibleWith(const IPipelineState* pPSO) const override final;
79 virtual bool DILIGENT_CALL_TYPE IsCompatibleWith(const IPipelineState* pPSO) const override final;
7780
7881 void CommitProgram(GLContextState& State);
7982
5454 IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_QueryGL, TQueryBase);
5555
5656 /// Implementation of IQuery::GetData() in OpenGL backend.
57 virtual bool GetData(void* pData, Uint32 DataSize, bool AutoInvalidate) override final;
57 virtual bool DILIGENT_CALL_TYPE GetData(void* pData, Uint32 DataSize, bool AutoInvalidate) override final;
5858
5959
6060 /// Implementation of IQueryGL::GetGlQueryHandle().
61 virtual GLuint GetGlQueryHandle() const override final
61 virtual GLuint DILIGENT_CALL_TYPE GetGlQueryHandle() const override final
6262 {
6363 return m_GlQuery;
6464 }
6464 const EngineGLCreateInfo& InitAttribs,
6565 const SwapChainDesc* pSCDesc = nullptr);
6666 ~RenderDeviceGLImpl();
67 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
67
68 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override;
6869
6970 /// Implementation of IRenderDevice::CreateBuffer() in OpenGL backend.
70 void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* pBuffData, IBuffer** ppBuffer, bool bIsDeviceInternal);
71 virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* BuffData, IBuffer** ppBuffer) override final;
71 void CreateBuffer(const BufferDesc& BuffDesc,
72 const BufferData* pBuffData,
73 IBuffer** ppBuffer,
74 bool bIsDeviceInternal);
75 virtual void DILIGENT_CALL_TYPE CreateBuffer(const BufferDesc& BuffDesc,
76 const BufferData* BuffData,
77 IBuffer** ppBuffer) override final;
7278
7379 /// Implementation of IRenderDevice::CreateShader() in OpenGL backend.
74 void CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader** ppShader, bool bIsDeviceInternal);
75 virtual void CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader** ppShader) override final;
80 void CreateShader(const ShaderCreateInfo& ShaderCreateInfo,
81 IShader** ppShader,
82 bool bIsDeviceInternal);
83 virtual void DILIGENT_CALL_TYPE CreateShader(const ShaderCreateInfo& ShaderCreateInfo,
84 IShader** ppShader) override final;
7685
7786 /// Implementation of IRenderDevice::CreateTexture() in OpenGL backend.
78 void CreateTexture(const TextureDesc& TexDesc, const TextureData* pData, ITexture** ppTexture, bool bIsDeviceInternal);
79 virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData* Data, ITexture** ppTexture) override final;
87 void CreateTexture(const TextureDesc& TexDesc,
88 const TextureData* pData,
89 ITexture** ppTexture,
90 bool bIsDeviceInternal);
91 virtual void DILIGENT_CALL_TYPE CreateTexture(const TextureDesc& TexDesc,
92 const TextureData* Data,
93 ITexture** ppTexture) override final;
8094
8195 /// Implementation of IRenderDevice::CreateSampler() in OpenGL backend.
82 void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler, bool bIsDeviceInternal);
83 virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler) override final;
96 void CreateSampler(const SamplerDesc& SamplerDesc,
97 ISampler** ppSampler,
98 bool bIsDeviceInternal);
99 virtual void DILIGENT_CALL_TYPE CreateSampler(const SamplerDesc& SamplerDesc,
100 ISampler** ppSampler) override final;
84101
85102 /// Implementation of IRenderDevice::CreatePipelineState() in OpenGL backend.
86 void CreatePipelineState(const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState, bool bIsDeviceInternal);
87 virtual void CreatePipelineState(const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState) override final;
103 void CreatePipelineState(const PipelineStateDesc& PipelineDesc,
104 IPipelineState** ppPipelineState,
105 bool bIsDeviceInternal);
106 virtual void DILIGENT_CALL_TYPE CreatePipelineState(const PipelineStateDesc& PipelineDesc,
107 IPipelineState** ppPipelineState) override final;
88108
89109 /// Implementation of IRenderDevice::CreateFence() in OpenGL backend.
90 virtual void CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
110 virtual void DILIGENT_CALL_TYPE CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
91111
92112 /// Implementation of IRenderDevice::CreateQuery() in OpenGL backend.
93 virtual void CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
113 virtual void DILIGENT_CALL_TYPE CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
94114
95115 /// Implementation of IRenderDeviceGL::CreateTextureFromGLHandle().
96 virtual void CreateTextureFromGLHandle(Uint32 GLHandle, const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) override final;
116 virtual void DILIGENT_CALL_TYPE CreateTextureFromGLHandle(Uint32 GLHandle,
117 const TextureDesc& TexDesc,
118 RESOURCE_STATE InitialState,
119 ITexture** ppTexture) override final;
97120
98121 /// Implementation of IRenderDeviceGL::CreateBufferFromGLHandle().
99 virtual void CreateBufferFromGLHandle(Uint32 GLHandle, const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, IBuffer** ppBuffer) override final;
122 virtual void DILIGENT_CALL_TYPE CreateBufferFromGLHandle(Uint32 GLHandle,
123 const BufferDesc& BuffDesc,
124 RESOURCE_STATE InitialState,
125 IBuffer** ppBuffer) override final;
100126
101127 /// Implementation of IRenderDeviceGL::CreateDummyTexture().
102 virtual void CreateDummyTexture(const TextureDesc& TexDesc, RESOURCE_STATE InitialState, ITexture** ppTexture) override final;
128 virtual void DILIGENT_CALL_TYPE CreateDummyTexture(const TextureDesc& TexDesc,
129 RESOURCE_STATE InitialState,
130 ITexture** ppTexture) override final;
103131
104132 /// Implementation of IRenderDevice::ReleaseStaleResources() in OpenGL backend.
105 virtual void ReleaseStaleResources(bool ForceRelease = false) override final {}
133 virtual void DILIGENT_CALL_TYPE ReleaseStaleResources(bool ForceRelease = false) override final {}
106134
107135 /// Implementation of IRenderDevice::IdleGPU() in OpenGL backend.
108 virtual void IdleGPU() override final;
136 virtual void DILIGENT_CALL_TYPE IdleGPU() override final;
109137
110138 const GPUInfo& GetGPUInfo() { return m_GPUInfo; }
111139
4747 SamplerGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDeviceGL, const SamplerDesc& SamplerDesc, bool bIsDeviceInternal = false);
4848 ~SamplerGLImpl();
4949
50 virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
50 virtual void DILIGENT_CALL_TYPE QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final;
5151
5252