Merge BindGroupLayout and ShaderModule BindingInfos

This moves BindGroupLayoutBase::BindingInfo into the dawn_native
namespace and changes ShaderModule::BindingInfo to extend it with
SPIR-V ids.

Bug: dawn:354
Change-Id: I6a2187e94c0200bee729cf8290f74e4f8c648334
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17920
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Austin Eng
2020-03-27 18:54:03 +00:00
committed by Commit Bot service account
parent ba53617f6f
commit 06508118eb
24 changed files with 66 additions and 66 deletions

View File

@@ -243,7 +243,7 @@ namespace dawn_native { namespace opengl {
for (BindingIndex bindingIndex = 0;
bindingIndex < group->GetLayout()->GetBindingCount(); ++bindingIndex) {
const BindGroupLayoutBase::BindingInfo& bindingInfo =
const BindingInfo& bindingInfo =
group->GetLayout()->GetBindingInfo(bindingIndex);
switch (bindingInfo.type) {

View File

@@ -179,10 +179,10 @@ namespace dawn_native { namespace opengl {
const BindGroupLayoutBase* bgl =
layout->GetBindGroupLayout(combined.textureLocation.group);
wgpu::TextureComponentType componentType =
Format::Type componentType =
bgl->GetBindingInfo(bgl->GetBindingIndex(combined.textureLocation.binding))
.textureComponentType;
bool shouldUseFiltering = componentType == wgpu::TextureComponentType::Float;
bool shouldUseFiltering = componentType == Format::Type::Float;
GLuint samplerIndex =
indices[combined.samplerLocation.group][combined.samplerLocation.binding];