Skip to content
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

Determine GPU type on DX11 when possible #3490

Merged
merged 1 commit into from Nov 28, 2020

Conversation

Diggsey
Copy link
Contributor

@Diggsey Diggsey commented Nov 28, 2020

Partially addresses #3489

From what I can tell there's no way to discover this via the DX11 APIs, so guess based on the vendor and device IDs. This can be expanded on later, but initially I've just set it to guess "integrated" for Intel GPUs and "discrete" for everything else, which probably covers >90% of the cases where this applies...

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

Nicely done!
Could you add a commit that bumps the backend version and adds a note to CHANGELOG, please?

@Diggsey
Copy link
Contributor Author

Diggsey commented Nov 28, 2020

Added 👍

@Diggsey Diggsey changed the title Guess GPU type on DX11 where it cannot be easily discovered Determine GPU type on DX11 when possible Nov 28, 2020
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Looking good! A couple of small logic issues but we're almost there :)

src/backend/dx11/src/dxgi.rs Outdated Show resolved Hide resolved
src/backend/dx11/src/dxgi.rs Outdated Show resolved Hide resolved
src/backend/dx11/src/dxgi.rs Outdated Show resolved Hide resolved
@Diggsey
Copy link
Contributor Author

Diggsey commented Nov 28, 2020

Updated

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

One more nit then we're good to go!

src/backend/dx11/src/dxgi.rs Outdated Show resolved Hide resolved
@cwfitzgerald
Copy link
Member

Thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 28, 2020

@bors bors bot merged commit 93ba8c2 into gfx-rs:hal-0.6 Nov 28, 2020
@Diggsey Diggsey deleted the dx11-detect-gpu-type branch November 28, 2020 22:38
@kvark
Copy link
Member

kvark commented Nov 28, 2020

@Diggsey please make the same PR against master, just exclude commit that had a version bump and changelog updates

bors bot added a commit that referenced this pull request Nov 30, 2020
3492: Determine GPU type on DX11 when possible r=kvark a=Diggsey

Cherry pick #3490 to master

Co-authored-by: Diggory Blake <diggsey@googlemail.com>
bors bot added a commit that referenced this pull request Nov 30, 2020
3485: Enable vulkan debug markers in release builds r=kvark a=fintelia

Fixes #3482 (at least for the Vulkan backend)
PR checklist:
- [x] `make` succeeds (on *nix)
- [ ] `make reftests` succeeds
- [ ] tested examples with the following backends:

3492: Determine GPU type on DX11 when possible r=kvark a=Diggsey

Cherry pick #3490 to master

Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
Co-authored-by: Diggory Blake <diggsey@googlemail.com>
bors bot added a commit that referenced this pull request Nov 30, 2020
3492: Determine GPU type on DX11 when possible r=kvark a=Diggsey

Cherry pick #3490 to master

Co-authored-by: Diggory Blake <diggsey@googlemail.com>
bors bot added a commit that referenced this pull request Nov 30, 2020
3492: Determine GPU type on DX11 when possible r=kvark a=Diggsey

Cherry pick #3490 to master

Co-authored-by: Diggory Blake <diggsey@googlemail.com>
bors bot added a commit that referenced this pull request Dec 1, 2020
3485: Enable vulkan debug markers in release builds r=kvark a=fintelia

Fixes #3482 (at least for the Vulkan backend)
PR checklist:
- [x] `make` succeeds (on *nix)
- [ ] `make reftests` succeeds
- [ ] tested examples with the following backends:

3492: Determine GPU type on DX11 when possible r=kvark a=Diggsey

Cherry pick #3490 to master

3493: [master/dx11] Increase max bound descriptor set count r=kvark a=cwfitzgerald

Rolls up #3487 now that wgpu is targeting master! Should be the last major rollup I need to do! Woooo!

I looked at #3449 again but I don't think master needs that change, it looks correct.

Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
Co-authored-by: Diggory Blake <diggsey@googlemail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
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.

None yet

3 participants