mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Make TextureDescriptor match WebGPU IDL
This patch updates the definition of TextureDescriptor to make it match WebGPU IDL: 1. Rename 'arrayLayer' to 'arraySize' 2. Add the missing member "sampleCount" and check that currently sampleCount can only be 1. BUG=dawn:56 TEST=dawn_unittests Change-Id: I642186529f045865ae344cb5545ac80e14445c59 Reviewed-on: https://dawn-review.googlesource.com/c/3180 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
d86edb310a
commit
8bff3b22be
@@ -54,7 +54,8 @@ void initTextures() {
|
||||
descriptor.size.width = 1024;
|
||||
descriptor.size.height = 1024;
|
||||
descriptor.size.depth = 1;
|
||||
descriptor.arrayLayer = 1;
|
||||
descriptor.arraySize = 1;
|
||||
descriptor.sampleCount = 1;
|
||||
descriptor.format = dawn::TextureFormat::R8G8B8A8Unorm;
|
||||
descriptor.levelCount = 1;
|
||||
descriptor.usage = dawn::TextureUsageBit::TransferDst | dawn::TextureUsageBit::Sampled;
|
||||
|
||||
@@ -141,7 +141,8 @@ dawn::TextureView CreateDefaultDepthStencilView(const dawn::Device& device) {
|
||||
descriptor.size.width = 640;
|
||||
descriptor.size.height = 480;
|
||||
descriptor.size.depth = 1;
|
||||
descriptor.arrayLayer = 1;
|
||||
descriptor.arraySize = 1;
|
||||
descriptor.sampleCount = 1;
|
||||
descriptor.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
descriptor.levelCount = 1;
|
||||
descriptor.usage = dawn::TextureUsageBit::OutputAttachment;
|
||||
|
||||
@@ -395,7 +395,8 @@ namespace {
|
||||
descriptor.size.width = iImage.width;
|
||||
descriptor.size.height = iImage.height;
|
||||
descriptor.size.depth = 1;
|
||||
descriptor.arrayLayer = 1;
|
||||
descriptor.arraySize = 1;
|
||||
descriptor.sampleCount = 1;
|
||||
descriptor.format = format;
|
||||
descriptor.levelCount = 1;
|
||||
descriptor.usage = dawn::TextureUsageBit::TransferDst | dawn::TextureUsageBit::Sampled;
|
||||
|
||||
Reference in New Issue
Block a user