diff --git a/gfx/layers/mlgpu/MLGDevice.h b/gfx/layers/mlgpu/MLGDevice.h index 1228a3d1a2d7..c386d99c9b6e 100644 --- a/gfx/layers/mlgpu/MLGDevice.h +++ b/gfx/layers/mlgpu/MLGDevice.h @@ -424,6 +424,12 @@ public: return mMaxConstantBufferBindSize; } + // Helper function for unbinding textures since SetPSTexture is overloaded. + void UnsetPSTexture(uint32_t aSlot) { + TextureSource* nullTexture = nullptr; + SetPSTexture(aSlot, nullTexture); + } + protected: virtual ~MLGDevice(); diff --git a/gfx/layers/mlgpu/RenderViewMLGPU.cpp b/gfx/layers/mlgpu/RenderViewMLGPU.cpp index 79828f71994a..4afbee541af3 100644 --- a/gfx/layers/mlgpu/RenderViewMLGPU.cpp +++ b/gfx/layers/mlgpu/RenderViewMLGPU.cpp @@ -383,6 +383,9 @@ RenderViewMLGPU::ExecuteRendering() return; } + // Note: we unbind slot 0 (which is where the render target could have been + // bound on a previous frame). Otherwise we trigger D3D11_DEVICE_PSSETSHADERRESOURCES_HAZARD. + mDevice->UnsetPSTexture(0); mDevice->SetRenderTarget(mTarget); mDevice->SetViewport(IntRect(IntPoint(0, 0), mTarget->GetSize())); mDevice->SetScissorRect(Some(mInvalidBounds)); diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index 2c2d033f6122..cc1dc02a7d98 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -438,6 +438,17 @@ DeviceManagerDx::CreateDevice(IDXGIAdapter* aAdapter, if (!SUCCEEDED(debug->QueryInterface(__uuidof(ID3D11InfoQueue), getter_AddRefs(infoQueue)))) break; + D3D11_INFO_QUEUE_FILTER filter; + PodZero(&filter); + + // Disable warnings caused by Advanced Layers that are known and not problematic. + D3D11_MESSAGE_ID blockIDs[] = { + D3D11_MESSAGE_ID_DEVICE_DRAW_CONSTANT_BUFFER_TOO_SMALL + }; + filter.DenyList.NumIDs = MOZ_ARRAY_LENGTH(blockIDs); + filter.DenyList.pIDList = blockIDs; + infoQueue->PushStorageFilter(&filter); + infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_CORRUPTION, true); infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true); infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_WARNING, true);