-
Notifications
You must be signed in to change notification settings - Fork 792
Create new class to handle external validation, and rename existing dll loading class. #7514
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
Open
bob80905
wants to merge
54
commits into
microsoft:main
Choose a base branch
from
bob80905:create_DxcDllExtValidationSupport
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
d7d1936
implement stage 2
bob80905 c527502
add crucial headers
bob80905 7f7dc30
chore: autopublish 2025-06-06T00:27:21Z
github-actions[bot] e7ec854
address Tex non-header changes
bob80905 39f913c
handle includes
bob80905 3700bfd
swap include order
bob80905 33c88f9
address Tex, and make a flawed attempt at writing a unit test
bob80905 544a9c7
chore: autopublish 2025-06-18T04:25:45Z
github-actions[bot] eeb1516
validated that local test passes
bob80905 9800c91
address tex, update unit test
bob80905 a4c9629
ifdef for windows vs unix env var addition
bob80905 a9282fd
add wstring conversion stuff and env var resets
bob80905 e781627
address tex
bob80905 2915a8d
special casing for unix systems
bob80905 57dd853
address tex, make wstrings more universal too
bob80905 98b25af
add includes for _wgetenv
bob80905 c274e5b
remove wstring for simplicity
bob80905 b46def4
fix undeclared variables in non windows case, and pointer lifetime bug
bob80905 b76fab2
adjust for build errors
bob80905 89dcc4a
address final forgotten comments
bob80905 acbf68a
try removing unicode from cmakelists
bob80905 f2890f5
update comment Justin pointed out was outdated
bob80905 eb1e96f
remove Linux definitions from windows only testing, address ambiguity…
bob80905 36c33a2
do not inherit from DxcDllSupport
bob80905 6577046
add win32 preprocessor gate to allow non windows envs to build
bob80905 80b50a6
remove test from non-windows since it depends on wide strings
bob80905 bfc508f
remove friend, remove protected:
bob80905 a144ca1
address Damyan final concerns
bob80905 bd01fa5
try another way to emit an hresult
bob80905 647c946
try E_INVALIDARG
bob80905 a29f6ee
use an interface
bob80905 fffb407
fix nix error
bob80905 5411894
remove comment on header that is likely to become stale
bob80905 45f74fa
perform rename
bob80905 64f61a8
resolve merge conflicts
bob80905 ed23ada
update old class name
bob80905 2383541
rename to IDllLoader, rename to OverrideDll, remove defaulted functio…
bob80905 209582f
address all of Justin + Damyan 2c
bob80905 daf6f0a
add override
bob80905 c8d867e
add more overrides
bob80905 0aa3c8d
add virtual to destructor for HlslIntellisense
bob80905 15fceac
address Damyan: specify constructors in interface, remove cleanup fro…
bob80905 09be489
address Damyan
bob80905 be99192
Merge branch 'main' into create_DxcDllExtValidationSupport
bob80905 cba829b
we keep trying, this should be it
bob80905 17f26c6
clang format
bob80905 c0ee094
remove move ctor and copy ctor
bob80905 cdf321e
address all but justins last comment
bob80905 c8b704a
do a function rename
bob80905 965f78c
try undoing spirv change
bob80905 48fb6fa
remove unneeded forward decl
bob80905 b100acd
add DxCompilerDllLoader class, and use it
bob80905 f66408c
address Justin
bob80905 c8bebee
fix build err
bob80905 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "dxc/Support/dxcapi.use.h" | ||
#include <cassert> | ||
#include <string> | ||
|
||
namespace dxc { | ||
class DxcDllExtValidationLoader : public DllLoader { | ||
// DxCompilerSupport manages the | ||
// lifetime of dxcompiler.dll, while DxilExtValSupport | ||
// manages the lifetime of dxil.dll | ||
dxc::SpecificDllLoader DxCompilerSupport; | ||
dxc::SpecificDllLoader DxilExtValSupport; | ||
std::string DxilDllPath; | ||
|
||
public: | ||
std::string GetDxilDllPath() { return DxilDllPath; } | ||
bool DxilDllFailedToLoad() { | ||
tex3d marked this conversation as resolved.
Show resolved
Hide resolved
damyanp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return !DxilDllPath.empty() && !DxilExtValSupport.IsEnabled(); | ||
} | ||
|
||
HRESULT CreateInstanceImpl(REFCLSID clsid, REFIID riid, | ||
IUnknown **pResult) override; | ||
HRESULT CreateInstance2Impl(IMalloc *pMalloc, REFCLSID clsid, REFIID riid, | ||
IUnknown **pResult) override; | ||
|
||
HRESULT Initialize(); | ||
|
||
bool IsEnabled() const override { return DxCompilerSupport.IsEnabled(); } | ||
}; | ||
tex3d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} // namespace dxc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.