3#include "../Interface/GraphicsPipeline.hpp"
12class WebGPUShaderProgram;
13class VertexDescription;
68 WGPUPipelineLayout pipelineLayout;
69 WGPUVertexBufferLayout vertexBufferLayout;
70 WGPURenderPipelineDescriptor pipelineDescriptor;
71 WGPUPrimitiveDepthClipControl depthClipControl;
72 WGPUDepthStencilState depthStencilState;
73 WGPUFragmentState fragmentState;
74 WGPUColorTargetState colorTargetState;
75 WGPUBlendState blendState;
78 struct RenderPassCompare {
104 std::map<RenderPassDescription, WGPURenderPipeline, RenderPassCompare> pipelines;
A graphics pipeline.
Definition: GraphicsPipeline.hpp:11
A shader program.
Definition: ShaderProgram.hpp:11
Describes how a vertex buffer is accessed by a shader.
Definition: VertexDescription.hpp:8
WebGPU implementation of GraphicsPipeline.
Definition: WebGPUGraphicsPipeline.hpp:16
const WebGPUShaderProgram * GetShaderProgram() const
Get the shader program.
Definition: WebGPUGraphicsPipeline.cpp:212
~WebGPUGraphicsPipeline() final
Destructor.
Definition: WebGPUGraphicsPipeline.cpp:158
WebGPUGraphicsPipeline(WebGPURenderer &renderer, const ShaderProgram *shaderProgram, const Configuration &configuration, const VertexDescription *vertexDescription=nullptr)
Create new WebGPU graphics pipeline.
Definition: WebGPUGraphicsPipeline.cpp:14
WGPURenderPipeline GetRenderPipeline(const RenderPassDescription &renderPassDescription)
Get the WebGPU pipeline for a given render pass.
Definition: WebGPUGraphicsPipeline.cpp:165
Low-level renderer implementing WebGPU.
Definition: WebGPURenderer.hpp:22
WebGPU implementation of ShaderProgram.
Definition: WebGPUShaderProgram.hpp:16
Definition: Editor.hpp:18
The configuration of the graphics pipeline.
Definition: GraphicsPipeline.hpp:14
A description of a render pass.
Definition: WebGPUGraphicsPipeline.hpp:19
bool hasColorAttachment
Whether the render pass has a color attachment.
Definition: WebGPUGraphicsPipeline.hpp:21
bool hasDepthAttachment
Whether the render pass has a depth attachment.
Definition: WebGPUGraphicsPipeline.hpp:27
uint32_t attachmentlessMsaa
MSAA sample count when doing attachmentless rendering.
Definition: WebGPUGraphicsPipeline.hpp:33
WGPUTextureFormat depthAttachmentFormat
The format of the render pass' depth attachment (if there is one).
Definition: WebGPUGraphicsPipeline.hpp:30
WGPUTextureFormat colorAttachmentFormat
The format of the render pass' color attachment (if there is one).
Definition: WebGPUGraphicsPipeline.hpp:24