18#ifndef INCLUDED_RENDERER_BACKEND_IDEVICECOMMANDCONTEXT
19#define INCLUDED_RENDERER_BACKEND_IDEVICECOMMANDCONTEXT
69 const Rect& sourceRegion,
const Rect& destinationRegion,
98 virtual void ClearFramebuffer(
const bool color,
const bool depth,
const bool stencil) = 0;
114 const void* data,
const size_t dataSize,
117 const void* data,
const size_t dataSize,
155 const uint32_t firstIndex,
const uint32_t indexCount,
const int32_t vertexOffset) = 0;
162 const int32_t vertexOffset) = 0;
198 const int32_t bindingSlot,
199 const float value) = 0;
201 const int32_t bindingSlot,
202 const float valueX,
const float valueY) = 0;
204 const int32_t bindingSlot,
205 const float valueX,
const float valueY,
206 const float valueZ) = 0;
208 const int32_t bindingSlot,
209 const float valueX,
const float valueY,
210 const float valueZ,
const float valueW) = 0;
224#define GPU_SCOPED_LABEL(deviceCommandContext, name) \
225 GPUScopedLabel scopedLabel((deviceCommandContext), (name));
Definition: IDeviceCommandContext.h:228
Renderer::Backend::IDeviceCommandContext * m_DeviceCommandContext
Definition: IDeviceCommandContext.h:244
GPUScopedLabel(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const char *name)
Definition: IDeviceCommandContext.h:230
~GPUScopedLabel()
Definition: IDeviceCommandContext.h:238
Simplifed version of std::span (C++20) as we don't support the original one yet.
Definition: Span.h:37
A holder for precompiled compute pipeline description.
Definition: PipelineState.h:207
Definition: IDeviceCommandContext.h:42
virtual void SetIndexBuffer(IBuffer *buffer)=0
virtual void SetUniform(const int32_t bindingSlot, const float valueX, const float valueY, const float valueZ, const float valueW)=0
virtual void UploadTexture(ITexture *texture, const Format dataFormat, const void *data, const size_t dataSize, const uint32_t level=0, const uint32_t layer=0)=0
virtual void SetUniform(const int32_t bindingSlot, const float valueX, const float valueY, const float valueZ)=0
virtual void ResolveFramebuffer(IFramebuffer *sourceFramebuffer, IFramebuffer *destinationFramebuffer)=0
Resolves multisample source framebuffer attachments to destination attachments.
virtual void Draw(const uint32_t firstVertex, const uint32_t vertexCount)=0
virtual void SetUniform(const int32_t bindingSlot, PS::span< const float > values)=0
virtual void DrawInstanced(const uint32_t firstVertex, const uint32_t vertexCount, const uint32_t firstInstance, const uint32_t instanceCount)=0
virtual void ReadbackFramebufferSync(const uint32_t x, const uint32_t y, const uint32_t width, const uint32_t height, void *data)=0
Readbacks the current backbuffer to data in R8G8B8_UNORM format somewhen between the function call an...
virtual void UploadBuffer(IBuffer *buffer, const void *data, const uint32_t dataSize)=0
virtual void SetTexture(const int32_t bindingSlot, ITexture *texture)=0
Sets a read-only texture to the binding slot.
virtual void DrawIndexedInstanced(const uint32_t firstIndex, const uint32_t indexCount, const uint32_t firstInstance, const uint32_t instanceCount, const int32_t vertexOffset)=0
virtual void BeginPass()=0
virtual void SetUniform(const int32_t bindingSlot, const float value)=0
virtual 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)=0
virtual void UploadBufferRegion(IBuffer *buffer, const uint32_t dataOffset, const uint32_t dataSize, const UploadBufferFunction &uploadFunction)=0
virtual void BlitFramebuffer(IFramebuffer *sourceFramebuffer, IFramebuffer *destinationFramebuffer, const Rect &sourceRegion, const Rect &destinationRegion, const Sampler::Filter filter)=0
Copies source region into destination region automatically applying compatible format conversion and ...
virtual void SetIndexBufferData(const void *data, const uint32_t dataSize)=0
virtual void EndScopedLabel()=0
virtual void EndComputePass()=0
Finishes a compute pass.
virtual void UploadBuffer(IBuffer *buffer, const UploadBufferFunction &uploadFunction)=0
virtual void SetScissors(const uint32_t scissorCount, const Rect *scissors)=0
virtual void EndFramebufferPass()=0
Finishes a framebuffer pass, performs attachment store operations.
virtual void SetVertexBuffer(const uint32_t bindingSlot, IBuffer *buffer, const uint32_t offset)=0
virtual void BeginScopedLabel(const char *name)=0
virtual void SetVertexBufferData(const uint32_t bindingSlot, const void *data, const uint32_t dataSize)=0
virtual void Dispatch(const uint32_t groupCountX, const uint32_t groupCountY, const uint32_t groupCountZ)=0
Dispatches groupCountX * groupCountY * groupCountZ compute groups.
virtual void DrawIndexedInRange(const uint32_t firstIndex, const uint32_t indexCount, const uint32_t start, const uint32_t end)=0
virtual void UploadBufferRegion(IBuffer *buffer, const void *data, const uint32_t dataOffset, const uint32_t dataSize)=0
virtual void SetUniform(const int32_t bindingSlot, const float valueX, const float valueY)=0
virtual void DrawIndexed(const uint32_t firstIndex, const uint32_t indexCount, const int32_t vertexOffset)=0
virtual void ClearFramebuffer(const bool color, const bool depth, const bool stencil)=0
Clears all mentioned attachments.
virtual void SetVertexInputLayout(IVertexInputLayout *vertexInputLayout)=0
Binds the vertex input layout.
virtual void SetComputePipelineState(IComputePipelineState *pipelineState)=0
Binds the graphics pipeline state.
virtual void BeginFramebufferPass(IFramebuffer *framebuffer)=0
Starts a framebuffer pass, performs attachment load operations.
virtual void SetStorageTexture(const int32_t bindingSlot, ITexture *texture)=0
Sets a read & write resource to the binding slot.
std::function< void(u8 *)> UploadBufferFunction
Definition: IDeviceCommandContext.h:122
virtual void SetViewports(const uint32_t viewportCount, const Rect *viewports)=0
virtual void SetGraphicsPipelineState(IGraphicsPipelineState *pipelineState)=0
Binds the graphics pipeline state.
virtual void BeginComputePass()=0
Starts a compute pass, can't be called inside a framebuffer pass.
Definition: IDeviceObject.h:33
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
int32_t x
Definition: IDeviceCommandContext.h:59
int32_t width
Definition: IDeviceCommandContext.h:60
int32_t height
Definition: IDeviceCommandContext.h:60
int32_t y
Definition: IDeviceCommandContext.h:59
uint8_t u8
Definition: types.h:37
unsigned int uint32_t
Definition: wposix_types.h:53