Skip to content

Conversation

@teoxoy
Copy link
Member

@teoxoy teoxoy commented Jan 23, 2026

Connections
Fixes Bug 2011999.
Regression from #8576.

Description
Adapt code to expect SM5.1.

Testing
-

Squash or Rebase?
n/a

Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

I'm confused about this. Is CheckFeatureSupport actually returning 5.1 without an error? I'm guessing that's buggy behavior from drivers that were written at the time?

@teoxoy
Copy link
Member Author

teoxoy commented Jan 23, 2026

It's intentional:

When used with the ID3D12Device::CheckFeatureSupport function, before calling the function initialize the HighestShaderModel field to the highest shader model that your application understands. After the function completes successfully, the HighestShaderModel field contains the highest shader model that is both supported by the device and no higher than the shader model passed in.

from https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_shader_model#remarks

@teoxoy teoxoy requested a review from ErichDonGubler January 23, 2026 17:09
Copy link
Member

@jimblandy jimblandy left a comment

Choose a reason for hiding this comment

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

This looks good to me. D3D_SHADER_MODEL_5_1 is the oldest value in the D3D_SHADER_MODEL enumeration.

@teoxoy teoxoy merged commit 723cb5d into gfx-rs:trunk Jan 26, 2026
52 checks passed
@teoxoy teoxoy deleted the d3d12-fix-sm51 branch January 26, 2026 09:50
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