Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3d12: use correct __uuidof operator #7

Closed
wants to merge 1 commit into from

Conversation

slimsag
Copy link
Member

@slimsag slimsag commented Feb 18, 2022

This is a pending CL being sent upstream to dawn.googlesource.com.

Status:

Helps hexops/mach#86


It appears to be a typo that _uuidof (single underscore) was being used here
instead of __uuidof which is documented as the official operator by Microsoft:

https://docs.microsoft.com/en-us/cpp/cpp/uuidof-operator?view=msvc-170

Likely _uuidof and __uuidof are the same under msvc compilers, but Zig/clang/MinGW
compilers only expose the standard one and so this change improves compatability with
those compilers.

Signed-off-by: Stephen Gutekanst stephen@hexops.com

This code uses `_uuidof` (single undescore) instead of `__uuidof`
(two underscores), only the latter is documented as the officially
supported operator by Microsoft:

https://docs.microsoft.com/en-us/cpp/cpp/uuidof-operator?view=msvc-170

I suspect `_uuidof` and `__uuidof` are the same under the msvc compiler,
but in other compilers (Zig/clang/MinGW) only the officially supported
`__uuidof` is exposed. This change improves compatability with such
compilers.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Change-Id: If2850a1a98507161739fcd5f52ebd4ceaefffe75
@slimsag
Copy link
Member Author

slimsag commented Jul 24, 2022

CL merged upstream.

@slimsag slimsag closed this Jul 24, 2022
@slimsag slimsag deleted the sg/uuidof-operator branch July 24, 2022 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant