From de17922b8a3c382cf89833cf8975cadc00142313 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 26 Jul 2019 01:18:23 -0400 Subject: [PATCH] nv50/ir: don't consider the main compute function as taking arguments With OpenCL, kernels can take arguments and return values (?). However in practice, there is no more TGSI compute implementation, and even if there were, it would probably have named functions and no explicit main. This improves RA considerably for compute shaders, since temps are not kept around as return values. Signed-off-by: Ilia Mirkin Reviewed-by: Karol Herbst --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 9d0ab33..2dd13e7 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -4298,7 +4298,7 @@ Converter::BindArgumentsPass::visit(Function *f) } } - if (func == prog->main && prog->getType() != Program::TYPE_COMPUTE) + if (func == prog->main /* && prog->getType() != Program::TYPE_COMPUTE */) return true; updatePrototype(&BasicBlock::get(f->cfg.getRoot())->liveSet, &Function::buildLiveSets, &Function::ins); -- 2.7.4