[Beignet] [PATCH 30/31 V2] Add the logic for UPSAMPLE_LONG

junyan.he at inbox.com junyan.he at inbox.com
Sun Jan 18 23:34:57 PST 2015


From: Junyan He <junyan.he at linux.intel.com>

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 backend/src/backend/gen8_context.cpp |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/backend/src/backend/gen8_context.cpp b/backend/src/backend/gen8_context.cpp
index 3d1fc22..c9db712 100644
--- a/backend/src/backend/gen8_context.cpp
+++ b/backend/src/backend/gen8_context.cpp
@@ -84,6 +84,16 @@ namespace gbe
         /* Should never come to here, just use the common OPCODE. */
         GBE_ASSERT(0);
         break;
+      case SEL_OP_UPSAMPLE_LONG:
+      {
+        const GenRegister dst = ra->genReg(insn.dst(0));
+        const GenRegister src0 = ra->genReg(insn.src(0));
+        const GenRegister src1 = ra->genReg(insn.src(1));
+        p->MOV(dst, src0);
+        p->SHL(dst, dst, GenRegister::immud(32));
+        p->ADD(dst, dst, src1);
+        break;
+      }
       default:
         GenContext::emitBinaryInstruction(insn);
     }
-- 
1.7.9.5



More information about the Beignet mailing list