Add missing optional label member to descriptors
This CL adds missing optional label members to all descriptors. It is not used yet but needed from the WebGPU side. Bug: dawn:22 Change-Id: I103870f9207eed8168bc2245294888af4e1edd9f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11720 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
3fd022ef60
commit
277d2e15d5
22
dawn.json
22
dawn.json
|
@ -41,6 +41,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "layout", "type": "bind group layout"},
|
||||
{"name": "binding count", "type": "uint32_t"},
|
||||
{"name": "bindings", "type": "bind group binding", "annotation": "const*", "length": "binding count"}
|
||||
|
@ -66,6 +67,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "binding count", "type": "uint32_t"},
|
||||
{"name": "bindings", "type": "bind group layout binding", "annotation": "const*", "length": "binding count"}
|
||||
]
|
||||
|
@ -181,6 +183,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "usage", "type": "buffer usage"},
|
||||
{"name": "size", "type": "uint64_t"}
|
||||
]
|
||||
|
@ -338,7 +341,9 @@
|
|||
"command encoder descriptor": {
|
||||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": []
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
|
||||
]
|
||||
},
|
||||
"compare function": {
|
||||
"category": "enum",
|
||||
|
@ -421,6 +426,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "layout", "type": "pipeline layout"},
|
||||
{"name": "compute stage", "type": "pipeline stage descriptor"}
|
||||
]
|
||||
|
@ -648,6 +654,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "initial value", "type": "uint64_t", "default": "0"}
|
||||
]
|
||||
},
|
||||
|
@ -739,6 +746,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "bind group layout count", "type": "uint32_t"},
|
||||
{"name": "bind group layouts", "type": "bind group layout", "annotation": "const*", "length": "bind group layout count"}
|
||||
]
|
||||
|
@ -900,13 +908,16 @@
|
|||
"render bundle descriptor": {
|
||||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": []
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
|
||||
]
|
||||
},
|
||||
|
||||
"render bundle encoder descriptor": {
|
||||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "color formats count", "type": "uint32_t"},
|
||||
{"name": "color formats", "type": "texture format", "annotation": "const*", "length": "color formats count"},
|
||||
{"name": "depth stencil format", "type": "texture format", "default": "undefined"},
|
||||
|
@ -941,6 +952,7 @@
|
|||
"render pass descriptor": {
|
||||
"category": "structure",
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "color attachment count", "type": "uint32_t"},
|
||||
{"name": "color attachments", "type": "render pass color attachment descriptor", "annotation": "const*", "length": "color attachment count"},
|
||||
{"name": "depth stencil attachment", "type": "render pass depth stencil attachment descriptor", "annotation": "const*", "optional": true}
|
||||
|
@ -1080,6 +1092,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "layout", "type": "pipeline layout"},
|
||||
{"name": "vertex stage", "type": "pipeline stage descriptor"},
|
||||
{"name": "fragment stage", "type": "pipeline stage descriptor", "annotation": "const*", "optional": true},
|
||||
|
@ -1101,6 +1114,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "address mode u", "type": "address mode", "default": "clamp to edge"},
|
||||
{"name": "address mode v", "type": "address mode", "default": "clamp to edge"},
|
||||
{"name": "address mode w", "type": "address mode", "default": "clamp to edge"},
|
||||
|
@ -1119,6 +1133,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "code size", "type": "uint32_t"},
|
||||
{"name": "code", "type": "uint32_t", "annotation": "const*", "length": "code size"}
|
||||
]
|
||||
|
@ -1183,6 +1198,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "implementation", "type": "uint64_t"}
|
||||
]
|
||||
},
|
||||
|
@ -1231,6 +1247,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "usage", "type": "texture usage"},
|
||||
{"name": "dimension", "type": "texture dimension", "default": "2D"},
|
||||
{"name": "size", "type": "extent 3D"},
|
||||
|
@ -1328,6 +1345,7 @@
|
|||
"category": "structure",
|
||||
"extensible": true,
|
||||
"members": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "format", "type": "texture format", "default": "undefined"},
|
||||
{"name": "dimension", "type": "texture view dimension", "default": "undefined"},
|
||||
{"name": "base mip level", "type": "uint32_t", "default": "0"},
|
||||
|
|
|
@ -31,6 +31,7 @@ void init() {
|
|||
{
|
||||
DawnSwapChainDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.implementation = GetSwapChainImplementation();
|
||||
swapchain = dawnDeviceCreateSwapChain(device, &descriptor);
|
||||
}
|
||||
|
@ -59,6 +60,7 @@ void init() {
|
|||
|
||||
{
|
||||
DawnRenderPipelineDescriptor descriptor;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.nextInChain = nullptr;
|
||||
|
||||
descriptor.vertexStage.nextInChain = nullptr;
|
||||
|
@ -89,6 +91,7 @@ void init() {
|
|||
|
||||
DawnPipelineLayoutDescriptor pl;
|
||||
pl.nextInChain = nullptr;
|
||||
pl.label = nullptr;
|
||||
pl.bindGroupLayoutCount = 0;
|
||||
pl.bindGroupLayouts = nullptr;
|
||||
descriptor.layout = dawnDeviceCreatePipelineLayout(device, &pl);
|
||||
|
@ -126,6 +129,7 @@ void frame() {
|
|||
DawnTexture backbuffer = dawnSwapChainGetNextTexture(swapchain);
|
||||
DawnTextureView backbufferView = dawnTextureCreateView(backbuffer, nullptr);
|
||||
DawnRenderPassDescriptor renderpassInfo;
|
||||
renderpassInfo.label = nullptr;
|
||||
DawnRenderPassColorAttachmentDescriptor colorAttachment;
|
||||
{
|
||||
colorAttachment.attachment = backbufferView;
|
||||
|
|
|
@ -40,6 +40,7 @@ static DawnProcDeviceCreateSwapChain originalDeviceCreateSwapChain = nullptr;
|
|||
DawnSwapChain ErrorDeviceCreateSwapChain(DawnDevice device, const DawnSwapChainDescriptor*) {
|
||||
DawnSwapChainDescriptor desc;
|
||||
desc.nextInChain = nullptr;
|
||||
desc.label = nullptr;
|
||||
// A 0 implementation will trigger a swapchain creation error.
|
||||
desc.implementation = 0;
|
||||
return originalDeviceCreateSwapChain(device, &desc);
|
||||
|
|
|
@ -99,6 +99,7 @@ class WireBufferMappingTests : public WireTest {
|
|||
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = kBufferSize;
|
||||
|
||||
apiBuffer = api.GetNewBuffer();
|
||||
|
@ -505,6 +506,7 @@ TEST_F(WireBufferMappingTests, DestroyInsideMapWriteCallback) {
|
|||
TEST_F(WireBufferMappingTests, CreateBufferMappedSuccess) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = 4;
|
||||
|
||||
DawnBuffer apiBuffer = api.GetNewBuffer();
|
||||
|
@ -532,6 +534,7 @@ TEST_F(WireBufferMappingTests, CreateBufferMappedSuccess) {
|
|||
TEST_F(WireBufferMappingTests, ReleaseAfterCreateBufferMapped) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = 4;
|
||||
|
||||
DawnBuffer apiBuffer = api.GetNewBuffer();
|
||||
|
@ -559,6 +562,7 @@ TEST_F(WireBufferMappingTests, ReleaseAfterCreateBufferMapped) {
|
|||
TEST_F(WireBufferMappingTests, CreateBufferMappedThenMapSuccess) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = 4;
|
||||
|
||||
DawnBuffer apiBuffer = api.GetNewBuffer();
|
||||
|
@ -603,6 +607,7 @@ TEST_F(WireBufferMappingTests, CreateBufferMappedThenMapSuccess) {
|
|||
TEST_F(WireBufferMappingTests, CreateBufferMappedThenMapFailure) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = 4;
|
||||
|
||||
DawnBuffer apiBuffer = api.GetNewBuffer();
|
||||
|
@ -645,6 +650,7 @@ TEST_F(WireBufferMappingTests, CreateBufferMappedThenMapFailure) {
|
|||
TEST_F(WireBufferMappingTests, CreateBufferMappedAsyncSuccess) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = kBufferSize;
|
||||
|
||||
DawnCreateBufferMappedResult apiResult;
|
||||
|
@ -688,6 +694,7 @@ TEST_F(WireBufferMappingTests, CreateBufferMappedAsyncSuccess) {
|
|||
TEST_F(WireBufferMappingTests, CreateBufferMappedAsyncMapError) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
|
||||
DawnCreateBufferMappedResult apiResult;
|
||||
apiResult.buffer = apiBuffer;
|
||||
|
@ -720,6 +727,7 @@ TEST_F(WireBufferMappingTests, CreateBufferMappedAsyncMapError) {
|
|||
TEST_F(WireBufferMappingTests, UnmapInsideCreateBufferMappedAsyncCallback) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = kBufferSize;
|
||||
|
||||
DawnCreateBufferMappedResult apiResult;
|
||||
|
@ -757,6 +765,7 @@ TEST_F(WireBufferMappingTests, UnmapInsideCreateBufferMappedAsyncCallback) {
|
|||
TEST_F(WireBufferMappingTests, ReleaseInsideCreateBufferMappedAsyncCallback) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = kBufferSize;
|
||||
|
||||
DawnCreateBufferMappedResult apiResult;
|
||||
|
@ -794,6 +803,7 @@ TEST_F(WireBufferMappingTests, ReleaseInsideCreateBufferMappedAsyncCallback) {
|
|||
TEST_F(WireBufferMappingTests, DestroyInsideCreateBufferMappedAsyncCallback) {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = kBufferSize;
|
||||
|
||||
DawnCreateBufferMappedResult apiResult;
|
||||
|
|
|
@ -51,8 +51,9 @@ class WireFenceTests : public WireTest {
|
|||
}
|
||||
{
|
||||
DawnFenceDescriptor descriptor;
|
||||
descriptor.initialValue = 1;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.initialValue = 1;
|
||||
|
||||
apiFence = api.GetNewFence();
|
||||
fence = dawnQueueCreateFence(queue, &descriptor);
|
||||
|
|
|
@ -157,6 +157,7 @@ class WireMemoryTransferServiceTests : public WireTest {
|
|||
std::pair<DawnBuffer, DawnBuffer> CreateBuffer() {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = sizeof(mBufferContent);
|
||||
|
||||
DawnBuffer apiBuffer = api.GetNewBuffer();
|
||||
|
@ -172,6 +173,7 @@ class WireMemoryTransferServiceTests : public WireTest {
|
|||
std::pair<DawnCreateBufferMappedResult, DawnCreateBufferMappedResult> CreateBufferMapped() {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = sizeof(mBufferContent);
|
||||
|
||||
DawnBuffer apiBuffer = api.GetNewBuffer();
|
||||
|
@ -193,6 +195,7 @@ class WireMemoryTransferServiceTests : public WireTest {
|
|||
DawnCreateBufferMappedResult CreateBufferMappedAsync() {
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = sizeof(mBufferContent);
|
||||
|
||||
dawnDeviceCreateBufferMappedAsync(device, &descriptor, ToMockCreateBufferMappedCallback,
|
||||
|
@ -882,6 +885,7 @@ TEST_F(WireMemoryTransferServiceTests, CreateBufferMappedAsyncWriteHandleCreatio
|
|||
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = sizeof(mBufferContent);
|
||||
|
||||
// Failed creation of a WriteHandle is a fatal failure. The client synchronously receives
|
||||
|
@ -1036,6 +1040,7 @@ TEST_F(WireMemoryTransferServiceTests, CreateBufferMappedWriteHandleCreationFail
|
|||
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = sizeof(mBufferContent);
|
||||
|
||||
DawnCreateBufferMappedResult result = dawnDeviceCreateBufferMapped(device, &descriptor);
|
||||
|
@ -1081,6 +1086,7 @@ TEST_F(WireMemoryTransferServiceTests, CreateBufferMappedHandleOpenFailure) {
|
|||
|
||||
DawnBufferDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.label = nullptr;
|
||||
descriptor.size = sizeof(mBufferContent);
|
||||
|
||||
DawnCreateBufferMappedResult result = dawnDeviceCreateBufferMapped(device, &descriptor);
|
||||
|
|
|
@ -28,6 +28,7 @@ class WireOptionalTests : public WireTest {
|
|||
TEST_F(WireOptionalTests, OptionalObjectValue) {
|
||||
DawnBindGroupLayoutDescriptor bglDesc;
|
||||
bglDesc.nextInChain = nullptr;
|
||||
bglDesc.label = nullptr;
|
||||
bglDesc.bindingCount = 0;
|
||||
DawnBindGroupLayout bgl = dawnDeviceCreateBindGroupLayout(device, &bglDesc);
|
||||
|
||||
|
@ -44,6 +45,7 @@ TEST_F(WireOptionalTests, OptionalObjectValue) {
|
|||
|
||||
DawnBindGroupDescriptor bgDesc;
|
||||
bgDesc.nextInChain = nullptr;
|
||||
bgDesc.label = nullptr;
|
||||
bgDesc.layout = bgl;
|
||||
bgDesc.bindingCount = 1;
|
||||
bgDesc.bindings = &binding;
|
||||
|
@ -69,6 +71,7 @@ TEST_F(WireOptionalTests, OptionalStructPointer) {
|
|||
// Create shader module
|
||||
DawnShaderModuleDescriptor vertexDescriptor;
|
||||
vertexDescriptor.nextInChain = nullptr;
|
||||
vertexDescriptor.label = nullptr;
|
||||
vertexDescriptor.codeSize = 0;
|
||||
DawnShaderModule vsModule = dawnDeviceCreateShaderModule(device, &vertexDescriptor);
|
||||
DawnShaderModule apiVsModule = api.GetNewShaderModule();
|
||||
|
@ -122,6 +125,7 @@ TEST_F(WireOptionalTests, OptionalStructPointer) {
|
|||
// Create the pipeline layout
|
||||
DawnPipelineLayoutDescriptor layoutDescriptor;
|
||||
layoutDescriptor.nextInChain = nullptr;
|
||||
layoutDescriptor.label = nullptr;
|
||||
layoutDescriptor.bindGroupLayoutCount = 0;
|
||||
layoutDescriptor.bindGroupLayouts = nullptr;
|
||||
DawnPipelineLayout layout = dawnDeviceCreatePipelineLayout(device, &layoutDescriptor);
|
||||
|
@ -131,6 +135,7 @@ TEST_F(WireOptionalTests, OptionalStructPointer) {
|
|||
// Create pipeline
|
||||
DawnRenderPipelineDescriptor pipelineDescriptor;
|
||||
pipelineDescriptor.nextInChain = nullptr;
|
||||
pipelineDescriptor.label = nullptr;
|
||||
|
||||
pipelineDescriptor.vertexStage.nextInChain = nullptr;
|
||||
pipelineDescriptor.vertexStage.module = vsModule;
|
||||
|
|
Loading…
Reference in New Issue