[Beignet] [PATCH] write_image: Fixed a bug when use scalar data as color source.]

Lv, Meng meng.lv at intel.com
Wed Apr 17 18:08:15 PDT 2013


The Patch pass the test.
Thanks.
Date: Wed, 17 Apr 2013 11:20:29 +0800
From: Zhigang Gong <zhigang.gong at linux.intel.com>
To: beignet at lists.freedesktop.org
Cc: zhigang.gong at linux.intel.com
Subject: [Beignet] [PATCH] write_image: Fixed a bug when use scalar data as color source.
X-Mailer: git-send-email 1.7.11.7

If the color source is scalar data type for example from the kernel input parameters, then we should use QnPhysical to get the source, rather than hard coded the subnr to zero.

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 b4c9a65..b3d385b 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -326,9 +326,9 @@ namespace gbe
     for( uint32_t quarter = 0; quarter < quarterNum; quarter++)
     {
 #define QUARTER_MOV0(dst_nr, src) p->MOV(GenRegister::ud8grf(dst_nr, 0), \
-                                        GenRegister::retype(GenRegister::ud8grf(src.nr + quarter, 0), src.type))
+                                        
+ GenRegister::retype(GenRegister::QnPhysical(src, quarter), src.type))
 #define QUARTER_MOV1(dst_nr, src) p->MOV(GenRegister::retype(GenRegister::ud8grf(dst_nr, 0), src.type), \
-                                        GenRegister::retype(GenRegister::ud8grf(src.nr + quarter, 0), src.type))
+                                        
+ GenRegister::retype(GenRegister::QnPhysical(src,quarter), src.type))
       QUARTER_MOV0(nr + 1, ucoord);
       QUARTER_MOV0(nr + 2, vcoord);
       QUARTER_MOV1(nr + 5, R);
--
1.7.11.7

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet

----- End forwarded message -----


More information about the Beignet mailing list