forked from OSchip/llvm-project
R600: Support for TBO
NOTE: This is a candidate for the Mesa stable branch. Reviewed-by: Tom Stellard <thomas.stellard at amd.com> llvm-svn: 175445
This commit is contained in:
parent
e53beb2647
commit
685018009b
|
@ -165,7 +165,8 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
|
|||
case AMDGPU::VTX_READ_GLOBAL_8_eg:
|
||||
case AMDGPU::VTX_READ_GLOBAL_32_eg:
|
||||
case AMDGPU::VTX_READ_GLOBAL_128_eg:
|
||||
case AMDGPU::TEX_VTX_CONSTBUF: {
|
||||
case AMDGPU::TEX_VTX_CONSTBUF:
|
||||
case AMDGPU::TEX_VTX_TEXBUF : {
|
||||
uint64_t InstWord01 = getBinaryCodeForInstr(MI, Fixups);
|
||||
uint32_t InstWord2 = MI.getOperand(2).getImm(); // Offset
|
||||
|
||||
|
|
|
@ -1708,6 +1708,60 @@ def TEX_VTX_CONSTBUF :
|
|||
// Inst{127-96} = 0;
|
||||
}
|
||||
|
||||
def TEX_VTX_TEXBUF:
|
||||
InstR600ISA <(outs R600_Reg128:$dst), (ins MEMxi:$ptr, i32imm:$BUFFER_ID), "TEX_VTX_EXPLICIT_READ $dst, $ptr",
|
||||
[(set R600_Reg128:$dst, (int_R600_load_texbuf ADDRGA_VAR_OFFSET:$ptr, imm:$BUFFER_ID))]>,
|
||||
VTX_WORD1_GPR, VTX_WORD0 {
|
||||
|
||||
let VC_INST = 0;
|
||||
let FETCH_TYPE = 2;
|
||||
let FETCH_WHOLE_QUAD = 0;
|
||||
let SRC_REL = 0;
|
||||
let SRC_SEL_X = 0;
|
||||
let DST_REL = 0;
|
||||
let USE_CONST_FIELDS = 1;
|
||||
let NUM_FORMAT_ALL = 0;
|
||||
let FORMAT_COMP_ALL = 0;
|
||||
let SRF_MODE_ALL = 1;
|
||||
let MEGA_FETCH_COUNT = 16;
|
||||
let DST_SEL_X = 0;
|
||||
let DST_SEL_Y = 1;
|
||||
let DST_SEL_Z = 2;
|
||||
let DST_SEL_W = 3;
|
||||
let DATA_FORMAT = 0;
|
||||
|
||||
let Inst{31-0} = Word0;
|
||||
let Inst{63-32} = Word1;
|
||||
|
||||
// LLVM can only encode 64-bit instructions, so these fields are manually
|
||||
// encoded in R600CodeEmitter
|
||||
//
|
||||
// bits<16> OFFSET;
|
||||
// bits<2> ENDIAN_SWAP = 0;
|
||||
// bits<1> CONST_BUF_NO_STRIDE = 0;
|
||||
// bits<1> MEGA_FETCH = 0;
|
||||
// bits<1> ALT_CONST = 0;
|
||||
// bits<2> BUFFER_INDEX_MODE = 0;
|
||||
|
||||
|
||||
|
||||
// VTX_WORD2 (LLVM can only encode 64-bit instructions, so WORD2 encoding
|
||||
// is done in R600CodeEmitter
|
||||
//
|
||||
// Inst{79-64} = OFFSET;
|
||||
// Inst{81-80} = ENDIAN_SWAP;
|
||||
// Inst{82} = CONST_BUF_NO_STRIDE;
|
||||
// Inst{83} = MEGA_FETCH;
|
||||
// Inst{84} = ALT_CONST;
|
||||
// Inst{86-85} = BUFFER_INDEX_MODE;
|
||||
// Inst{95-86} = 0; Reserved
|
||||
|
||||
// VTX_WORD3 (Padding)
|
||||
//
|
||||
// Inst{127-96} = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Instructions support
|
||||
|
|
|
@ -16,6 +16,8 @@ let TargetPrefix = "R600", isTarget = 1 in {
|
|||
Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_R600_interp_input :
|
||||
Intrinsic<[llvm_float_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_R600_load_texbuf :
|
||||
Intrinsic<[llvm_v4f32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_R600_store_swizzle :
|
||||
Intrinsic<[], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty], []>;
|
||||
def int_R600_store_stream_output :
|
||||
|
|
Loading…
Reference in New Issue