Use TypedInteger for BindGroupIndex
Bug: dawn:442
Change-Id: I889a943cbaf2d349c31a15fdf126d66964bdd0a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23247
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
diff --git a/src/dawn_native/CommandBufferStateTracker.h b/src/dawn_native/CommandBufferStateTracker.h
index 478429c..39d32fd 100644
--- a/src/dawn_native/CommandBufferStateTracker.h
+++ b/src/dawn_native/CommandBufferStateTracker.h
@@ -16,11 +16,11 @@
#define DAWNNATIVE_COMMANDBUFFERSTATETRACKER_H
#include "common/Constants.h"
+#include "common/ityp_array.h"
#include "dawn_native/BindingInfo.h"
#include "dawn_native/Error.h"
#include "dawn_native/Forward.h"
-#include <array>
#include <bitset>
#include <map>
#include <set>
@@ -37,7 +37,7 @@
// State-modifying methods
void SetComputePipeline(ComputePipelineBase* pipeline);
void SetRenderPipeline(RenderPipelineBase* pipeline);
- void SetBindGroup(uint32_t index, BindGroupBase* bindgroup);
+ void SetBindGroup(BindGroupIndex index, BindGroupBase* bindgroup);
void SetIndexBuffer();
void SetVertexBuffer(uint32_t slot);
@@ -53,7 +53,7 @@
ValidationAspects mAspects;
- std::array<BindGroupBase*, kMaxBindGroups> mBindgroups = {};
+ ityp::array<BindGroupIndex, BindGroupBase*, kMaxBindGroups> mBindgroups = {};
std::bitset<kMaxVertexBuffers> mVertexBufferSlotsUsed;
PipelineLayoutBase* mLastPipelineLayout = nullptr;