mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
Support chained extension structs on the wire
This CL also adds a couple of dummy extensions in dawn.json so that the serialization/deserialization in the wire can be tested. Bug: dawn:369 Change-Id: I5ec3853c286f45d9b04e8bf9d04ebd9176dc917b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18520 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
2479860e4b
commit
76a8d0b92f
@@ -204,7 +204,13 @@ namespace wgpu {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
{% endif %}
|
||||
{% for member in type.members %}
|
||||
{{as_annotated_cppType(member)}}{{render_cpp_default_value(member)}};
|
||||
{% set member_declaration = as_annotated_cppType(member) + render_cpp_default_value(member) %}
|
||||
{% if type.chained and loop.first %}
|
||||
//* Align the first member to ChainedStruct to match the C struct layout.
|
||||
alignas(ChainedStruct) {{member_declaration}};
|
||||
{% else %}
|
||||
{{member_declaration}};
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user