diff --git a/dawn.json b/dawn.json index 6973a94a3c..bfb03aa0f7 100644 --- a/dawn.json +++ b/dawn.json @@ -480,7 +480,7 @@ "name": "get bind group layout", "returns": "bind group layout", "args": [ - {"name": "group", "type": "uint32_t"} + {"name": "group index", "type": "uint32_t"} ] } ] @@ -1213,7 +1213,7 @@ "name": "get bind group layout", "returns": "bind group layout", "args": [ - {"name": "group", "type": "uint32_t"} + {"name": "group index", "type": "uint32_t"} ] } ] diff --git a/src/dawn_native/Pipeline.cpp b/src/dawn_native/Pipeline.cpp index 4c2439b1aa..4a0b653022 100644 --- a/src/dawn_native/Pipeline.cpp +++ b/src/dawn_native/Pipeline.cpp @@ -66,22 +66,22 @@ namespace dawn_native { return mLayout.Get(); } - MaybeError PipelineBase::ValidateGetBindGroupLayout(uint32_t group) { + MaybeError PipelineBase::ValidateGetBindGroupLayout(uint32_t groupIndex) { DAWN_TRY(GetDevice()->ValidateIsAlive()); DAWN_TRY(GetDevice()->ValidateObject(this)); DAWN_TRY(GetDevice()->ValidateObject(mLayout.Get())); - if (group >= kMaxBindGroups) { + if (groupIndex >= kMaxBindGroups) { return DAWN_VALIDATION_ERROR("Bind group layout index out of bounds"); } return {}; } - BindGroupLayoutBase* PipelineBase::GetBindGroupLayout(uint32_t group) { - if (GetDevice()->ConsumedError(ValidateGetBindGroupLayout(group))) { + BindGroupLayoutBase* PipelineBase::GetBindGroupLayout(uint32_t groupIndex) { + if (GetDevice()->ConsumedError(ValidateGetBindGroupLayout(groupIndex))) { return BindGroupLayoutBase::MakeError(GetDevice()); } - if (!mLayout->GetBindGroupLayoutsMask()[group]) { + if (!mLayout->GetBindGroupLayoutsMask()[groupIndex]) { // Get or create an empty bind group layout. // TODO(enga): Consider caching this object on the Device and reusing it. // Today, this can't be done correctly because of the order of Device destruction. @@ -99,7 +99,7 @@ namespace dawn_native { return bgl; } - BindGroupLayoutBase* bgl = mLayout->GetBindGroupLayout(group); + BindGroupLayoutBase* bgl = mLayout->GetBindGroupLayout(groupIndex); bgl->Reference(); return bgl; } diff --git a/src/dawn_native/Pipeline.h b/src/dawn_native/Pipeline.h index 29c838602b..d248e49d88 100644 --- a/src/dawn_native/Pipeline.h +++ b/src/dawn_native/Pipeline.h @@ -38,7 +38,7 @@ namespace dawn_native { wgpu::ShaderStage GetStageMask() const; PipelineLayoutBase* GetLayout(); const PipelineLayoutBase* GetLayout() const; - BindGroupLayoutBase* GetBindGroupLayout(uint32_t group); + BindGroupLayoutBase* GetBindGroupLayout(uint32_t groupIndex); protected: PipelineBase(DeviceBase* device, PipelineLayoutBase* layout, wgpu::ShaderStage stages);