Renderer: Working compute implementation

This commit is contained in:
SirLynix
2022-12-25 16:08:35 +01:00
committed by Jérôme Leclercq
parent 4605eed0da
commit fe8715f1fb
31 changed files with 615 additions and 167 deletions

View File

@@ -44,10 +44,12 @@ namespace Nz
inline void BeginRenderPass(const Framebuffer& framebuffer, const RenderPass& renderPass, const Recti& renderRect, std::initializer_list<ClearValues> clearValues);
virtual void BindComputePipeline(const ComputePipeline& pipeline) = 0;
virtual void BindComputeShaderBinding(UInt32 set, const ShaderBinding& binding) = 0;
virtual void BindComputeShaderBinding(const RenderPipelineLayout& pipelineLayout, UInt32 set, const ShaderBinding& binding) = 0;
virtual void BindIndexBuffer(const RenderBuffer& indexBuffer, IndexType indexType, UInt64 offset = 0) = 0;
virtual void BindRenderPipeline(const RenderPipeline& pipeline) = 0;
virtual void BindShaderBinding(UInt32 set, const ShaderBinding& binding) = 0;
virtual void BindShaderBinding(const RenderPipelineLayout& pipelineLayout, UInt32 set, const ShaderBinding& binding) = 0;
virtual void BindRenderShaderBinding(UInt32 set, const ShaderBinding& binding) = 0;
virtual void BindRenderShaderBinding(const RenderPipelineLayout& pipelineLayout, UInt32 set, const ShaderBinding& binding) = 0;
virtual void BindVertexBuffer(UInt32 binding, const RenderBuffer& vertexBuffer, UInt64 offset = 0) = 0;
virtual void BlitTexture(const Texture& fromTexture, const Boxui& fromBox, TextureLayout fromLayout, const Texture& toTexture, const Boxui& toBox, TextureLayout toLayout, SamplerFilter filter) = 0;

View File

@@ -83,6 +83,7 @@ namespace Nz
TopOfPipe,
ColorOutput,
ComputeShader,
DrawIndirect,
FragmentShader,
FragmentTestsEarly,
@@ -196,6 +197,7 @@ namespace Nz
ColorOutput,
DepthStencilReadOnly,
DepthStencilReadWrite,
General,
Present,
TransferSource,
TransferDestination,

View File

@@ -21,9 +21,8 @@ namespace Nz
bool depthClamping = false;
bool nonSolidFaceFilling = false;
bool storageBuffers = false;
bool textureRead = false;
bool textureReadWithoutFormat = false;
bool textureWrite = false;
bool textureReadWrite = false;
bool textureWriteWithoutFormat = false;
bool unrestrictedTextureViews = false;
};

View File

@@ -68,11 +68,8 @@ namespace Nz
virtual bool Copy(const Texture& source, const Boxui& srcBox, const Vector3ui& dstPos = Vector3ui::Zero()) = 0;
virtual std::shared_ptr<Texture> CreateView(const TextureViewInfo& viewInfo) = 0;
virtual PixelFormat GetFormat() const = 0;
virtual UInt8 GetLevelCount() const = 0;
virtual Texture* GetParentTexture() const = 0;
virtual Vector3ui GetSize(UInt8 level = 0) const = 0;
virtual ImageType GetType() const = 0;
virtual const TextureInfo& GetTextureInfo() const = 0;
virtual void UpdateDebugName(std::string_view name) = 0;