mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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)))
|
if (FAILED(DecodeSampleCount(pDesc->SampleDesc.Count, nullptr)))
|
||||||
return E_INVALIDARG;
|
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
|
// Use the maximum possible mip level count if the supplied
|
||||||
// mip level count is either unspecified (0) or invalid
|
// mip level count is either unspecified (0) or invalid
|
||||||
const uint32_t maxMipLevelCount = pDesc->SampleDesc.Count <= 1
|
const uint32_t maxMipLevelCount = pDesc->SampleDesc.Count <= 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user