Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1516dff authored by Jason Sams's avatar Jason Sams
Browse files

Fix Allocation-less launches

Cherry-pick fix from AOSP.  Error check for kernel launch was
generating a false positive.

bug 20690242


Change-Id: Ic4c6644072a11aab9a273070be5734519136f685
parent e74007de
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -182,9 +182,9 @@ public class Script extends BaseObj {
        mRS.validateObject(ain);
        mRS.validateObject(aout);

        if (ain == null && aout == null) {
        if (ain == null && aout == null && sc == null) {
            throw new RSIllegalArgumentException(
                "At least one of ain or aout is required to be non-null.");
                "At least one of input allocation, output allocation, or LaunchOptions is required to be non-null.");
        }

        long[] in_ids = null;
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#define LOG_TAG "libRS_jni"
#define LOG_TAG "RenderScript_jni"

#include <stdlib.h>
#include <stdio.h>
@@ -1857,7 +1857,7 @@ nScriptForEach(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot,
               jintArray limits)
{
    if (kLogApi) {
        ALOGD("nScriptForEach, con(%p), s(%p), slot(%i)", (RsContext)con, (void *)script, slot);
        ALOGD("nScriptForEach, con(%p), s(%p), slot(%i) ains(%p) aout(%lli)", (RsContext)con, (void *)script, slot, ains, aout);
    }

    jint   in_len = 0;