Enabling MSAA using QSurfaceFormat not showing up GUI
Unsolved
Mobile and Embedded
-
Hello forum members,
I tried to enable the MSAA through QSurfaceFormat in the application.
After invoking the application it's running successfully but failed to load the user interface on the target platform.
But in the desktop, it's working and showing the user interface.#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "backend.h" #include <QFontDatabase> #include <QSurfaceFormat> int main(int argc, char *argv[]) { // Applying MSAA QSurfaceFormat format; format.setSamples(4); QSurfaceFormat::setDefaultFormat(format); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); }
Platform specs
Board: imx_6
kernal: 4.14
Rendering mode: DRMLibraries involved: ldd /usr/bin/qt5-opengles2-test linux-vdso.so.1 (0xbeddb000) libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0xb6ac4000) libQt5Sensors.so.5 => /usr/lib/libQt5Sensors.so.5 (0xb6a81000) libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0xb65a4000) libGLESv2.so.2 => /usr/lib/libGLESv2.so.2 (0xb658a000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6443000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6416000) libc.so.6 => /lib/libc.so.6 (0xb62d6000) libpthread.so.0 => /lib/libpthread.so.0 (0xb62ad000) libpng16.so.16 => /usr/lib/libpng16.so.16 (0xb6274000) libz.so.1 => /lib/libz.so.1 (0xb6250000) libm.so.6 => /lib/libm.so.6 (0xb61cb000) libicui18n.so.60 => /usr/lib/libicui18n.so.60 (0xb5fb1000) libicuuc.so.60 => /usr/lib/libicuuc.so.60 (0xb5e45000) libdl.so.2 => /lib/libdl.so.2 (0xb5e32000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb5d2f000) /lib/ld-linux-armhf.so.3 (0xb6f32000) libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb5d11000) libglapi.so.0 => /usr/lib/libglapi.so.0 (0xb5cd7000) libicudata.so.60 => /usr/lib/libicudata.so.60 (0xb431e000) libpcre.so.1 => /usr/lib/libpcre.so.1 (0xb42ce000) ls /usr/lib | grep viv libdrm_etnaviv.so.1 libdrm_etnaviv.so.1.0.0
EGL info output
eglinfo-fb EGL information: API version: 1.4 vendor string: Mesa Project version string: 1.4 (DRI2) client APIs: OpenGL OpenGL_ES extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export number of configurations: 24 win = window (c) = conformant slow = slow config gl = Desktop OpenGL pb = pbuffer (n) = non-conformant nonconfmt = non-conformant config es1,es2 = OpenGL ES 1.x/2.x pix = pixmap vg = OpenVG # ID LEVEL COLORBUFFER.......... DEPTH STENCIL MULTISAMPLE.... VISUAL....... SURFACES.. RENDERABLES...................... . type size r g b a size size samples buffers type id apis native 0 1 0 rgb 32 8 8 8 8 0 0 0 0 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 1 2 0 rgb 32 8 8 8 8 24 0 0 0 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 2 3 0 rgb 32 8 8 8 8 24 8 0 0 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 3 4 0 rgb 32 8 8 8 8 0 0 2 1 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 4 5 0 rgb 32 8 8 8 8 0 0 4 1 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 5 6 0 rgb 32 8 8 8 8 24 0 2 1 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 6 7 0 rgb 32 8 8 8 8 24 0 4 1 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 7 8 0 rgb 32 8 8 8 8 24 8 2 1 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 8 9 0 rgb 32 8 8 8 8 24 8 4 1 0x3038 0x34325241 win gl(c),es1(c),es2(c) yes 9 10 0 rgb 24 8 8 8 0 0 0 0 0 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 10 11 0 rgb 24 8 8 8 0 24 0 0 0 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 11 12 0 rgb 24 8 8 8 0 24 8 0 0 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 12 13 0 rgb 24 8 8 8 0 0 0 2 1 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 13 14 0 rgb 24 8 8 8 0 0 0 4 1 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 14 15 0 rgb 24 8 8 8 0 24 0 2 1 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 15 16 0 rgb 24 8 8 8 0 24 0 4 1 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 16 17 0 rgb 24 8 8 8 0 24 8 2 1 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 17 18 0 rgb 24 8 8 8 0 24 8 4 1 0x3038 0x34325258 win gl(c),es1(c),es2(c) yes 18 19 0 rgb 16 5 6 5 0 0 0 0 0 0x3038 0x36314752 win gl(c),es1(c),es2(c) yes 19 20 0 rgb 16 5 6 5 0 16 0 0 0 0x3038 0x36314752 win gl(c),es1(c),es2(c) yes 20 21 0 rgb 16 5 6 5 0 0 0 2 1 0x3038 0x36314752 win gl(c),es1(c),es2(c) yes 21 22 0 rgb 16 5 6 5 0 0 0 4 1 0x3038 0x36314752 win gl(c),es1(c),es2(c) yes 22 23 0 rgb 16 5 6 5 0 16 0 2 1 0x3038 0x36314752 win gl(c),es1(c),es2(c) yes 23 24 0 rgb 16 5 6 5 0 16 0 4 1 0x3038 0x36314752 win gl(c),es1(c),es2(c) yes No valid surface: A NativeWindowType argument does not refer to a valid native window. OpenGL ES 1 information: version string: OpenGL ES-CM 1.1 Mesa 17.3.8 renderer string: Vivante GC880 rev 5106 extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_stencil_wrap GL_OES_compressed_paletted_texture GL_OES_query_matrix GL_OES_read_format GL_OES_single_precision GL_EXT_texture_compression_dxt1 GL_OES_draw_texture GL_OES_point_size_array GL_OES_point_sprite GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_framebuffer_object GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_texture_npot GL_OES_EGL_image GL_OES_packed_depth_stencil GL_OES_texture_cube_map GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_OES_blend_equation_separate GL_OES_blend_func_separate GL_OES_blend_subtract GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_map_buffer_range GL_KHR_debug GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_compressed_ETC1_RGB8_sub_texture GL_KHR_no_error main stats: max texture size: 8192 max cubemap texture size: 8192 max texture image units: -1228501676 max renderbuffer size: 8192 max combined texture image units: -1226986984 num compressed texture formats: 15 aliased line width range: 1 - 8192 aliased point size range: 1 - 8192 implementation color read format: 0x0 implementation color read type: 0x0 max viewport dimensions: 8192 x 8192 subpixel bits: 4 supported compressed texture formats: COMPRESSED_RGB_S3TC_DXT1_EXT COMPRESSED_RGBA_S3TC_DXT3_ANGLE COMPRESSED_RGBA_S3TC_DXT5_ANGLE COMPRESSED_RGBA_S3TC_DXT1_EXT ETC1_RGB8 PALETTE4_RGB8_OES PALETTE4_RGBA8_OES PALETTE4_R5_G6_B5_OES PALETTE4_RGBA4_OES PALETTE4_RGB5_A1_OES PALETTE8_RGB8_OES PALETTE8_RGBA8_OES PALETTE8_R5_G6_B5_OES PALETTE8_RGBA4_OES PALETTE8_RGB5_A1_OES No valid surface: A NativeWindowType argument does not refer to a valid native window. OpenGL ES 2 information: version string: OpenGL ES 2.0 Mesa 17.3.8 renderer string: Vivante GC880 rev 5106 extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_KHR_no_error main stats: max texture size: 8192 max cubemap texture size: 8192 max texture image units: 8 max renderbuffer size: 8192 max combined texture image units: 12 num compressed texture formats: 5 aliased line width range: 1 - 8192 aliased point size range: 1 - 8192 implementation color read format: 0x0 implementation color read type: 0x0 max viewport dimensions: 8192 x 8192 subpixel bits: 4 supported compressed texture formats: COMPRESSED_RGB_S3TC_DXT1_EXT COMPRESSED_RGBA_S3TC_DXT3_ANGLE COMPRESSED_RGBA_S3TC_DXT5_ANGLE COMPRESSED_RGBA_S3TC_DXT1_EXT ETC1_RGB8 shader specific stats: max vertex attribs: 16 max vertex texture image units: 4 num program binary formats: 0 num shader binary formats: 0 max varying vectors: 8 max vertex uniform vectors: 256 max fragment uniform vectors: 256 shader compiler: yes