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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 29 16:24:44 UTC 2022


Module: Mesa
Branch: main
Commit: ab9d649ac3c734f5c031cd3dac264aa2a8cca248
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab9d649ac3c734f5c031cd3dac264aa2a8cca248

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Thu Apr 28 13:52:11 2022 -0700

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 at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16225>

---

 src/microsoft/compiler/dxil_validator.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microsoft/compiler/dxil_validator.cpp b/src/microsoft/compiler/dxil_validator.cpp
index 0e8d5da119c..00e1ca1171d 100644
--- a/src/microsoft/compiler/dxil_validator.cpp
+++ b/src/microsoft/compiler/dxil_validator.cpp
@@ -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)



More information about the mesa-commit mailing list