d3d12: Handle a null threaded context
When GALLIUM_THREAD=0, the threaded context doesn't get created and the following lines would fault. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35248>
This commit is contained in:
@@ -500,8 +500,10 @@ d3d12_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
d3d12_replace_buffer_storage,
|
||||
NULL,
|
||||
&ctx->threaded_context);
|
||||
ctx->threaded_context->bytes_replaced_limit = 1024 * 1024 * 1024; /* 1GiB */
|
||||
threaded_context_init_bytes_mapped_limit(ctx->threaded_context, 4);
|
||||
if (ctx->threaded_context) {
|
||||
ctx->threaded_context->bytes_replaced_limit = 1024 * 1024 * 1024; /* 1GiB */
|
||||
threaded_context_init_bytes_mapped_limit(ctx->threaded_context, 4);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user