From 62a43cbdbe024ea6d41659f29d0394b7ef5e480f Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 20 Jan 2018 15:29:10 +0100 Subject: [PATCH] [d3d11] Add EmitCs method to D3D11DeviceContext Subsequently, all calls into the DXVK context will be replaced by calls to the EmitCs method with a lambda. --- src/d3d11/d3d11_context.h | 7 +++++++ src/d3d11/d3d11_context_imm.cpp | 1 + 2 files changed, 8 insertions(+) diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index 81343925..aad51309 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -1,6 +1,7 @@ #pragma once #include "../dxvk/dxvk_adapter.h" +#include "../dxvk/dxvk_cs.h" #include "../dxvk/dxvk_device.h" #include "d3d11_context_state.h" @@ -564,6 +565,12 @@ namespace dxvk { Rc CreateDefaultSampler(); + template + void EmitCs(Cmd&& command) { + // TODO push to CS chunk + command.execute(m_context.ptr()); + } + }; } diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index a8f8884f..ffc62d64 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -200,6 +200,7 @@ namespace dxvk { void D3D11ImmediateContext::Synchronize() { + // TODO sync with CS thread m_device->waitForIdle(); }