ProcTable: only cast the return value if needed.
Fence::GetCompletedValue introduced the first return value that's not an object which reinterpret_cast to its own type. MSVC complains about it, so instead we reinterpret_cast only if the value is an object. BUG= Change-Id: I35225cd1ff47a91868572a45a67ebe979e4b064f Reviewed-on: https://dawn-review.googlesource.com/c/2942 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
bdd887fce7
commit
5aacd29d5e
|
@ -159,7 +159,11 @@ namespace dawn_native {
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
);
|
);
|
||||||
{% if method.return_type.name.canonical_case() != "void" %}
|
{% if method.return_type.name.canonical_case() != "void" %}
|
||||||
|
{% if method.return_type.category == "object" %}
|
||||||
return reinterpret_cast<{{as_cType(method.return_type.name)}}>(result);
|
return reinterpret_cast<{{as_cType(method.return_type.name)}}>(result);
|
||||||
|
{% else %}
|
||||||
|
return result;
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue