/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/RendererFoundation/CommandEncoder/CommandEncoderPlatformInterface.h
95 строк
5 KB
Sanakan8472
Render Graph (#1948)
03 июн 2026, 10:19
Не верифицирован
03 июн 2026, 10:19
60bb12c
Код
Авторство
О чём код?
#pragma once #include <Foundation/Math/Color.h> #include <Foundation/Math/Rect.h> #include <RendererFoundation/Descriptors/Descriptors.h> #include <RendererFoundation/Descriptors/Enumerations.h> #include <RendererFoundation/RendererFoundationDLL.h> struct ezShaderResourceBinding; struct ezGALRenderingSetup; struct ezGALBindGroupCreationDescription; class EZ_RENDERERFOUNDATION_DLL ezGALCommandEncoderCommonPlatformInterface { public: // Resource binding functions virtual void SetBindGroupPlatform(ezUInt32 uiBindGroup, const ezGALBindGroupCreationDescription& bindGroup) = 0; virtual void SetBindGroupPlatform(ezUInt32 uiBindGroup, const ezGALBindGroup* pBindGroup) = 0; virtual void SetPushConstantsPlatform(ezArrayPtr<const ezUInt8> data) = 0; // GPU -> CPU query functions virtual ezGALTimestampHandle InsertTimestampPlatform() = 0; virtual ezGALOcclusionHandle BeginOcclusionQueryPlatform(ezEnum<ezGALQueryType> type) = 0; virtual void EndOcclusionQueryPlatform(ezGALOcclusionHandle hOcclusion) = 0; virtual ezGALFenceHandle InsertFencePlatform() = 0; // Resource update functions virtual void CopyBufferPlatform(const ezGALBuffer* pDestination, const ezGALBuffer* pSource) = 0; virtual void CopyBufferRegionPlatform(const ezGALBuffer* pDestination, ezUInt32 uiDestOffset, const ezGALBuffer* pSource, ezUInt32 uiSourceOffset, ezUInt32 uiByteCount) = 0; virtual void UpdateBufferPlatform(const ezGALBuffer* pDestination, ezUInt32 uiDestOffset, ezArrayPtr<const ezUInt8> sourceData, ezGALUpdateMode::Enum updateMode) = 0; virtual void CopyTexturePlatform(const ezGALTexture* pDestination, const ezGALTexture* pSource) = 0; virtual void CopyTextureRegionPlatform(const ezGALTexture* pDestination, const ezGALTextureSubresource& destinationSubResource, const ezVec3U32& vDestinationPoint, const ezGALTexture* pSource, const ezGALTextureSubresource& sourceSubResource, const ezBoundingBoxu32& box) = 0; virtual void UpdateTexturePlatform(const ezGALTexture* pDestination, const ezGALTextureSubresource& destinationSubResource, const ezBoundingBoxu32& destinationBox, const ezGALSystemMemoryDescription& sourceData) = 0; virtual void ResolveTexturePlatform(const ezGALTexture* pDestination, const ezGALTextureSubresource& destinationSubResource, const ezGALTexture* pSource, const ezGALTextureSubresource& sourceSubResource) = 0; virtual void ReadbackTexturePlatform(const ezGALReadbackTexture* pDestination, const ezGALTexture* pSource) = 0; virtual void ReadbackBufferPlatform(const ezGALReadbackBuffer* pDestination, const ezGALBuffer* pSource) = 0; // Barriers virtual void TextureBarrierPlatform(ezArrayPtr<const ezGALTextureBarrier> barriers) = 0; virtual void BufferBarrierPlatform(ezArrayPtr<const ezGALBufferBarrier> barriers) = 0; // Misc virtual void FlushPlatform() = 0; // Debug helper functions virtual void PushMarkerPlatform(const char* szMarker) = 0; virtual void PopMarkerPlatform() = 0; virtual void InsertEventMarkerPlatform(const char* szMarker) = 0; // Compute Dispatch virtual void BeginComputePlatform() = 0; virtual void EndComputePlatform() = 0; virtual ezResult DispatchPlatform(ezUInt32 uiThreadGroupCountX, ezUInt32 uiThreadGroupCountY, ezUInt32 uiThreadGroupCountZ) = 0; virtual ezResult DispatchIndirectPlatform(const ezGALBuffer* pIndirectArgumentBuffer, ezUInt32 uiArgumentOffsetInBytes) = 0; // Draw functions virtual void BeginRenderingPlatform(const ezGALRenderingSetup& renderingSetup) = 0; virtual void EndRenderingPlatform() = 0; virtual void ClearPlatform(const ezColor& clearColor, ezUInt32 uiRenderTargetClearMask, bool bClearDepth, bool bClearStencil, float fDepthClear, ezUInt8 uiStencilClear) = 0; virtual ezResult DrawPlatform(ezUInt32 uiVertexCount, ezUInt32 uiStartVertex) = 0; virtual ezResult DrawIndexedPlatform(ezUInt32 uiIndexCount, ezUInt32 uiStartIndex) = 0; virtual ezResult DrawIndexedInstancedPlatform(ezUInt32 uiIndexCountPerInstance, ezUInt32 uiInstanceCount, ezUInt32 uiStartIndex) = 0; virtual ezResult DrawIndexedInstancedIndirectPlatform(const ezGALBuffer* pIndirectArgumentBuffer, ezUInt32 uiArgumentOffsetInBytes) = 0; virtual ezResult DrawInstancedPlatform(ezUInt32 uiVertexCountPerInstance, ezUInt32 uiInstanceCount, ezUInt32 uiStartVertex) = 0; virtual ezResult DrawInstancedIndirectPlatform(const ezGALBuffer* pIndirectArgumentBuffer, ezUInt32 uiArgumentOffsetInBytes) = 0; // State functions virtual void SetIndexBufferPlatform(const ezGALBuffer* pIndexBuffer) = 0; virtual void SetVertexBufferPlatform(ezUInt32 uiSlot, const ezGALBuffer* pVertexBuffer, ezUInt32 uiOffset) = 0; virtual void SetGraphicsPipelinePlatform(const ezGALGraphicsPipeline* pGraphicsPipeline) = 0; virtual void SetComputePipelinePlatform(const ezGALComputePipeline* pComputePipeline) = 0; // Dynamic State Functions virtual void SetViewportPlatform(const ezRectFloat& rect, float fMinDepth, float fMaxDepth) = 0; virtual void SetScissorRectPlatform(const ezRectU32& rect) = 0; virtual void SetStencilReferencePlatform(ezUInt8 uiStencilRefValue) = 0; };