[Nouveau] [PATCH mesa 3/3] nouveau: Add support for clover / OpenCL kernel input parameters
Hans de Goede
hdegoede at redhat.com
Thu Mar 10 15:14:47 UTC 2016
Add support for clover / OpenCL kernel input parameters.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
.../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
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 a8258af..de0c72b 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1523,9 +1523,21 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int idx, int c, uint32_t address)
sym->reg.fileIndex = fileIdx;
- if (tgsiFile == TGSI_FILE_MEMORY &&
- code->memoryFiles[fileIdx].mem_type == TGSI_MEMORY_TYPE_SHARED)
- sym->setFile(FILE_MEMORY_SHARED);
+ if (tgsiFile == TGSI_FILE_MEMORY) {
+ switch (code->memoryFiles[fileIdx].mem_type) {
+ case TGSI_MEMORY_TYPE_SHARED:
+ sym->setFile(FILE_MEMORY_SHARED);
+ break;
+ case TGSI_MEMORY_TYPE_INPUT:
+ assert(prog->getType() == Program::TYPE_COMPUTE);
+ assert(idx == -1);
+ sym->setFile(FILE_SHADER_INPUT);
+ address += info->prop.cp.inputOffset;
+ break;
+ default:
+ assert(0); /* TODO: Add support for global and local memory */
+ }
+ }
if (idx >= 0) {
if (sym->reg.file == FILE_SHADER_INPUT)
--
2.7.2
More information about the Nouveau
mailing list