18#ifndef INCLUDED_RENDERER_BACKEND_DUMMY_DEVICECOMMANDCONTEXT
19#define INCLUDED_RENDERER_BACKEND_DUMMY_DEVICECOMMANDCONTEXT
54 const Rect& sourceRegion,
const Rect& destinationRegion,
59 void ClearFramebuffer(
const bool color,
const bool depth,
const bool stencil)
override;
67 const void* data,
const size_t dataSize,
70 const void* data,
const size_t dataSize,
93 const uint32_t bindingSlot,
const void* data,
const uint32_t dataSize)
override;
103 const uint32_t firstIndex,
const uint32_t indexCount,
const int32_t vertexOffset)
override;
110 const int32_t vertexOffset)
override;
121 const uint32_t groupCountZ)
override;
128 const int32_t bindingSlot,
129 const float value)
override;
131 const int32_t bindingSlot,
132 const float valueX,
const float valueY)
override;
134 const int32_t bindingSlot,
135 const float valueX,
const float valueY,
136 const float valueZ)
override;
138 const int32_t bindingSlot,
139 const float valueX,
const float valueY,
140 const float valueZ,
const float valueW)
override;
147 void Flush()
override;
152 static std::unique_ptr<CDeviceCommandContext>
Create(
CDevice* device);
A wrapper for backend shader program to handle high-level operations like file reloading and handling...
Definition: ShaderProgram.h:34
Represents a texture object.
Definition: TextureManager.h:262
Simplifed version of std::span (C++20) as we don't support the original one yet.
Definition: Span.h:37
Definition: DeviceCommandContext.h:43
void UploadBufferRegion(IBuffer *buffer, const void *data, const uint32_t dataOffset, const uint32_t dataSize) override
Definition: DeviceCommandContext.cpp:85
void SetGraphicsPipelineState(IGraphicsPipelineState *pipelineState) override
Binds the graphics pipeline state.
Definition: DeviceCommandContext.cpp:54
void Flush() override
Definition: DeviceCommandContext.cpp:103
void DrawIndexedInstanced(const uint32_t firstIndex, const uint32_t indexCount, const uint32_t firstInstance, const uint32_t instanceCount, const int32_t vertexOffset) override
Definition: DeviceCommandContext.cpp:183
void EndComputePass() override
Finishes a compute pass.
Definition: DeviceCommandContext.cpp:197
void ResolveFramebuffer(IFramebuffer *sourceFramebuffer, IFramebuffer *destinationFramebuffer) override
Resolves multisample source framebuffer attachments to destination attachments.
Definition: DeviceCommandContext.cpp:112
void SetViewports(const uint32_t viewportCount, const Rect *viewports) override
Definition: DeviceCommandContext.cpp:137
void ReadbackFramebufferSync(const uint32_t x, const uint32_t y, const uint32_t width, const uint32_t height, void *data) override
Readbacks the current backbuffer to data in R8G8B8_UNORM format somewhen between the function call an...
Definition: DeviceCommandContext.cpp:128
void SetUniform(const int32_t bindingSlot, const float value) override
Definition: DeviceCommandContext.cpp:213
void SetStorageTexture(const int32_t bindingSlot, ITexture *texture) override
Sets a read & write resource to the binding slot.
Definition: DeviceCommandContext.cpp:209
void Draw(const uint32_t firstVertex, const uint32_t vertexCount) override
Definition: DeviceCommandContext.cpp:170
void SetScissors(const uint32_t scissorCount, const Rect *scissors) override
Definition: DeviceCommandContext.cpp:133
void UploadTextureRegion(ITexture *texture, const Format dataFormat, const void *data, const size_t dataSize, const uint32_t xOffset, const uint32_t yOffset, const uint32_t width, const uint32_t height, const uint32_t level=0, const uint32_t layer=0) override
Definition: DeviceCommandContext.cpp:70
void SetIndexBufferData(const void *data, const uint32_t dataSize) override
Definition: DeviceCommandContext.cpp:158
void SetVertexBuffer(const uint32_t bindingSlot, IBuffer *buffer, const uint32_t offset) override
Definition: DeviceCommandContext.cpp:145
void SetTexture(const int32_t bindingSlot, ITexture *texture) override
Sets a read-only texture to the binding slot.
Definition: DeviceCommandContext.cpp:205
void SetComputePipelineState(IComputePipelineState *pipelineState) override
Binds the graphics pipeline state.
Definition: DeviceCommandContext.cpp:59
void BlitFramebuffer(IFramebuffer *sourceFramebuffer, IFramebuffer *destinationFramebuffer, const Rect &sourceRegion, const Rect &destinationRegion, const Sampler::Filter filter) override
Copies source region into destination region automatically applying compatible format conversion and ...
Definition: DeviceCommandContext.cpp:107
void BeginScopedLabel(const char *name) override
Definition: DeviceCommandContext.cpp:95
IDevice * GetDevice() override
Definition: DeviceCommandContext.cpp:49
void SetIndexBuffer(IBuffer *buffer) override
Definition: DeviceCommandContext.cpp:154
void BeginComputePass() override
Starts a compute pass, can't be called inside a framebuffer pass.
Definition: DeviceCommandContext.cpp:193
void DrawInstanced(const uint32_t firstVertex, const uint32_t vertexCount, const uint32_t firstInstance, const uint32_t instanceCount) override
Definition: DeviceCommandContext.cpp:178
void Dispatch(const uint32_t groupCountX, const uint32_t groupCountY, const uint32_t groupCountZ) override
Dispatches groupCountX * groupCountY * groupCountZ compute groups.
Definition: DeviceCommandContext.cpp:201
void SetVertexInputLayout(IVertexInputLayout *vertexInputLayout) override
Binds the vertex input layout.
Definition: DeviceCommandContext.cpp:141
std::function< void(u8 *)> UploadBufferFunction
Definition: DeviceCommandContext.h:75
void BeginFramebufferPass(IFramebuffer *framebuffer) override
Starts a framebuffer pass, performs attachment load operations.
Definition: DeviceCommandContext.cpp:120
void UploadTexture(ITexture *texture, const Format dataFormat, const void *data, const size_t dataSize, const uint32_t level=0, const uint32_t layer=0) override
Definition: DeviceCommandContext.cpp:64
void EndFramebufferPass() override
Finishes a framebuffer pass, performs attachment store operations.
Definition: DeviceCommandContext.cpp:124
void ClearFramebuffer(const bool color, const bool depth, const bool stencil) override
Clears all mentioned attachments.
Definition: DeviceCommandContext.cpp:116
void BeginPass() override
Definition: DeviceCommandContext.cpp:162
void DrawIndexed(const uint32_t firstIndex, const uint32_t indexCount, const int32_t vertexOffset) override
Definition: DeviceCommandContext.cpp:174
void SetVertexBufferData(const uint32_t bindingSlot, const void *data, const uint32_t dataSize) override
Definition: DeviceCommandContext.cpp:149
void EndPass() override
Definition: DeviceCommandContext.cpp:166
void EndScopedLabel() override
Definition: DeviceCommandContext.cpp:99
static std::unique_ptr< CDeviceCommandContext > Create(CDevice *device)
Definition: DeviceCommandContext.cpp:38
CDevice * m_Device
Definition: DeviceCommandContext.h:156
void DrawIndexedInRange(const uint32_t firstIndex, const uint32_t indexCount, const uint32_t start, const uint32_t end) override
Definition: DeviceCommandContext.cpp:188
void UploadBuffer(IBuffer *buffer, const void *data, const uint32_t dataSize) override
Definition: DeviceCommandContext.cpp:77
A holder for precompiled compute pipeline description.
Definition: PipelineState.h:207
Definition: IDeviceCommandContext.h:42
IFramebuffer stores attachments which should be used by backend as rendering destinations.
Definition: IFramebuffer.h:85
A holder for precompiled graphics pipeline description.
Definition: PipelineState.h:198
Definition: ITexture.h:34
Filter
Definition: Sampler.h:36
Format
Definition: Format.h:28
Backend
Definition: Backend.h:28
Definition: VideoMode.h:29
Definition: IDeviceCommandContext.h:58
uint8_t u8
Definition: types.h:37
unsigned int uint32_t
Definition: wposix_types.h:53