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

Commit c016e4c9 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Track down unsupported texture target"

parents e5afd829 48f650cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,9 @@ void DeferredLayerUpdater::doUpdateTexImage() {
        mSurfaceTexture->getTransformMatrix(transform);
        GLenum renderTarget = mSurfaceTexture->getCurrentTextureTarget();

        LOG_ALWAYS_FATAL_IF(renderTarget != GL_TEXTURE_2D && renderTarget != GL_TEXTURE_EXTERNAL_OES,
                "doUpdateTexImage target %x, 2d %x, EXT %x",
                renderTarget, GL_TEXTURE_2D, GL_TEXTURE_EXTERNAL_OES);
        LayerRenderer::updateTextureLayer(mLayer, mWidth, mHeight,
                !mBlend, forceFilter, renderTarget, transform);
    }
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ public:
        if (texture.get() != mSurfaceTexture.get()) {
            mNeedsGLContextAttach = needsAttach;
            mSurfaceTexture = texture;

            GLenum target = texture->getCurrentTextureTarget();
            LOG_ALWAYS_FATAL_IF(target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES,
                    "set unsupported GLConsumer with target %x", target);
        }
    }

+6 −2
Original line number Diff line number Diff line
@@ -576,8 +576,12 @@ void verify(const ProgramDescription& description, const Glop& glop) {
void GlopBuilder::build() {
    REQUIRE_STAGES(kAllStages);
    if (mOutGlop->mesh.vertices.attribFlags & VertexAttribFlags::kTextureCoord) {
        mDescription.hasTexture = mOutGlop->fill.texture.target == GL_TEXTURE_2D;
        mDescription.hasExternalTexture = mOutGlop->fill.texture.target == GL_TEXTURE_EXTERNAL_OES;
        if (mOutGlop->fill.texture.target == GL_TEXTURE_2D) {
            mDescription.hasTexture = true;
        } else {
            mDescription.hasExternalTexture = true;
        }

    }
    mDescription.hasColors = mOutGlop->mesh.vertices.attribFlags & VertexAttribFlags::kColor;
    mDescription.hasVertexAlpha = mOutGlop->mesh.vertices.attribFlags & VertexAttribFlags::kAlpha;