Skip to content

Instantly share code, notes, and snippets.

@acomminos
Created March 12, 2018 01:13
Show Gist options
  • Save acomminos/6d7e1a6cf28cc2502b4be09772847622 to your computer and use it in GitHub Desktop.
Save acomminos/6d7e1a6cf28cc2502b4be09772847622 to your computer and use it in GitHub Desktop.
diff --git a/dlls/wined3d/buffer_heap.c b/dlls/wined3d/buffer_heap.c
index 80670c515f..ca94df3f3a 100644
--- a/dlls/wined3d/buffer_heap.c
+++ b/dlls/wined3d/buffer_heap.c
@@ -157,7 +157,7 @@ HRESULT wined3d_buffer_heap_create(struct wined3d_context *context, GLsizeiptr s
return E_OUTOFMEMORY;
}
- access_flags = GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT | GL_MAP_WRITE_BIT;
+ access_flags = GL_MAP_PERSISTENT_BIT | GL_MAP_WRITE_BIT;
if (!write_only)
{
access_flags |= GL_MAP_READ_BIT;
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 01aa53597f..c8b701bd6c 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -5099,6 +5099,11 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
checkGLcall("glPatchParameteri");
}
+ // TODO(acomminos): make this conditional on whether or not persistent
+ // buffers are being used
+ GL_EXTCALL(glMemoryBarrier(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT));
+ checkGLcall("glMemoryBarrier");
+
if (parameters->indirect)
{
if (!context->use_immediate_mode_draw && !emulation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment