d3dadapter: fix sw pipe loading

this needs to check the env var in order to work correctly

cc: mesa-stable

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17792>
This commit is contained in:
Mike Blumenkrantz 2022-07-28 09:08:27 -04:00 committed by Marge Bot
parent f153ae75db
commit 079857720b
1 changed files with 1 additions and 0 deletions

View File

@ -297,6 +297,7 @@ drm_create_adapter( int fd,
driDestroyOptionCache(&userInitOptions);
driDestroyOptionInfo(&defaultInitOptions);
sw_rendering |= debug_get_bool_option("D3D_ALWAYS_SOFTWARE", false);
/* wrap it to create a software screen that can share resources */
if (sw_rendering && pipe_loader_sw_probe_wrapped(&ctx->swdev, ctx->base.hal))
ctx->base.ref = pipe_loader_create_screen(ctx->swdev);