diff options
author | Jason Sams <jsams@google.com> | 2012-06-13 15:16:44 -0700 |
---|---|---|
committer | Jason Sams <jsams@google.com> | 2012-06-13 16:05:53 -0700 |
commit | 9d6b2b359c43a388090aa34b3a558c262214192b (patch) | |
tree | 2f1979b0a884d3ae01668c6be807873e37fb5599 | |
parent | 433d5f43151a21e4403dc69ffebe0895ddb0905b (diff) | |
download | rs-jb-dev.tar.gz |
Fix single level forEach threadingandroid-cts-4.1_r4android-cts-4.1_r2android-cts-4.1_r1android-4.1.2_r2.1android-4.1.2_r2android-4.1.2_r1android-4.1.1_r6.1android-4.1.1_r6android-4.1.1_r5android-4.1.1_r4android-4.1.1_r3android-4.1.1_r2android-4.1.1_r1.1android-4.1.1_r1jb-releasejb-mr0-releasejb-dev
No longer mark scripts single threaded just because a
forEach is present.
Change-Id: I617cb2b1ccb402526a78338612b1614f94da4efb
-rw-r--r-- | driver/rsdBcc.cpp | 4 | ||||
-rw-r--r-- | driver/rsdCore.h | 1 | ||||
-rw-r--r-- | driver/rsdRuntimeStubs.cpp | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/driver/rsdBcc.cpp b/driver/rsdBcc.cpp index 29780e65..457a99d7 100644 --- a/driver/rsdBcc.cpp +++ b/driver/rsdBcc.cpp @@ -397,12 +397,14 @@ void rsdScriptInvokeForEach(const Context *rsc, mtls.yStrideOut = aout->mHal.drvState.stride; } - if ((dc->mWorkers.mCount > 1) && s->mHal.info.isThreadable) { + if ((dc->mWorkers.mCount > 1) && s->mHal.info.isThreadable && !dc->mInForEach) { + dc->mInForEach = true; if (mtls.dimY > 1) { rsdLaunchThreads(mrsc, wc_xy, &mtls); } else { rsdLaunchThreads(mrsc, wc_x, &mtls); } + dc->mInForEach = false; //ALOGE("launch 1"); } else { diff --git a/driver/rsdCore.h b/driver/rsdCore.h index 05ca13bb..92e7c7f9 100644 --- a/driver/rsdCore.h +++ b/driver/rsdCore.h @@ -43,6 +43,7 @@ typedef struct RsdHalRec { uint32_t version_major; uint32_t version_minor; bool mHasGraphics; + bool mInForEach; struct Workers { volatile int mRunningCount; diff --git a/driver/rsdRuntimeStubs.cpp b/driver/rsdRuntimeStubs.cpp index 779076da..a24bba89 100644 --- a/driver/rsdRuntimeStubs.cpp +++ b/driver/rsdRuntimeStubs.cpp @@ -661,11 +661,11 @@ static RsdSymbolTable gSyms[] = { { "_Z19rsgClearDepthTargetv", (void *)&SC_ClearFrameBufferObjectDepthTarget, false }, { "_Z24rsgClearAllRenderTargetsv", (void *)&SC_ClearFrameBufferObjectTargets, false }, - { "_Z9rsForEach9rs_script13rs_allocationS0_", (void *)&SC_ForEach_SAA, false }, - { "_Z9rsForEach9rs_script13rs_allocationS0_PKv", (void *)&SC_ForEach_SAAU, false }, - { "_Z9rsForEach9rs_script13rs_allocationS0_PKvPK16rs_script_call_t", (void *)&SC_ForEach_SAAUS, false }, - { "_Z9rsForEach9rs_script13rs_allocationS0_PKvj", (void *)&SC_ForEach_SAAUL, false }, - { "_Z9rsForEach9rs_script13rs_allocationS0_PKvjPK16rs_script_call_t", (void *)&SC_ForEach_SAAULS, false }, + { "_Z9rsForEach9rs_script13rs_allocationS0_", (void *)&SC_ForEach_SAA, true }, + { "_Z9rsForEach9rs_script13rs_allocationS0_PKv", (void *)&SC_ForEach_SAAU, true }, + { "_Z9rsForEach9rs_script13rs_allocationS0_PKvPK16rs_script_call_t", (void *)&SC_ForEach_SAAUS, true }, + { "_Z9rsForEach9rs_script13rs_allocationS0_PKvj", (void *)&SC_ForEach_SAAUL, true }, + { "_Z9rsForEach9rs_script13rs_allocationS0_PKvjPK16rs_script_call_t", (void *)&SC_ForEach_SAAULS, true }, // time { "_Z6rsTimePi", (void *)&SC_Time, true }, |