mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 22:24:13 +01:00
[dxvk] Add method to use a context's command list directly
Also provide the descriptor pool for convenience.
This commit is contained in:
parent
09284988ff
commit
1c06431e18
@ -112,7 +112,19 @@ namespace dxvk {
|
||||
this->beginRecording(
|
||||
m_device->createCommandList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
DxvkContextObjects DxvkContext::beginExternalRendering() {
|
||||
// Flush and invalidate everything
|
||||
endCurrentCommands();
|
||||
beginCurrentCommands();
|
||||
|
||||
DxvkContextObjects result;
|
||||
result.cmd = m_cmd;
|
||||
result.descriptorPool = m_descriptorPool;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::beginQuery(const Rc<DxvkGpuQuery>& query) {
|
||||
m_queryManager.enableQuery(m_cmd, query);
|
||||
|
@ -12,6 +12,17 @@
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
/**
|
||||
* \brief Context-provided objects
|
||||
*
|
||||
* Useful when submitting raw Vulkan commands to a command list.
|
||||
*/
|
||||
struct DxvkContextObjects {
|
||||
Rc<DxvkCommandList> cmd;
|
||||
Rc<DxvkDescriptorPool> descriptorPool;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \brief DXVK context
|
||||
*
|
||||
@ -25,7 +36,7 @@ namespace dxvk {
|
||||
|
||||
DxvkContext(const Rc<DxvkDevice>& device, DxvkContextType type);
|
||||
~DxvkContext();
|
||||
|
||||
|
||||
/**
|
||||
* \brief Begins command buffer recording
|
||||
*
|
||||
@ -67,6 +78,14 @@ namespace dxvk {
|
||||
*/
|
||||
void flushCommandList(DxvkSubmitStatus* status);
|
||||
|
||||
/**
|
||||
* \brief Begins external rendering
|
||||
*
|
||||
* Invalidates all state and provides the caller
|
||||
* with the objects necessary to start drawing.
|
||||
*/
|
||||
DxvkContextObjects beginExternalRendering();
|
||||
|
||||
/**
|
||||
* \brief Begins generating query data
|
||||
* \param [in] query The query to end
|
||||
|
Loading…
Reference in New Issue
Block a user