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

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

Remove ACC and other legacy bits from RS.

Change-Id: I12a3b0477f3201ec7ca63564ae2b387ecc89dedf
parent e447a786
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ LOCAL_SRC_FILES:= \

LOCAL_SHARED_LIBRARIES := \
        libandroid_runtime \
        libacc \
        libnativehelper \
        libRS \
        libcutils \
+1 −46
Original line number Diff line number Diff line
@@ -70,52 +70,7 @@ static void logMatrix(const char *txt, const float *f)

void ProgramVertex::setupGL(const Context *rsc, ProgramVertexState *state)
{
    if ((state->mLast.get() == this) && !mDirty) {
        return;
    }
    state->mLast.set(this);

    const float *f = static_cast<const float *>(mConstants[0]->getPtr());

    glMatrixMode(GL_TEXTURE);
    if (mTextureMatrixEnable) {
        glLoadMatrixf(&f[RS_PROGRAM_VERTEX_TEXTURE_OFFSET]);
    } else {
        glLoadIdentity();
    }

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    if (mLightCount) {
#ifndef ANDROID_RS_BUILD_FOR_HOST // GLES Only
        int v = 0;
        glEnable(GL_LIGHTING);

        glLightModelxv(GL_LIGHT_MODEL_TWO_SIDE, &v);

        for (uint32_t ct = 0; ct < mLightCount; ct++) {
            const Light *l = mLights[ct].get();
            glEnable(GL_LIGHT0 + ct);
            l->setupGL(ct);
        }
        for (uint32_t ct = mLightCount; ct < MAX_LIGHTS; ct++) {
            glDisable(GL_LIGHT0 + ct);
        }
#endif //ANDROID_RS_BUILD_FOR_HOST
    } else {
        glDisable(GL_LIGHTING);
    }

    if (!f) {
        LOGE("Must bind constants to vertex program");
    }

    glMatrixMode(GL_PROJECTION);
    glLoadMatrixf(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET]);
    glMatrixMode(GL_MODELVIEW);
    glLoadMatrixf(&f[RS_PROGRAM_VERTEX_MODELVIEW_OFFSET]);

    mDirty = false;
    assert(0);
}

void ProgramVertex::loadShader(Context *rsc) {
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include "rsScriptC.h"
#include "rsMatrix.h"

#include "acc/acc.h"
#include "utils/Timers.h"

#include <time.h>
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include "rsScriptC.h"
#include "rsMatrix.h"

#include "acc/acc.h"
#include "utils/Timers.h"

#define GL_GLEXT_PROTOTYPES