intel/compiler: make sure we keep the lowest dispatch limit
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 30 Oct 2020 15:41:02 +0000 (17:41 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sun, 2 May 2021 20:20:06 +0000 (20:20 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7455>

src/intel/compiler/brw_fs.cpp

index 512a616..4e3476f 100644 (file)
@@ -714,7 +714,7 @@ fs_visitor::limit_dispatch_width(unsigned n, const char *msg)
    if (dispatch_width > n) {
       fail("%s", msg);
    } else {
-      max_dispatch_width = n;
+      max_dispatch_width = MIN2(max_dispatch_width, n);
       compiler->shader_perf_log(log_data,
                                 "Shader dispatch width limited to SIMD%d: %s",
                                 n, msg);