mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 04:08:52 +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
@ -114,6 +114,18 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
*
|
||||
@ -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