mirror of https://github.com/AxioDL/boo.git
Add commitPendingTransaction
This commit is contained in:
parent
c7c1162bd3
commit
c6aed360e6
|
@ -280,6 +280,7 @@ struct IGraphicsDataFactory {
|
|||
virtual void lazyCommitTransaction(const std::function<bool(Context& ctx)>& f __BooTraceArgs) {
|
||||
commitTransaction(f __BooTraceArgsUse);
|
||||
}
|
||||
virtual void commitPendingTransaction() {}
|
||||
virtual ObjToken<IGraphicsBufferD> newPoolBuffer(BufferUse use, size_t stride, size_t count __BooTraceArgs) = 0;
|
||||
virtual void setDisplayGamma(float gamma) = 0;
|
||||
virtual bool isTessellationSupported(uint32_t& maxPatchSizeOut) = 0;
|
||||
|
|
|
@ -136,6 +136,7 @@ public:
|
|||
|
||||
void commitTransaction(const FactoryCommitFunc& __BooTraceArgs) override;
|
||||
void lazyCommitTransaction(const FactoryCommitFunc& __BooTraceArgs) override;
|
||||
void commitPendingTransaction() override;
|
||||
|
||||
boo::ObjToken<IGraphicsBufferD> newPoolBuffer(BufferUse use, size_t stride, size_t count __BooTraceArgs) override;
|
||||
|
||||
|
@ -3800,10 +3801,7 @@ void VulkanDataFactoryImpl::commitTransaction(
|
|||
if (!trans(ctx)) {
|
||||
return;
|
||||
}
|
||||
if (m_lazyContext) {
|
||||
flushContext(*m_lazyContext);
|
||||
m_lazyContext.reset();
|
||||
}
|
||||
commitPendingTransaction();
|
||||
flushContext(ctx);
|
||||
}
|
||||
|
||||
|
@ -3816,7 +3814,15 @@ void VulkanDataFactoryImpl::lazyCommitTransaction(
|
|||
trans(*m_lazyContext);
|
||||
}
|
||||
|
||||
void VulkanDataFactoryImpl::commitPendingTransaction() {
|
||||
if (m_lazyContext) {
|
||||
flushContext(*m_lazyContext);
|
||||
m_lazyContext.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanDataFactoryImpl::flushContext(Context& ctx) {
|
||||
OPTICK_EVENT();
|
||||
VulkanData* data = ctx.m_data.cast<VulkanData>();
|
||||
|
||||
/* Start asynchronous shader compiles */
|
||||
|
|
Loading…
Reference in New Issue