mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-18 22:54:15 +01:00
[d3d11] Validate bind flags for D3D11_RESOURCE_MISC_GENERATE_MIPS
This commit is contained in:
parent
63d8d9c3db
commit
ce03384ba9
@ -277,6 +277,11 @@ namespace dxvk {
|
||||
if (FAILED(DecodeSampleCount(pDesc->SampleDesc.Count, nullptr)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if ((pDesc->MiscFlags & D3D11_RESOURCE_MISC_GENERATE_MIPS)
|
||||
&& (pDesc->BindFlags & (D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET))
|
||||
!= (D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET))
|
||||
return E_INVALIDARG;
|
||||
|
||||
// Use the maximum possible mip level count if the supplied
|
||||
// mip level count is either unspecified (0) or invalid
|
||||
const uint32_t maxMipLevelCount = pDesc->SampleDesc.Count <= 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user