From da21a6db7fd5eaadf8650ec35aaa3ef0a11880d9 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 15 Aug 2018 16:35:26 +0200 Subject: [PATCH] [d3d11] Silence warning about GenerateMips being called on buffers --- src/d3d11/d3d11_context.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 183a1a8a7..5739845ec 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -810,14 +810,13 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11DeviceContext::GenerateMips(ID3D11ShaderResourceView* pShaderResourceView) { auto view = static_cast(pShaderResourceView); - if (view->GetResourceType() != D3D11_RESOURCE_DIMENSION_BUFFER) { - EmitCs([cDstImageView = view->GetImageView()] - (DxvkContext* ctx) { - ctx->generateMipmaps(cDstImageView); - }); - } else { - Logger::err("D3D11: GenerateMips called on a buffer"); - } + if (view->GetResourceType() != D3D11_RESOURCE_DIMENSION_BUFFER) + return; + + EmitCs([cDstImageView = view->GetImageView()] + (DxvkContext* ctx) { + ctx->generateMipmaps(cDstImageView); + }); }