Open
Description
When i create a android NativeHWTextureBuffer , and upload data to GPU, it works fine on Vulkan, but work failed on OpenGLES.
This is my code:
auto usage = igl::TextureDesc::TextureUsageBits::Sampled | igl::TextureDesc::TextureUsageBits::Storage;
igl::TextureDesc texture_desc = igl::TextureDesc::new2D(igl::TextureFormat::RGBA_UNorm8, width, height, usage, "HardwareBuffer");
texture_desc.storage = igl::ResourceStorage::Shared;
auto *platformDevice = device->getPlatformDevice<igl::vulkan::PlatformDevice>();//Vulkan
//auto *platformDevice = device->getPlatformDevice<igl::opengl::egl::PlatformDevice>();//OpenGLES
texture = platformDevice->createTextureWithSharedMemory(texture_desc, &result);
texture->upload(igl::TextureRangeDesc::new2D(0, 0, width, height), data);
I debug the code, opengl::egl::android::NativeHWTextureBuffer::uploadInternal() was executed, but it did not have any effect.
<
553E
!--/$-->
Metadata
Metadata
Assignees
Labels
No labels