forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 08bacdb
committed
Rewrite ExternalValidationHelper
- Use ReadDxcOpts for argument parsing
- The conditions for when to add -Vd or -validator-version and when to run the validator are a bit more subtle, new ExtValidationArgHelper class handles this.
- Use DXC_MICROCOM_TM_ALLOC macro for adding a static Alloc method to the wrapper class and follow standard argument ordering where IMalloc is first.
- Use DoBasicQueryInterface variadic template for QueryInterface implementation
- Handle all compiler object interfaces properly by wrapping each QueryInterface result in a new wrapper instance, keeping track of the current interface pointer as an IUnknown, and upcasting appropriately for methods.
- COM interface methods: don't leak exceptions, handle IDxcResult properly, use the DxcThreadMalloc for any allocations during the method call
- DxcInitThreadMalloc() needs to be called once for the process (already should be handled for dxc.exe), you shouldn't be using DxcCoGetMalloc directly.
- Let the compiler and wrapper objects decide if they support various interfaces, no special interface logic inside DxcDllExtValidationLoader
- CreateInstance[2] pass-throughs must preserve original riid, not presume a particular interface; don't use template method.
- You don't want to create two compilers to wrap, you should be creating one, using the riid passed in for the interface to select.
- Expand interface support to full set supported by the compiler object1 parent 08447f1 commit 08bacdbCopy full SHA for 08bacdb
File tree
Expand file treeCollapse file tree
1 file changed
+416
-299
lines changedOpen diff view settings
Filter options
- lib/DxcSupport
Expand file treeCollapse file tree
1 file changed
+416
-299
lines changedOpen diff view settings
0 commit comments