11#include "misc/Error.h"
12#include "render/general/pipeline/PipelineSharedPtr.h"
13#include "render/general/resource/GpuResource.h"
19 enum class ComputeResourceUsage {
20 READ_ONLY_ARRAY_BUFFER,
21 READ_WRITE_ARRAY_BUFFER,
28 enum class ComputeExecutionStage :
size_t {
29 AFTER_DEPTH_PREPASS = 0,
39 enum class ComputeExecutionGroup :
size_t {
74 const std::string& sCompiledComputeShaderName,
76 ComputeExecutionGroup
executionGroup = ComputeExecutionGroup::FIRST);
99 const std::string& sShaderResourceName,
100 ComputeResourceUsage usage,
101 bool bUpdateOnlyCurrentFrameResourceDescriptors =
false) = 0;
256 const ComputeExecutionStage
executionStage = ComputeExecutionStage::AFTER_DEPTH_PREPASS;
Definition: ComputeShaderInterface.h:46
void submitForExecution(unsigned int iThreadGroupCountX, unsigned int iThreadGroupCountY, unsigned int iThreadGroupCountZ)
Definition: ComputeShaderInterface.cpp:104
static std::variant< std::unique_ptr< ComputeShaderInterface >, Error > createRenderSpecificInterface(Renderer *pRenderer, const std::string &sComputeShaderName, ComputeExecutionStage executionStage, ComputeExecutionGroup executionGroup)
Definition: ComputeShaderInterface.cpp:79
std::string getComputeShaderName() const
Definition: ComputeShaderInterface.cpp:130
unsigned int iThreadGroupCountY
Definition: ComputeShaderInterface.h:250
ComputeExecutionGroup getExecutionGroup() const
Definition: ComputeShaderInterface.cpp:126
Pipeline * getPipeline() const
Definition: ComputeShaderInterface.cpp:136
unsigned int getThreadGroupCountX() const
Definition: ComputeShaderInterface.h:223
Renderer * pRenderer
Definition: ComputeShaderInterface.h:241
unsigned int getThreadGroupCountY() const
Definition: ComputeShaderInterface.h:230
const ComputeExecutionGroup executionGroup
Definition: ComputeShaderInterface.h:259
ComputeExecutionStage getExecutionStage() const
Definition: ComputeShaderInterface.cpp:128
unsigned int iThreadGroupCountX
Definition: ComputeShaderInterface.h:247
const ComputeExecutionStage executionStage
Definition: ComputeShaderInterface.h:256
Renderer * getRenderer()
Definition: ComputeShaderInterface.cpp:134
virtual std::optional< Error > bindResource(GpuResource *pResource, const std::string &sShaderResourceName, ComputeResourceUsage usage, bool bUpdateOnlyCurrentFrameResourceDescriptors=false)=0
unsigned int iThreadGroupCountZ
Definition: ComputeShaderInterface.h:253
PipelineSharedPtr pPipeline
Definition: ComputeShaderInterface.h:244
unsigned int getThreadGroupCountZ() const
Definition: ComputeShaderInterface.h:237
static std::variant< std::unique_ptr< ComputeShaderInterface >, Error > createUsingGraphicsQueue(Renderer *pRenderer, const std::string &sCompiledComputeShaderName, ComputeExecutionStage executionStage, ComputeExecutionGroup executionGroup=ComputeExecutionGroup::FIRST)
Definition: ComputeShaderInterface.cpp:46
Pipeline * getUsedPipeline() const
Definition: ComputeShaderInterface.cpp:132
const std::string sComputeShaderName
Definition: ComputeShaderInterface.h:262
static std::unique_ptr< ComputeShaderInterface > createPartiallyInitializedRenderSpecificInterface(Renderer *pRenderer, const std::string &sComputeShaderName, ComputeExecutionStage executionStage, ComputeExecutionGroup executionGroup)
Definition: ComputeShaderInterface.cpp:56
Definition: GpuResource.h:16
Definition: PipelineSharedPtr.h:15
Definition: Pipeline.h:20
Definition: Renderer.h:43