Skip to content

Conversation

@damyanp
Copy link
Member

@damyanp damyanp commented Dec 2, 2025

The original AgilitySDK API only allowed paths relative to the process's executable to be used to specificy the location of the AgilitySDK. So, previously, if we wanted to use a specific AgilitySDK with the execution tests we had to arrange for the AgilitySDK's dlls to be placed in a subdirectory underneath TAEF's te.exe. This required a convoluted dance involving finding and copying TAEF executables somewhere that could be owned by the testing process.

This change makes it so we can use ID3D12DeviceFactory - which allows the AgilitySDK location to be specified using absolute paths.

A new class, D3D12SDKSelector, is added to help manage this, as well as falling back to using the old-style AgilitySDK and the inbox D3D12.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@damyanp damyanp marked this pull request as ready for review December 2, 2025 23:53
TAEF will fail the test if LogError is used.
Copy link
Member

@hekota hekota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a few suggestions.

Copy link
Member

@hekota hekota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The PR description should be updated with the new name D3D12SDKSelector. :)

Copy link
Contributor

@alsepkow alsepkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A few minor nits.

///
/// 1: auto-detect (fail if unable to use the auto-detected version)
///
/// >1: use specified version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// >1: use specified version
/// 1: use specified version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to say "values greater than 1 mean use the specified version". Does that change the suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, yes!

}

std::vector<UUID> Features;
static bool isExperimentalShadersEnabled() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Name sounds weird.

'areExperimentalShadersEnabled' or 'experimentalShadersEnabled' ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I actually thought hard about this one and although it sounds weird I decided "is" is correct, since the thing we're enabling is the "experimental shaders" feature (and there's only one feature being enabled here).

DebugController->EnableDebugLayer();
HR = S_OK;
D3D12SDKSelector::~D3D12SDKSelector() {
if (DeviceFactory) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need an explicit Release call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is a bit odd because of the bug we're working around. The requirement before calling FreeUnusedSDKs is that we've released all of the objects that were created from the SDK we're going to release - and the last one of those we have left at this point is the DeviceFactory, hence the explicit release.

Copy link
Contributor

@alsepkow alsepkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@damyanp damyanp enabled auto-merge (squash) December 4, 2025 23:06
@damyanp damyanp merged commit 39d2165 into main Dec 5, 2025
13 checks passed
@damyanp damyanp deleted the user/damyanp/testlab branch December 5, 2025 00:40
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants