From 2ff2d65799e4a8351e99bab306bc49c01062ac19 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Mon, 15 Feb 2021 12:24:54 -0500 Subject: [PATCH] nv50/ir: lower buffer to global The idea is that buffers will be bound to the appropriate indices. That means that we can just rename them to global. Signed-off-by: Ilia Mirkin Acked-by: Pierre Moreau Part-of: --- .../drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp index d4d8e48b8fc..6b14f7339f7 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp @@ -1299,7 +1299,8 @@ NV50LoweringPreSSA::handleLOAD(Instruction *i) if (prog->getType() == Program::TYPE_COMPUTE) { if (sym->inFile(FILE_MEMORY_SHARED) || - sym->inFile(FILE_MEMORY_GLOBAL)) { + sym->inFile(FILE_MEMORY_BUFFER) || + sym->inFile(FILE_MEMORY_GLOBAL)) { return handleLDST(i); } } @@ -1349,6 +1350,11 @@ NV50LoweringPreSSA::handleLDST(Instruction *i) return true; } + // Buffers just map directly to the different global memory spaces + if (sym->inFile(FILE_MEMORY_BUFFER)) { + sym->reg.file = FILE_MEMORY_GLOBAL; + } + if (sym->inFile(FILE_MEMORY_SHARED)) { if (src.isIndirect(0)) {