Fix RGBA vs RGB selection when creating GLTexture.
PiperOrigin-RevId: 499877590
This commit is contained in:
parent
43bf02443c
commit
463cbb60ee
|
@ -285,7 +285,7 @@ class GlProcessor : public ImageToTensorConverter {
|
||||||
auto source_texture = gl_helper_.CreateSourceTexture(input);
|
auto source_texture = gl_helper_.CreateSourceTexture(input);
|
||||||
tflite::gpu::gl::GlTexture input_texture(
|
tflite::gpu::gl::GlTexture input_texture(
|
||||||
GL_TEXTURE_2D, source_texture.name(),
|
GL_TEXTURE_2D, source_texture.name(),
|
||||||
input_num_channels == 4 ? GL_RGB : GL_RGBA,
|
input_num_channels == 4 ? GL_RGBA : GL_RGB,
|
||||||
source_texture.width() * source_texture.height() *
|
source_texture.width() * source_texture.height() *
|
||||||
input_num_channels * sizeof(uint8_t),
|
input_num_channels * sizeof(uint8_t),
|
||||||
/*layer=*/0,
|
/*layer=*/0,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user