Make CommandBufferValidation use Error.h
diff --git a/src/backend/CommandBufferStateTracker.h b/src/backend/CommandBufferStateTracker.h
index 5a5f561..b097ad9 100644
--- a/src/backend/CommandBufferStateTracker.h
+++ b/src/backend/CommandBufferStateTracker.h
@@ -27,21 +27,19 @@
class CommandBufferStateTracker {
public:
- explicit CommandBufferStateTracker(CommandBufferBuilder* builder);
-
// Non-state-modifying validation functions
- bool ValidateCanCopy() const;
- bool ValidateCanDispatch();
- bool ValidateCanDrawArrays();
- bool ValidateCanDrawElements();
+ MaybeError ValidateCanCopy() const;
+ MaybeError ValidateCanDispatch();
+ MaybeError ValidateCanDrawArrays();
+ MaybeError ValidateCanDrawElements();
// State-modifying methods
void EndPass();
- bool SetComputePipeline(ComputePipelineBase* pipeline);
- bool SetRenderPipeline(RenderPipelineBase* pipeline);
+ void SetComputePipeline(ComputePipelineBase* pipeline);
+ void SetRenderPipeline(RenderPipelineBase* pipeline);
void SetBindGroup(uint32_t index, BindGroupBase* bindgroup);
- bool SetIndexBuffer();
- bool SetVertexBuffer(uint32_t index);
+ MaybeError SetIndexBuffer();
+ MaybeError SetVertexBuffer(uint32_t index);
private:
enum ValidationAspect {
@@ -59,12 +57,10 @@
bool RecomputeHaveAspectVertexBuffers();
bool HavePipeline() const;
- bool RevalidateCanDraw();
+ MaybeError RevalidateCanDraw();
void SetPipelineCommon(PipelineBase* pipeline);
- CommandBufferBuilder* mBuilder;
-
ValidationAspects mAspects;
std::bitset<kMaxBindGroups> mBindgroupsSet;