glsl: Work around MSVC arm64 optimizer bug

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27199>
This commit is contained in:
Jesse Natalie
2024-01-22 10:05:11 -08:00
committed by Marge Bot
parent 6139cd0656
commit 86b5c9278c

View File

@@ -236,6 +236,10 @@ link_util_check_subroutine_resources(struct gl_shader_program *prog)
} }
} }
#if defined(_MSC_VER) && DETECT_ARCH_AARCH64
// Work around https://developercommunity.visualstudio.com/t/Incorrect-ARM64-codegen-with-optimizatio/10564605
#pragma optimize("", off)
#endif
/** /**
* Validate uniform resources used by a program versus the implementation limits * Validate uniform resources used by a program versus the implementation limits
*/ */
@@ -315,6 +319,9 @@ link_util_check_uniform_resources(const struct gl_constants *consts,
} }
} }
} }
#if defined(_MSC_VER) && DETECT_ARCH_AARCH64
#pragma optimize("", on)
#endif
void void
link_util_calculate_subroutine_compat(struct gl_shader_program *prog) link_util_calculate_subroutine_compat(struct gl_shader_program *prog)