Closed kromenak closed 1 year ago
Thanks for the feedback. I'll review my use of IID_PPV_ARGS
in the tutorials/docs.
For Xbox, the Direct3D APIs are NOT "COM" based and have been changed significantly for performance on the fixed hardware of the console. As such, this breaks the standard IID_PPV_ARGS
macro. The IID_GRAPHICS_PPV_ARGS
macro was created for the console version, and you still use IID_PPV_ARGS
for WIC and other COM APIs even on console.
To make it easier to write portable code, I have this in DirectXHelpers.h
:
#ifndef IID_GRAPHICS_PPV_ARGS
#define IID_GRAPHICS_PPV_ARGS(x) IID_PPV_ARGS(x)
#endif
I'll run through and add a technical note for this issue.
Hello, I was going through the various DXTK12 tutorials on an Xbox One, and I ran into some trouble during the "Line drawing and anti aliasing" tutorial.
When implementing MSAA, the instructions specify using IID_PPV_ARGS for the various DX12 calls. However, this code failed to compile for Xbox One. After a bit of digging, I discovered that it did work if I used IID_GRAPHICS_PPV_ARGS instead.
I don't fully understand the need for IID_GRAPHICS_PPV_ARGS, and it isn't very well documented anywhere that I can find. I do see that DXTK12 uses this macro a lot internally, and DXTK12 also defines this macro if it is not defined.
When I run DX12 code on my desktop, I can use IID_PPV_ARGS just fine, so it seems like the need for IID_GRAPHICS_PPV_ARGS is maybe a console-only thing.
Anyway, it might be helpful to update the tutorial to use IID_GRAPHICS_PPV_ARGS, or maybe even add a technical note to the tutorial explaining the distinction.