Module: Mesa Branch: main Commit: 049c791a63201bd2081b814e18b4c82c7beee305 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=049c791a63201bd2081b814e18b4c82c7beee305
Author: Lionel Landwerlin <[email protected]> Date: Fri Jun 2 22:37:46 2023 +0300 intel/fs: fix pull-constant-load prior to gfx7 In ad9bc1ffb5 ("intel/fs: enable UBO accesses through bindless heap") we added a new source, we need to fixup the source index for the generator. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: ad9bc1ffb5 ("intel/fs: enable UBO accesses through bindless heap") Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23405> --- src/intel/compiler/brw_fs_generator.cpp | 4 +++- src/intel/compiler/brw_lower_logical_sends.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp index ae48c1ab3c8..777221df93f 100644 --- a/src/intel/compiler/brw_fs_generator.cpp +++ b/src/intel/compiler/brw_fs_generator.cpp @@ -2107,7 +2107,9 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width, case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD: assert(inst->force_writemask_all); - generate_uniform_pull_constant_load(inst, dst, src[0], src[1]); + generate_uniform_pull_constant_load(inst, dst, + src[PULL_UNIFORM_CONSTANT_SRC_SURFACE], + src[PULL_UNIFORM_CONSTANT_SRC_OFFSET]); send_count++; break; diff --git a/src/intel/compiler/brw_lower_logical_sends.cpp b/src/intel/compiler/brw_lower_logical_sends.cpp index 691efb7aaf6..e3a12dba647 100644 --- a/src/intel/compiler/brw_lower_logical_sends.cpp +++ b/src/intel/compiler/brw_lower_logical_sends.cpp @@ -3086,6 +3086,7 @@ fs_visitor::lower_uniform_pull_constant_loads() invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES); } else { + assert(surface_handle.file == BAD_FILE); /* Before register allocation, we didn't tell the scheduler about the * MRF we use. We know it's safe to use this MRF because nothing * else does except for register spill/unspill, which generates and
