Skip to content

Commit

Permalink
gles/compat: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-clayton authored and dsrbecky committed Sep 18, 2017
1 parent e55c12b commit 053c624
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gapis/api/gles/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func compat(ctx context.Context, device *device.Instance) (transform.Transformer
cmd := *cmd
if cmd.Texture != 0 && !c.Objects.Shared.GeneratedNames.Textures[cmd.Texture] {
// glGenTextures() was not used to generate the texture. Legal in GLES 2.
tmp := s.AllocDataOrPanic(ctx, VertexArrayId(cmd.Texture))
tmp := s.AllocDataOrPanic(ctx, cmd.Texture)
out.MutateAndWrite(ctx, dID, cb.GlGenTextures(1, tmp.Ptr()).AddRead(tmp.Data()))
}

Expand Down Expand Up @@ -996,10 +996,10 @@ func compat(ctx context.Context, device *device.Instance) (transform.Transformer
}
case EGLenum_EGL_NATIVE_BUFFER_ANDROID:
{
texId := newTexture(id, cb, out)
texID := newTexture(id, cb, out)
t := newTweaker(out, dID, cb)
defer t.revert(ctx)
t.glBindTexture_2D(ctx, texId)
t.glBindTexture_2D(ctx, texID)
img := GetState(s).EGLImages[cmd.Result].Image
sizedFormat := img.SizedFormat // Might be RGB565 which is not supported on desktop
textureCompat.convertFormat(ctx, GLenum_GL_TEXTURE_2D, &sizedFormat, nil, nil, out, id, cmd)
Expand All @@ -1012,7 +1012,7 @@ func compat(ctx context.Context, device *device.Instance) (transform.Transformer

out.MutateAndWrite(ctx, dID, cb.Custom(func(ctx context.Context, s *api.GlobalState, b *builder.Builder) error {
GetState(s).EGLImages[cmd.Result].TargetContext = c.Identifier
GetState(s).EGLImages[cmd.Result].TargetTexture = texId
GetState(s).EGLImages[cmd.Result].TargetTexture = texID
return nil
}))
}
Expand Down

0 comments on commit 053c624

Please sign in to comment.