mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-10 14:46:14 +01:00
Ex texture loaders updated with additional parameter validation (#142)
This commit is contained in:
@@ -638,6 +638,9 @@ HRESULT DirectX::CreateShaderResourceViewEx(
|
||||
|
||||
*ppSRV = nullptr;
|
||||
|
||||
if (!(bindFlags & D3D11_BIND_SHADER_RESOURCE))
|
||||
return E_INVALIDARG;
|
||||
|
||||
ComPtr<ID3D11Resource> resource;
|
||||
HRESULT hr = CreateTextureEx(pDevice, srcImages, nimages, metadata,
|
||||
usage, bindFlags, cpuAccessFlags, miscFlags, forceSRGB,
|
||||
|
||||
Reference in New Issue
Block a user