microsoft/compiler: Unload DXIL validator library *after* calling Release()

Otherwise, the code to actually run Release() might not be loaded or
callable anymore.

Fixes: 193cf76c ("microsoft/compiler: add common dxil-validator API")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16225>
This commit is contained in:
Jesse Natalie 2022-04-28 13:52:11 -07:00 committed by Marge Bot
parent 12d7f911c9
commit ab9d649ac3
1 changed files with 1 additions and 1 deletions

View File

@ -148,8 +148,8 @@ void
dxil_destroy_validator(struct dxil_validator *val)
{
/* if we have a validator, we have these */
FreeLibrary(val->dxil_mod);
val->dxc_validator->Release();
FreeLibrary(val->dxil_mod);
if (val->dxcompiler_mod) {
if (val->dxc_library)