1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

R600: Add a ldptr intrinsic to support MSAA.

llvm-svn: 191838
This commit is contained in:
Vincent Lejeune 2013-10-02 16:00:33 +00:00
parent c55c7f41ff
commit 0df639e4b4
3 changed files with 10 additions and 1 deletions

View File

@ -609,7 +609,8 @@ SDValue R600TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const
case AMDGPUIntrinsic::R600_txf:
case AMDGPUIntrinsic::R600_txq:
case AMDGPUIntrinsic::R600_ddx:
case AMDGPUIntrinsic::R600_ddy: {
case AMDGPUIntrinsic::R600_ddy:
case AMDGPUIntrinsic::R600_ldptr: {
unsigned TextureOp;
switch (IntrinsicID) {
case AMDGPUIntrinsic::R600_tex:
@ -642,6 +643,9 @@ SDValue R600TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const
case AMDGPUIntrinsic::R600_ddy:
TextureOp = 9;
break;
case AMDGPUIntrinsic::R600_ldptr:
TextureOp = 10;
break;
default:
llvm_unreachable("Unknow Texture Operation");
}

View File

@ -881,6 +881,9 @@ def TEX_SAMPLE_C_L : R600_TEX <0x19, "TEX_SAMPLE_C_L">;
def TEX_SAMPLE_LB : R600_TEX <0x12, "TEX_SAMPLE_LB">;
def TEX_SAMPLE_C_LB : R600_TEX <0x1A, "TEX_SAMPLE_C_LB">;
def TEX_LD : R600_TEX <0x03, "TEX_LD">;
def TEX_LDPTR : R600_TEX <0x03, "TEX_LDPTR"> {
let INST_MOD = 1;
}
def TEX_GET_TEXTURE_RESINFO : R600_TEX <0x04, "TEX_GET_TEXTURE_RESINFO">;
def TEX_GET_GRADIENTS_H : R600_TEX <0x07, "TEX_GET_GRADIENTS_H">;
def TEX_GET_GRADIENTS_V : R600_TEX <0x08, "TEX_GET_GRADIENTS_V">;
@ -899,6 +902,7 @@ defm : TexPattern<6, TEX_LD, v4i32>;
defm : TexPattern<7, TEX_GET_TEXTURE_RESINFO, v4i32>;
defm : TexPattern<8, TEX_GET_GRADIENTS_H>;
defm : TexPattern<9, TEX_GET_GRADIENTS_V>;
defm : TexPattern<10, TEX_LDPTR, v4i32>;
//===----------------------------------------------------------------------===//
// Helper classes for common instructions

View File

@ -52,6 +52,7 @@ let TargetPrefix = "R600", isTarget = 1 in {
def int_R600_txb : TextureIntrinsicFloatInput;
def int_R600_txbc : TextureIntrinsicFloatInput;
def int_R600_txf : TextureIntrinsicInt32Input;
def int_R600_ldptr : TextureIntrinsicInt32Input;
def int_R600_txq : TextureIntrinsicInt32Input;
def int_R600_ddx : TextureIntrinsicFloatInput;
def int_R600_ddy : TextureIntrinsicFloatInput;