radeonsi: don't assume ctx is always a threaded_context

Fixes: dcb1e8fef8 ("radeonsi: use thread_context::bytes_mapped_limit")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4587>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2020-04-16 14:52:29 +02:00
parent 791134658e
commit 8521acd660
+1 -1
View File
@@ -712,7 +712,7 @@ static struct pipe_context *si_pipe_create_context(struct pipe_screen *screen, v
sscreen->info.is_amdgpu ? si_create_fence : NULL,
&((struct si_context *)ctx)->tc);
if (os_get_total_physical_memory(&total_ram)) {
if (tc && tc != ctx && os_get_total_physical_memory(&total_ram)) {
((struct threaded_context *) tc)->bytes_mapped_limit = total_ram / 4;
}