Skip to content

Commit

Permalink
[d3d9] Validate D3DCREATE_PUREDEVICE usage
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterSnowfall authored and misyltoad committed Jun 20, 2024
1 parent a276e13 commit e9fc071
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/d3d9/d3d9_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ namespace dxvk {
|| pPresentationParameters == nullptr)
return D3DERR_INVALIDCALL;

// creating a device with D3DCREATE_PUREDEVICE only works in conjunction
// with D3DCREATE_HARDWARE_VERTEXPROCESSING on native drivers
if (BehaviorFlags & D3DCREATE_PUREDEVICE &&
!(BehaviorFlags & D3DCREATE_HARDWARE_VERTEXPROCESSING))
return D3DERR_INVALIDCALL;

auto* adapter = GetAdapter(Adapter);

if (adapter == nullptr)
Expand Down

0 comments on commit e9fc071

Please sign in to comment.