[Beignet] [PATCH 14/15] Backend: Fill curbe for profiling when in profiling mode.
junyan.he at inbox.com
junyan.he at inbox.com
Wed Aug 12 01:49:50 PDT 2015
From: Junyan He <junyan.he at linux.intel.com>
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
backend/src/backend/gen_context.cpp | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index c7cbf2d..f2563b5 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -2553,6 +2553,23 @@ namespace gbe
allocCurbeReg(zero, GBE_CURBE_ZERO);
allocCurbeReg(one, GBE_CURBE_ONE);
allocCurbeReg(btiUtil, GBE_CURBE_BTI_UTIL);
+ if (inProfilingMode) {
+ allocCurbeReg(profilingbptr, GBE_CURBE_PROFILING_BUF_POINTER);
+ allocCurbeReg(profilingts0, GBE_CURBE_PROFILING_TIMESTAMP0);
+ allocCurbeReg(profilingts1, GBE_CURBE_PROFILING_TIMESTAMP1);
+ if (this->simdWidth == 8) {
+ allocCurbeReg(profilingts2, GBE_CURBE_PROFILING_TIMESTAMP2);
+ allocCurbeReg(profilingts3, GBE_CURBE_PROFILING_TIMESTAMP3);
+ }
+ allocCurbeReg(profilingbptr, GBE_CURBE_PROFILING_BUF_POINTER);
+ allocCurbeReg(lsize0, GBE_CURBE_LOCAL_SIZE_X);
+ allocCurbeReg(lsize1, GBE_CURBE_LOCAL_SIZE_Y);
+ allocCurbeReg(lsize2, GBE_CURBE_LOCAL_SIZE_Z);
+ allocCurbeReg(goffset0, GBE_CURBE_GLOBAL_OFFSET_X);
+ allocCurbeReg(goffset1, GBE_CURBE_GLOBAL_OFFSET_Y);
+ allocCurbeReg(goffset2, GBE_CURBE_GLOBAL_OFFSET_Z);
+ }
+
if (stackUse.size() != 0)
allocCurbeReg(stackbuffer, GBE_CURBE_EXTRA_ARGUMENT, GBE_STACK_BUFFER);
// Go over the arguments and find the related patch locations
--
1.7.9.5
More information about the Beignet
mailing list