summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2018-09-20 06:46:04 -0400
committerTopi Pohjolainen <[email protected]>2018-09-25 09:59:59 +0300
commit1cc17fb731466c68586915acbb916586457b19bc (patch)
treeaf3c64846d81fb1134e41ee1195e1d33cd425a49
parentec1fcf92ae7e445d74e69f6973041fd12112b1fa (diff)
intel/compiler/icl: Use barrier id bits 24:30 instead of 24:27,31
Fixes gpu hangs with Carchase and Manhattan. Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/intel/compiler/brw_fs_visitor.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp
index cd2abbb5960..51a0ca2374a 100644
--- a/src/intel/compiler/brw_fs_visitor.cpp
+++ b/src/intel/compiler/brw_fs_visitor.cpp
@@ -791,9 +791,19 @@ fs_visitor::emit_cs_terminate()
void
fs_visitor::emit_barrier()
{
- assert(devinfo->gen >= 7);
- const uint32_t barrier_id_mask =
- devinfo->gen >= 9 ? 0x8f000000u : 0x0f000000u;
+ uint32_t barrier_id_mask;
+ switch (devinfo->gen) {
+ case 7:
+ case 8:
+ barrier_id_mask = 0x0f000000u; break;
+ case 9:
+ case 10:
+ barrier_id_mask = 0x8f000000u; break;
+ case 11:
+ barrier_id_mask = 0x7f000000u; break;
+ default:
+ unreachable("barrier is only available on gen >= 7");
+ }
/* We are getting the barrier ID from the compute shader header */
assert(stage == MESA_SHADER_COMPUTE);