The old code is buggy and set numlayers to 1 for GL_TEXTURE_2D_ARRAY when creating the view. Just change to use array_size directly. This fixes such tests in CtsNativeHardwareTestCases: android.hardware.nativehardware.cts.AHardwareBufferNativeTests#MultipleLayers_ColorTest_MipmapComplete_GL_RGB10_A2 android.hardware.nativehardware.cts.AHardwareBufferNativeTests#MultipleLayers_ColorTest_MipmapComplete_GL_RGB8 android.hardware.nativehardware.cts.AHardwareBufferNativeTests#MultipleLayers_ColorTest_MipmapComplete_GL_RGBA16F android.hardware.nativehardware.cts.AHardwareBufferNativeTests#MultipleLayers_ColorTest_MipmapComplete_GL_RGBA8 android.hardware.nativehardware.cts.AHardwareBufferNativeTests#MultipleLayers_ColorTest_MipmapComplete_GL_SRGB8_ALPHA8_sRGB Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Lepton Wu <lepton@chromium.org>macos/master
parent
66c57963aa
commit
1686cf92a7
Loading…
Reference in new issue