1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

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.
This commit is contained in:
Elizabeth Figura 2023-12-29 19:09:15 -06:00 committed by Alexandre Julliard
parent 44aa651dc5
commit 52a0e36aee
2 changed files with 4 additions and 2 deletions

View file

@ -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))) 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); heap_free(bo_gl);
return false; return false;
} }

View file

@ -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))) if ((memory = wined3d_device_gl_allocate_memory(device_gl, context_gl, memory_type_idx, size, &id)))
buffer_offset = memory->offset; buffer_offset = memory->offset;
else if (!context_gl)
WARN_(d3d_perf)("Failed to suballocate buffer from the client thread.\n");
} }
else if (context_gl) else if (context_gl)
{ {
@ -1139,7 +1141,8 @@ bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct win
if (!id) if (!id)
{ {
WARN("Failed to allocate buffer.\n"); if (context_gl)
WARN("Failed to allocate buffer.\n");
return false; return false;
} }
} }