Lock an AhardwareBuffer with multiple layers

38 views Asked by At

I am creating an AHardwareBuffer from raw pixel data. For which i simply follow below steps.

  1. Create AHardwareBuffer_Desc object.
  2. Call AHardwareBuffer_allocate()
  3. Lock hardware buffer using AHardwareBuffer_lock()
  4. After this i am populating it with pixel data using memcpy.
  5. Unlock using, AHardwareBuffer_unlock()

I am able to create an AHardwareBuffer for single layer. But unable to do so if number of layer is 6 (basically >1). As the call to AHardwareBuffer_lock() failed to lock an HardwareBuffer with multiple layers. (Specified in docs too).

How can i create an HardwareBuffer with 6 layers for rendering CUBEMAP.

0

There are 0 answers