diff --git a/src/compiler/glsl/linker_util.cpp b/src/compiler/glsl/linker_util.cpp index bd1ef119fdd..5c6766d5144 100644 --- a/src/compiler/glsl/linker_util.cpp +++ b/src/compiler/glsl/linker_util.cpp @@ -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 */ @@ -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 link_util_calculate_subroutine_compat(struct gl_shader_program *prog)