From b66d3e627a81c6b89171972c32ba2bf61665b7c5 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 16 Jun 2020 23:06:56 -0500 Subject: [PATCH] intel/fs: Don't pull CS push constants if uses_inline_data Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_compiler.h | 1 + src/intel/compiler/brw_fs.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index ea508940a04..e7c7278306f 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -1035,6 +1035,7 @@ struct brw_cs_prog_data { bool uses_barrier; bool uses_num_work_groups; + bool uses_inline_data; bool uses_btd_stack_ids; struct { diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index f8bce4e3b30..9cdd64ea82b 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -1670,7 +1670,16 @@ fs_visitor::assign_curb_setup() uint64_t used = 0; - if (stage == MESA_SHADER_COMPUTE && devinfo->verx10 >= 125) { + if (stage == MESA_SHADER_COMPUTE && + brw_cs_prog_data(prog_data)->uses_inline_data) { + /* With COMPUTE_WALKER, we can push up to one register worth of data via + * the inline data parameter in the COMPUTE_WALKER command itself. + * + * TODO: Support inline data and push at the same time. + */ + assert(devinfo->verx10 >= 125); + assert(uniform_push_length <= 1); + } else if (stage == MESA_SHADER_COMPUTE && devinfo->verx10 >= 125) { fs_builder ubld = bld.exec_all().group(8, 0).at( cfg->first_block(), cfg->first_block()->start());