47 : shaderProgram(
std::move(shaderProgram)), pipelineLayout(
std::move(pipelineLayout)) {}
51 template<
typename Processor>
static constexpr void reflect(Processor&& RTTI) {
65 using TDeviceObject::TDeviceObject;
103 : mCommandBuffer(&commandBuffer), mComputePipeline(&computePipeline) {
104 mComputePipeline->
begin(*mCommandBuffer);
122 if(mComputePipeline !=
nullptr) {
123 mComputePipeline->
end(*mCommandBuffer);
124 mComputePipeline =
nullptr;
125 mCommandBuffer =
nullptr;
136 template<
typename Func,
typename... Args>
decltype(
auto)
with(
GPUCommandBuffer& commandBuffer, Func&& func, Args&&... args) {
137 const Scope scope(commandBuffer, *
this, std::forward<Args>(args)...);
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUCommandBuffer.hpp:77
A helper class that begins a scoped compute pipeline recording.
Definition GPUComputePipeline.hpp:90
~Scope() noexcept
Unbound the pipeline from the command buffer.
Definition GPUComputePipeline.hpp:117
Scope(GPUCommandBuffer &commandBuffer, GPUComputePipeline &computePipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUComputePipeline.hpp:102
Scope(GPUCommandBuffer &commandBuffer, const GPUComputePipelinePtr &computePipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUComputePipeline.hpp:111
Scope(const GPUCommandBufferPtr &commandBuffer, GPUComputePipeline &computePipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUComputePipeline.hpp:108
void reset()
Unbound the pipeline from the command buffer.
Definition GPUComputePipeline.hpp:121
Scope(const GPUCommandBufferPtr &commandBuffer, const GPUComputePipelinePtr &computePipeline)
Creates a new scope and calls begin() on the pipeline.
Definition GPUComputePipeline.hpp:114
Definition GPUComputePipeline.hpp:62
GPUComputePipeline(GPUComputePipeline &&)=delete
Deleted move constructor.
GPUComputePipeline & operator=(const GPUComputePipeline &)=delete
decltype(auto) with(GPUCommandBuffer &commandBuffer, Func &&func, Args &&... args)
Prepares the pipeline for execution.
Definition GPUComputePipeline.hpp:136
GPUComputePipeline & operator=(GPUComputePipeline &&)=delete
GPUComputePipeline(const GPUComputePipeline &)=delete
Deleted copy constructor.
virtual void begin(GPUCommandBuffer &commandBuffer)=0
Prepares the pipeline for execution.
virtual void end(GPUCommandBuffer &commandBuffer)=0
Finishes the pipeline execution.
Definition Application.hpp:19
std::function< void()> GPURenderingBlock
A block executed by the render pass implementation when the renderer is ready to receive draw command...
Definition GPUComputePipeline.hpp:60
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Compute pipeline descriptor structure.
Definition GPUComputePipeline.hpp:25
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUComputePipeline.hpp:51
Definition GPUResourceSet.hpp:716