mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 07:39:58 +00:00
OpenGL: Guarantee writes to Buffers.
This commit is contained in:
parent
1fb516cd97
commit
131b342130
3 changed files with 2 additions and 4 deletions
|
@ -52,7 +52,7 @@ Buffer OGLBufferCache::CreateBlock(VAddr cpu_addr, std::size_t size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OGLBufferCache::WriteBarrier() {
|
void OGLBufferCache::WriteBarrier() {
|
||||||
glMemoryBarrier(GL_ALL_BARRIER_BITS);
|
glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint OGLBufferCache::ToHandle(const Buffer& buffer) {
|
GLuint OGLBufferCache::ToHandle(const Buffer& buffer) {
|
||||||
|
@ -72,6 +72,7 @@ void OGLBufferCache::UploadBlockData(const Buffer& buffer, std::size_t offset, s
|
||||||
void OGLBufferCache::DownloadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size,
|
void OGLBufferCache::DownloadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size,
|
||||||
u8* data) {
|
u8* data) {
|
||||||
MICROPROFILE_SCOPE(OpenGL_Buffer_Download);
|
MICROPROFILE_SCOPE(OpenGL_Buffer_Download);
|
||||||
|
glMemoryBarrier(GL_BUFFER_UPDATE_BARRIER_BIT);
|
||||||
glGetNamedBufferSubData(buffer->GetHandle(), static_cast<GLintptr>(offset),
|
glGetNamedBufferSubData(buffer->GetHandle(), static_cast<GLintptr>(offset),
|
||||||
static_cast<GLsizeiptr>(size), data);
|
static_cast<GLsizeiptr>(size), data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -630,7 +630,6 @@ void RasterizerOpenGL::DispatchCompute(GPUVAddr code_addr) {
|
||||||
const auto& launch_desc = system.GPU().KeplerCompute().launch_description;
|
const auto& launch_desc = system.GPU().KeplerCompute().launch_description;
|
||||||
glDispatchCompute(launch_desc.grid_dim_x, launch_desc.grid_dim_y, launch_desc.grid_dim_z);
|
glDispatchCompute(launch_desc.grid_dim_x, launch_desc.grid_dim_y, launch_desc.grid_dim_z);
|
||||||
++num_queued_commands;
|
++num_queued_commands;
|
||||||
system.GPU().TickWork();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerOpenGL::ResetCounter(VideoCore::QueryType type) {
|
void RasterizerOpenGL::ResetCounter(VideoCore::QueryType type) {
|
||||||
|
|
|
@ -494,8 +494,6 @@ void RasterizerVulkan::DispatchCompute(GPUVAddr code_addr) {
|
||||||
descriptor_set, {});
|
descriptor_set, {});
|
||||||
cmdbuf.Dispatch(grid_x, grid_y, grid_z);
|
cmdbuf.Dispatch(grid_x, grid_y, grid_z);
|
||||||
});
|
});
|
||||||
|
|
||||||
system.GPU().TickWork();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerVulkan::ResetCounter(VideoCore::QueryType type) {
|
void RasterizerVulkan::ResetCounter(VideoCore::QueryType type) {
|
||||||
|
|
Loading…
Reference in a new issue