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

Commit a4587818 authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "Fix error checks on compute context creation. Remove GL init for compute scripts."

parents 645ab2a4 2698536b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -839,6 +839,9 @@ public class RenderScript {

        rs.mDev = rs.nDeviceCreate();
        rs.mContext = rs.nContextCreate(rs.mDev, 0);
        if (rs.mContext == 0) {
            throw new RSDriverException("Failed to create RS context.");
        }
        rs.mMessageThread = new MessageThread(rs);
        rs.mMessageThread.start();
        return rs;
+6 −5
Original line number Diff line number Diff line
@@ -270,17 +270,18 @@ void * Context::threadProc(void *vrsc) {
    rsc->props.mLogVisual = getProp("debug.rs.visual");

    if (!rsdHalInit(rsc, 0, 0)) {
        rsc->setError(RS_ERROR_FATAL_DRIVER, "Failed initializing GL");
        LOGE("Hal init failed");
        return NULL;
    }
    rsc->mHal.funcs.setPriority(rsc, rsc->mThreadPriority);

    if (rsc->mIsGraphicsContext) {
        if (!rsc->initGLThread()) {
            rsc->setError(RS_ERROR_OUT_OF_MEMORY, "Failed initializing GL");
            return NULL;
        }

    if (rsc->mIsGraphicsContext) {
        rsc->mStateRaster.init(rsc);
        rsc->setProgramRaster(NULL);
        rsc->mStateVertex.init(rsc);