Cycles: use GPU module for viewport display

To make GPU backends other than OpenGL work. Adds required pixel buffer and
fence objects to GPU module.

Authored by Apple: Michael Parkin-White

Ref T96261
Ref T92212

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D16042
This commit is contained in:
Jason Fielder
2022-12-01 15:33:54 +01:00
committed by Brecht Van Lommel
parent b5ebc9bb24
commit b132e3b3ce
26 changed files with 947 additions and 389 deletions

View File

@@ -16,6 +16,7 @@
#include "GPU_state.h"
#include "gpu_backend.hh"
#include "gpu_context_private.hh"
#include "gpu_state_private.hh"
@@ -373,6 +374,27 @@ void GPU_memory_barrier(eGPUBarrier barrier)
Context::get()->state_manager->issue_barrier(barrier);
}
GPUFence *GPU_fence_create()
{
Fence *fence = GPUBackend::get()->fence_alloc();
return wrap(fence);
}
void GPU_fence_free(GPUFence *fence)
{
delete unwrap(fence);
}
void GPU_fence_signal(GPUFence *fence)
{
unwrap(fence)->signal();
}
void GPU_fence_wait(GPUFence *fence)
{
unwrap(fence)->wait();
}
/** \} */
/* -------------------------------------------------------------------- */