r600/sfn: Force a minimum of 4 GPRs, it seems to fix atomics
authorGert Wollny <gert.wollny@collabora.com>
Wed, 20 May 2020 22:03:34 +0000 (00:03 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Sun, 9 Aug 2020 13:45:36 +0000 (13:45 +0000)
This fixes spec@arb_compute_shader@execution@atomic-counter on
HD 5450

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>

src/gallium/drivers/r600/sfn/sfn_nir.cpp

index f22ae7b..d7bf09e 100644 (file)
@@ -977,6 +977,8 @@ int r600_shader_from_nir(struct r600_context *rctx,
    } else {
       r600::sfn_log << r600::SfnLog::shader_info << "This is not a Geometry shader\n";
    }
+   if (pipeshader->shader.bc.ngpr < 4)
+      pipeshader->shader.bc.ngpr = 4;
 
    return 0;
 }