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