Deprecation changes to rename some FilterMode enums to MipmapFilterMode.

Change-Id: I0df2677cfd454a2f38e580acd08089694486f6ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128680
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
Loko Kung 2023-04-25 16:03:22 +00:00 committed by Dawn LUCI CQ
parent 03f9f5f538
commit 654416e15b
2 changed files with 15 additions and 0 deletions

View File

@ -69,6 +69,9 @@ typedef uint32_t {{c_prefix}}Flags;
typedef enum {{as_cType(type.name)}} {
{% for value in type.values %}
{{as_cEnum(type.name, value.name)}} = 0x{{format(value.value, "08X")}},
{% if ("dawn" in enabled_tags) and (type == types["filter mode"]) %}
WGPUMipmapFilterMode_{{value.name.CamelCase()}} = 0x{{format(value.value, "08X")}},
{% endif %}
{% endfor %}
{{as_cEnum(type.name, Name("force32"))}} = 0x7FFFFFFF
} {{as_cType(type.name)}};
@ -78,6 +81,12 @@ typedef uint32_t {{c_prefix}}Flags;
{% endfor -%}
// Special case definition of MipmapFilterMode for Dawn side.
// TODO(lokokung) Remove once Chromium side is updated.
{% if 'dawn' in enabled_tags %}
typedef WGPUFilterMode WGPUMipmapFilterMode;
{% endif %}
typedef struct {{c_prefix}}ChainedStruct {
struct {{c_prefix}}ChainedStruct const * next;
{{c_prefix}}SType sType;

View File

@ -49,6 +49,12 @@ namespace {{metadata.namespace}} {
{% endfor %}
// Special case definition of MipmapFilterMode for Dawn side.
// TODO(lokokung) Remove once Chromium side is updated.
{% if 'dawn' in enabled_tags %}
using MipmapFilterMode = FilterMode;
{% endif %}
{% for type in by_category["bitmask"] %}
enum class {{as_cppType(type.name)}} : uint32_t {
{% for value in type.values %}