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:
@@ -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();
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user