[Beignet] [Patch V2 2/2] Fix two bug.

Yang Rong rong.r.yang at intel.com
Sun Aug 31 22:05:06 PDT 2014


1. A INSERT_REGINSERT_REG typo.
2. Release main_buf in utest sub_buffer_check.

Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 backend/src/backend/gen_context.cpp | 4 ++--
 utests/sub_buffer.cpp               | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index ba4a8f8..6848bf2 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -1854,8 +1854,8 @@ namespace gbe
         INSERT_REG(numgroup1, GROUP_NUM_Y)
         INSERT_REG(numgroup2, GROUP_NUM_Z)
         INSERT_REG(stackptr, STACK_POINTER)
-        INSERT_REG(printfbptr, PRINTF_BUF_POINTER);
-        INSERT_REG(printfiptr, PRINTF_INDEX_POINTER);
+        INSERT_REG(printfbptr, PRINTF_BUF_POINTER)
+        INSERT_REG(printfiptr, PRINTF_INDEX_POINTER)
         do {} while(0);
       }
     });
diff --git a/utests/sub_buffer.cpp b/utests/sub_buffer.cpp
index 9af3903..d32fd65 100644
--- a/utests/sub_buffer.cpp
+++ b/utests/sub_buffer.cpp
@@ -128,7 +128,7 @@ void sub_buffer_check(void)
         }
     }
 
-
+    clReleaseMemObject(main_buf);
     free(main_buf_content);
 }
 
-- 
1.8.3.2



More information about the Beignet mailing list