Skip to content

Commit

Permalink
[D3D12] Avoid use of D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE constan…
Browse files Browse the repository at this point in the history
…t to support older MSVC compilers.

Enum entry D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE is not defined in D3D SDK in MSVC16 environment.
Use bitwise OR combination (D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE) as alternative.
  • Loading branch information
LukasBanana committed Jun 30, 2024
1 parent cb3ddc7 commit 9b74ebd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static D3D12_RESOURCE_STATES GetD3D12BindingResourceState(const BindingDescripto
else if ((bindingDesc.stageFlags & StageFlags::FragmentStage) == 0)
return D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
else
return D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE;
return (D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
}
}
return D3D12_RESOURCE_STATE_COMMON;
Expand Down

0 comments on commit 9b74ebd

Please sign in to comment.