Skip to content

vrend: Fix wrong numlayers in vrend_make_view

Lepton Wu requested to merge lepton/virglrenderer:array_size into master

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

Edited by Lepton Wu

Merge request reports

Loading