Fixed the DXR samples so they can run on (I'm wheezing) Surface Book 3. by sherief · Pull Request #676 · microsoft/DirectX-Graphics-Samples · GitHub
Skip to content

Fixed the DXR samples so they can run on (I'm wheezing) Surface Book 3.#676

Merged
sebmerry merged 1 commit into
microsoft:masterfrom
sherief:master
Dec 3, 2020
Merged

Fixed the DXR samples so they can run on (I'm wheezing) Surface Book 3.#676
sebmerry merged 1 commit into
microsoft:masterfrom
sherief:master

Conversation

@sherief

@sherief sherief commented Nov 27, 2020

Copy link
Copy Markdown
Contributor

Fixed the DXR samples so they can run on (I'm wheezing) Surface Book 3 and other MSHybrid systems.

@ghost

ghost commented Nov 27, 2020

Copy link
Copy Markdown

@sherief

sherief commented Nov 27, 2020

Copy link
Copy Markdown
Contributor Author

TL;DR on the CLA, code is in the public domain glhf.

{
throw exception("DXGI 1.6 not supported");
}
for (UINT adapterID = 0; DXGI_ERROR_NOT_FOUND != factory6->EnumAdapterByGpuPreference(adapterID, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, IID_PPV_ARGS(&adapter)); ++adapterID)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There was a recent fix to make this a little more robust. Change this:

DXGI_ERROR_NOT_FOUND != m_dxgiFactory->EnumAdapters1(adapterID, &adapter); ++adapterID)

to

SUCCEEDED(m_dxgiFactory->EnumAdapters1(adapterID, &adapter); ++adapterID))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That would definitely be an improvement, I'm only fixing one thing at (my own) time though, I don't think I will spend more time on this unless the core functionality of making it work on MSHybrid systems has issues.

@sherief

sherief commented Nov 28, 2020

Copy link
Copy Markdown
Contributor Author

I signed the CLA, should be merge-able as-is now.

@sherief

sherief commented Dec 2, 2020

Copy link
Copy Markdown
Contributor Author

Ping - any blockers on this?

@sebmerry

sebmerry commented Dec 3, 2020

Copy link
Copy Markdown
Member

I'll update adapter enumeration code for the DXR samples to bring it in line with the other samples.

@sebmerry sebmerry merged commit 06debb3 into microsoft:master Dec 3, 2020
@ghost

ghost commented Dec 16, 2020

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants