mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Remove waitIdle and only accept valid pointers on execute.
This commit is contained in:
parent
9b7625f03e
commit
cb4eaae9ff
5 changed files with 5 additions and 15 deletions
|
|
@ -2285,6 +2285,9 @@ namespace plume {
|
|||
}
|
||||
|
||||
void D3D12CommandQueue::executeCommandLists(const RenderCommandList **commandLists, uint32_t commandListCount, RenderCommandSemaphore **waitSemaphores, uint32_t waitSemaphoreCount, RenderCommandSemaphore **signalSemaphores, uint32_t signalSemaphoreCount, RenderCommandFence *signalFence) {
|
||||
assert(commandLists != nullptr);
|
||||
assert(commandListCount > 0);
|
||||
|
||||
for (uint32_t i = 0; i < waitSemaphoreCount; i++) {
|
||||
D3D12CommandSemaphore *interfaceSemaphore = static_cast<D3D12CommandSemaphore *>(waitSemaphores[i]);
|
||||
d3d->Wait(interfaceSemaphore->d3d, interfaceSemaphore->semaphoreValue);
|
||||
|
|
@ -2297,9 +2300,7 @@ namespace plume {
|
|||
executionVector.emplace_back(static_cast<ID3D12CommandList *>(interfaceCommandList->d3d));
|
||||
}
|
||||
|
||||
if (!executionVector.empty()) {
|
||||
d3d->ExecuteCommandLists(UINT(executionVector.size()), executionVector.data());
|
||||
}
|
||||
d3d->ExecuteCommandLists(UINT(executionVector.size()), executionVector.data());
|
||||
|
||||
for (uint32_t i = 0; i < signalSemaphoreCount; i++) {
|
||||
D3D12CommandSemaphore *interfaceSemaphore = static_cast<D3D12CommandSemaphore *>(signalSemaphores[i]);
|
||||
|
|
@ -3798,10 +3799,6 @@ namespace plume {
|
|||
return countsSupported;
|
||||
}
|
||||
|
||||
void D3D12Device::waitIdle() const {
|
||||
assert(false && "Use fences to replicate wait idle behavior on D3D12.");
|
||||
}
|
||||
|
||||
void D3D12Device::release() {
|
||||
if (d3d != nullptr) {
|
||||
d3d->Release();
|
||||
|
|
|
|||
|
|
@ -459,7 +459,6 @@ namespace plume {
|
|||
const RenderDeviceCapabilities &getCapabilities() const override;
|
||||
const RenderDeviceDescription &getDescription() const override;
|
||||
RenderSampleCounts getSampleCountsSupported(RenderFormat format) const override;
|
||||
void waitIdle() const override;
|
||||
void release();
|
||||
bool isValid() const;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace plume {
|
|||
|
||||
// Concrete implementation shortcuts.
|
||||
inline void executeCommandLists(const RenderCommandList *commandList, RenderCommandFence *signalFence = nullptr) {
|
||||
executeCommandLists(commandList != nullptr ? &commandList : nullptr, commandList != nullptr ? 1 : 0, nullptr, 0, nullptr, 0, signalFence);
|
||||
executeCommandLists(&commandList, 1, nullptr, 0, nullptr, 0, signalFence);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -242,7 +242,6 @@ namespace plume {
|
|||
virtual const RenderDeviceCapabilities &getCapabilities() const = 0;
|
||||
virtual const RenderDeviceDescription &getDescription() const = 0;
|
||||
virtual RenderSampleCounts getSampleCountsSupported(RenderFormat format) const = 0;
|
||||
virtual void waitIdle() const = 0;
|
||||
};
|
||||
|
||||
struct RenderInterface {
|
||||
|
|
|
|||
|
|
@ -4190,10 +4190,6 @@ namespace plume {
|
|||
}
|
||||
}
|
||||
|
||||
void VulkanDevice::waitIdle() const {
|
||||
vkDeviceWaitIdle(vk);
|
||||
}
|
||||
|
||||
void VulkanDevice::release() {
|
||||
if (allocator != VK_NULL_HANDLE) {
|
||||
vmaDestroyAllocator(allocator);
|
||||
|
|
|
|||
|
|
@ -430,7 +430,6 @@ namespace plume {
|
|||
const RenderDeviceCapabilities &getCapabilities() const override;
|
||||
const RenderDeviceDescription &getDescription() const override;
|
||||
RenderSampleCounts getSampleCountsSupported(RenderFormat format) const override;
|
||||
void waitIdle() const override;
|
||||
void release();
|
||||
bool isValid() const;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue