virgl: Increase the shader transfer buffer by doubling the size
With only linearly increasing the size of the shader transfer buffer
the transfer of very large shaders may fail, so with each attempt double
the size of the buffer.
CTS:
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.48
for VTK-GL-CTS b5dcfb9c5 and newer
virglrenderer bug:
https://gitlab.freedesktop.org/virgl/virglrenderer/issues/150
Fixes: a8987b88ff
virgl: add driver for virtio-gpu 3D (v2)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3121>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3121>
This commit is contained in:
@@ -492,12 +492,13 @@ int virgl_encode_shader_state(struct virgl_context *ctx,
|
||||
if (virgl_debug & VIRGL_DEBUG_VERBOSE)
|
||||
debug_printf("Failed to translate shader in available space - trying again\n");
|
||||
old_size = str_total_size;
|
||||
str_total_size = 65536 * ++retry_size;
|
||||
str_total_size = 65536 * retry_size;
|
||||
retry_size *= 2;
|
||||
str = REALLOC(str, old_size, str_total_size);
|
||||
if (!str)
|
||||
return -1;
|
||||
}
|
||||
} while (bret == false && retry_size < 10);
|
||||
} while (bret == false && retry_size < 1024);
|
||||
|
||||
if (bret == false)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user