- Fix D3D12Texture::GetTextureType() to return correct type based on D3D12 resource dimension - Fix OpenGL CommandQueue::Signal() to properly call fence->Signal() - Fix OpenGL CommandQueue::GetTimestampFrequency() using GL_TIMESTAMP - Fix OpenGL Device::GetNativeDevice() to return m_hglrc - Fix OpenGL Fence::Signal() to create GL sync object and update completedValue - Fix OpenGL Fence::Wait() to properly wait for fence - Fix OpenGL Fence::GetNativeHandle() to create sync on first call - Fix OpenGL SwapChain::GetCurrentBackBuffer() to return backbuffer texture - Fix OpenGL SwapChain::Initialize() to create backbuffer texture - Fix OpenGL SwapChain::Shutdown() to cleanup backbuffer texture - Fix RHI unit tests: add missing sampleCount/sampleQuality/depth/arraySize fields - Fix RHI unit tests: add complete TextureDesc fields where needed
47 lines
968 B
C++
47 lines
968 B
C++
#include "XCEngine/RHI/OpenGL/OpenGLCommandQueue.h"
|
|
#include "XCEngine/RHI/RHIFence.h"
|
|
#include <glad/glad.h>
|
|
|
|
namespace XCEngine {
|
|
namespace RHI {
|
|
|
|
OpenGLCommandQueue::OpenGLCommandQueue() {
|
|
}
|
|
|
|
OpenGLCommandQueue::~OpenGLCommandQueue() {
|
|
Shutdown();
|
|
}
|
|
|
|
void OpenGLCommandQueue::Shutdown() {
|
|
}
|
|
|
|
void OpenGLCommandQueue::ExecuteCommandLists(uint32_t count, void** lists) {
|
|
}
|
|
|
|
void OpenGLCommandQueue::Signal(RHIFence* fence, uint64_t value) {
|
|
if (fence) {
|
|
fence->Signal(value);
|
|
}
|
|
glFlush();
|
|
}
|
|
|
|
void OpenGLCommandQueue::Wait(RHIFence* fence, uint64_t value) {
|
|
}
|
|
|
|
uint64_t OpenGLCommandQueue::GetCompletedValue() {
|
|
return 0;
|
|
}
|
|
|
|
void OpenGLCommandQueue::WaitForIdle() {
|
|
glFinish();
|
|
}
|
|
|
|
uint64_t OpenGLCommandQueue::GetTimestampFrequency() const {
|
|
GLint64 frequency = 0;
|
|
glGetInteger64v(GL_TIMESTAMP, &frequency);
|
|
return frequency > 0 ? static_cast<uint64_t>(frequency) : 1000000000;
|
|
}
|
|
|
|
} // namespace RHI
|
|
} // namespace XCEngine
|