Mesa (master): radeon/llvm: Handle loads from the constants address space.
Tom Stellard
tstellar at kemper.freedesktop.org
Fri Sep 21 19:51:21 UTC 2012
Module: Mesa
Branch: master
Commit: 438b1da7e552cff3f486944baff92ef6e3bb9608
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=438b1da7e552cff3f486944baff92ef6e3bb9608
Author: Tom Stellard <thomas.stellard at amd.com>
Date: Thu Sep 13 15:21:42 2012 +0000
radeon/llvm: Handle loads from the constants address space.
Reading from constant memory is not supported yet, so constant reads use
global memory.
---
.../radeon/MCTargetDesc/R600MCCodeEmitter.cpp | 1 +
src/gallium/drivers/radeon/R600Instructions.td | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp b/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp
index 8ad8213..847fcb6 100644
--- a/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp
+++ b/src/gallium/drivers/radeon/MCTargetDesc/R600MCCodeEmitter.cpp
@@ -166,6 +166,7 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
Emit(inst, OS);
break;
}
+ case AMDGPU::CONSTANT_LOAD_eg:
case AMDGPU::VTX_READ_PARAM_i32_eg:
case AMDGPU::VTX_READ_PARAM_f32_eg:
case AMDGPU::VTX_READ_GLOBAL_i8_eg:
diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td
index ce7a172..db4a3b8 100644
--- a/src/gallium/drivers/radeon/R600Instructions.td
+++ b/src/gallium/drivers/radeon/R600Instructions.td
@@ -1161,6 +1161,15 @@ class VTX_READ_GLOBAL_128_eg <ValueType vt> : VTX_READ_128_eg <1,
def VTX_READ_GLOBAL_v4i32_eg : VTX_READ_GLOBAL_128_eg<v4i32>;
def VTX_READ_GLOBAL_v4f32_eg : VTX_READ_GLOBAL_128_eg<v4f32>;
+//===----------------------------------------------------------------------===//
+// Constant Loads
+// XXX: We are currently storing all constants in the global address space.
+//===----------------------------------------------------------------------===//
+
+def CONSTANT_LOAD_eg : VTX_READ_32_eg <1,
+ [(set (f32 R600_TReg32_X:$dst), (constant_load ADDRVTX_READ:$ptr))]
+>;
+
}
let Predicates = [isCayman] in {
More information about the mesa-commit
mailing list