From aafe08db5c545014f78d72f6affd6d6aec3ae27f Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 24 Jun 2017 05:44:32 -0700 Subject: [PATCH] libobs-d3d11: Fix potential issue rebuilding shared texture Sometimes when rebuilding a texture, it often has to fall back and create a temporary texture, but it'll fail when trying to create a shader resource for it. The suspicion is because it's due to not having the proper shader binding flag when creating that temporary texture, so this fixes that possible loophole. --- libobs-d3d11/d3d11-rebuild.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libobs-d3d11/d3d11-rebuild.cpp b/libobs-d3d11/d3d11-rebuild.cpp index c0b1c1315..d208fa855 100644 --- a/libobs-d3d11/d3d11-rebuild.cpp +++ b/libobs-d3d11/d3d11-rebuild.cpp @@ -40,6 +40,7 @@ void gs_texture_2d::RebuildSharedTextureFallback() td.Format = DXGI_FORMAT_B8G8R8A8_UNORM; td.ArraySize = 1; td.SampleDesc.Count = 1; + td.BindFlags = D3D11_BIND_SHADER_RESOURCE; width = td.Width; height = td.Height;