dawn_native: deduplicate pipeline layouts

This is the first step to do pipeline deduplication. It also introduces
tests for deduplication.

BUG=dawn:143

Change-Id: Ib22496f543f8d1f9cfde04f725612504132c7d72
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2019-05-01 12:57:27 +00:00
committed by Commit Bot service account
parent cc141797df
commit 0ee9859c91
11 changed files with 160 additions and 29 deletions

View File

@@ -278,7 +278,7 @@ namespace utils {
dawn::PipelineLayout MakeBasicPipelineLayout(const dawn::Device& device,
const dawn::BindGroupLayout* bindGroupLayout) {
dawn::PipelineLayoutDescriptor descriptor;
if (bindGroupLayout) {
if (bindGroupLayout != nullptr) {
descriptor.bindGroupLayoutCount = 1;
descriptor.bindGroupLayouts = bindGroupLayout;
} else {