[Beignet] [PATCH V2 4/7] GBE: check the correct register for whether coord z exists.

Zhigang Gong zhigang.gong at linux.intel.com
Thu Sep 12 23:01:45 PDT 2013


Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 backend/src/backend/gen_context.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index 0d584df..4e51aff 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -1028,7 +1028,7 @@ namespace gbe
     /* Prepare message payload. */
     p->MOV(GenRegister::f8grf(nr , 0), ucoord);
     p->MOV(GenRegister::f8grf(nr + (simdWidth/8), 0), vcoord);
-    if (insn.src(8).reg() != 0)
+    if (insn.src(6).reg() != 0)
       p->MOV(GenRegister::f8grf(nr + (simdWidth/4), 0), wcoord);
     p->SAMPLE(dst, msgPayload, false, bti, sampler, simdWidth, -1, 0);
     p->pop();
@@ -1112,7 +1112,7 @@ namespace gbe
         p->curr.quarterControl = GEN_COMPRESSION_Q2;
       QUARTER_MOV0(nr + 1, ucoord);
       QUARTER_MOV0(nr + 2, vcoord);
-      if (insn.src(3 + insn.extra.elem).reg() != 0)
+      if (insn.src(2 + insn.extra.elem).reg() != 0)
         QUARTER_MOV0(nr + 3, wcoord);
       QUARTER_MOV1(nr + 5, R);
       QUARTER_MOV1(nr + 6, G);
-- 
1.7.9.5



More information about the Beignet mailing list