1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-25 05:52:12 +01:00
dxvk/src/d3d11/d3d11_cmdlist.h
Philip Rebohle bc1384b7b4
[d3d11] Issue warning when using a command list more than once
The way buffers are invalidated can cause issues when the same command
list is submitted multiple times. Games don't seem to need this right
now.
2018-06-29 12:44:52 +02:00

49 lines
1.0 KiB
C++

#pragma once
#include "d3d11_context.h"
namespace dxvk {
class D3D11CommandList : public D3D11DeviceChild<ID3D11CommandList> {
public:
D3D11CommandList(
D3D11Device* pDevice,
UINT ContextFlags);
~D3D11CommandList();
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;
void STDMETHODCALLTYPE GetDevice(
ID3D11Device **ppDevice) final;
UINT STDMETHODCALLTYPE GetContextFlags() final;
void AddChunk(
Rc<DxvkCsChunk>&& Chunk);
void EmitToCommandList(
ID3D11CommandList* pCommandList);
void EmitToCsThread(
DxvkCsThread* CsThread);
private:
D3D11Device* const m_device;
UINT const m_contextFlags;
std::vector<Rc<DxvkCsChunk>> m_chunks;
std::atomic<bool> m_submitted = { false };
std::atomic<bool> m_warned = { false };
void MarkSubmitted();
};
}