Updating RenderPipelineDescriptor to the newest layout
Currently normalizes anything using the new layout to the old one for
the sake of getting things working as quickly as possible. Follow up
changes will gradually push the new layout through more of the stack.
Bug: dawn:642
Change-Id: Ie92fa9dde21174f62ceba1a1f4866cbc24c5fc6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/utils/ComboRenderPipelineDescriptor.h b/src/utils/ComboRenderPipelineDescriptor.h
index ce8eb30..67ee058 100644
--- a/src/utils/ComboRenderPipelineDescriptor.h
+++ b/src/utils/ComboRenderPipelineDescriptor.h
@@ -23,6 +23,7 @@
namespace utils {
+ // For creating deprecated render pipeline descriptors
class ComboVertexStateDescriptor : public wgpu::VertexStateDescriptor {
public:
ComboVertexStateDescriptor();
@@ -53,6 +54,25 @@
wgpu::DepthStencilStateDescriptor cDepthStencilState;
};
+ // For creating the new style of render pipeline descriptors
+ class ComboRenderPipelineDescriptor2 : public wgpu::RenderPipelineDescriptor2 {
+ public:
+ ComboRenderPipelineDescriptor2();
+
+ ComboRenderPipelineDescriptor2(const ComboRenderPipelineDescriptor2&) = delete;
+ ComboRenderPipelineDescriptor2& operator=(const ComboRenderPipelineDescriptor2&) = delete;
+ ComboRenderPipelineDescriptor2(ComboRenderPipelineDescriptor2&&) = delete;
+ ComboRenderPipelineDescriptor2& operator=(ComboRenderPipelineDescriptor2&&) = delete;
+
+ std::array<wgpu::VertexBufferLayout, kMaxVertexBuffers> cBuffers;
+ std::array<wgpu::VertexAttribute, kMaxVertexAttributes> cAttributes;
+ std::array<wgpu::ColorTargetState, kMaxColorAttachments> cTargets;
+ std::array<wgpu::BlendState, kMaxColorAttachments> cBlends;
+
+ wgpu::DepthStencilState cDepthStencil;
+ wgpu::FragmentState cFragment;
+ };
+
} // namespace utils
#endif // UTILS_COMBORENDERPIPELINEDESCRIPTOR_H_