Commit 52a0e36a authored by Elizabeth Figura's avatar Elizabeth Figura Committed by Alexandre Julliard

wined3d: Avoid WARN() when failing to allocate a GL BO without a context.

This is normal and expected, and only a concern for performance. Avoid polluting warn+d3d logs.
parent 44aa651d
......@@ -4657,7 +4657,6 @@ static bool adapter_gl_alloc_bo(struct wined3d_device *device, struct wined3d_re
if (!(wined3d_device_gl_create_bo(device_gl, NULL, size, binding, usage, coherent, flags, bo_gl)))
{
WARN("Failed to create OpenGL buffer.\n");
heap_free(bo_gl);
return false;
}
......
......@@ -1130,6 +1130,8 @@ bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct win
{
if ((memory = wined3d_device_gl_allocate_memory(device_gl, context_gl, memory_type_idx, size, &id)))
buffer_offset = memory->offset;
else if (!context_gl)
WARN_(d3d_perf)("Failed to suballocate buffer from the client thread.\n");
}
else if (context_gl)
{
......@@ -1139,7 +1141,8 @@ bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct win
if (!id)
{
WARN("Failed to allocate buffer.\n");
if (context_gl)
WARN("Failed to allocate buffer.\n");
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment