Add occlusionQuerySet for compatibility with upstream webgpu.h
Adds RenderPassDescriptor.occlusionQuerySet for struct compatibility with upstream webgpu.h, and validation errors that it's not used (since it's not implemented). Bug: dawn:22 Change-Id: I05ac75105038a0d7569cc720170e55f35b0f80d7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24620 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
0b43a803bf
commit
53405b54d5
|
@ -1162,7 +1162,8 @@
|
||||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
{"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},
|
||||||
|
{"name": "occlusion query set", "type": "query set", "optional": true}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"render pass encoder": {
|
"render pass encoder": {
|
||||||
|
|
|
@ -370,6 +370,10 @@ namespace dawn_native {
|
||||||
device, descriptor->depthStencilAttachment, width, height, sampleCount));
|
device, descriptor->depthStencilAttachment, width, height, sampleCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (descriptor->occlusionQuerySet != nullptr) {
|
||||||
|
return DAWN_VALIDATION_ERROR("occlusionQuerySet not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
if (descriptor->colorAttachmentCount == 0 &&
|
if (descriptor->colorAttachmentCount == 0 &&
|
||||||
descriptor->depthStencilAttachment == nullptr) {
|
descriptor->depthStencilAttachment == nullptr) {
|
||||||
return DAWN_VALIDATION_ERROR("Cannot use render pass with no attachments.");
|
return DAWN_VALIDATION_ERROR("Cannot use render pass with no attachments.");
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace utils {
|
||||||
|
|
||||||
std::array<wgpu::RenderPassColorAttachmentDescriptor, kMaxColorAttachments>
|
std::array<wgpu::RenderPassColorAttachmentDescriptor, kMaxColorAttachments>
|
||||||
cColorAttachments;
|
cColorAttachments;
|
||||||
wgpu::RenderPassDepthStencilAttachmentDescriptor cDepthStencilAttachmentInfo;
|
wgpu::RenderPassDepthStencilAttachmentDescriptor cDepthStencilAttachmentInfo = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BasicRenderPass {
|
struct BasicRenderPass {
|
||||||
|
|
Loading…
Reference in New Issue