Giter VIP home page Giter VIP logo

mesa's People

Contributors

1ace avatar airlied avatar anholt avatar bnieuwenhuizen avatar brianpaul avatar christiankoenigamd avatar curro avatar evelikov avatar freedreno-zz avatar gfxstrand avatar hakzsam avatar ianromanick avatar imirkin avatar itoral avatar jljusten2 avatar jrfonseca avatar kaydenl avatar krh avatar marekolsak avatar mattst88 avatar mostawesomedude avatar nhaehnle avatar olvaffe avatar stereotype441 avatar tarceri avatar tstellaramd avatar versalinyaa avatar vinsonlee avatar wallbraker avatar zackr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mesa's Issues

ninja install fails with install_megadrivers.py error

I'm trying to update my Toshiba AC100 with the latest grate-driver (kernel 5.7.8, Arch Linux Arm) using the instructions on https://github.com/grate-driver/grate/wiki/Grate-driver:

Building natively on the AC100.

1.  git clone https://github.com/grate-driver/mesa.git
2.     cd mesa
3.     meson -Dprefix=/usr -Dgallium-drivers=grate -Ddri-drivers=swrast -Dplatforms=x11,drm -Dshared-glapi=true -Dgbm=true -Dglx=dri -Dosmesa=none -Dgles1=false -Dgles2=true -Degl=true -Dgallium-xa=false -Dgallium-vdpau=false -Dgallium-va=false -Dgallium-xvmc=false -Duse-elf-tls=false -Dgallium-nine=false -Db_ndebug=true -Dvulkan-drivers= -Dlibunwind=false -Dllvm=false build
4.     cd build/
5.     ninja && ninja install

Step 3 failed at first with 'no choice for 'grate'' error. I added 'grate' to the array under gallium-drivers in meson_option.txt and was then able to build mesa master branch with ninja in the first part of step 5.

However, the 'sudo ninja install' command fails:

[1/15] Generating git_sha1.h with a custom command
[1/2] Installing files.
installing /home/chris/Downloads/build/mesa/build/src/mesa/drivers/dri/libmesa_dri_drivers.so to /usr/lib/dri/swrast_dri.so
Installing src/mapi/shared-glapi/libglapi.so.0.0.0 to /usr/lib
Installing src/mapi/es2api/libGLESv2.so.2.0.0 to /usr/lib
Installing src/mesa/drivers/dri/libmesa_dri_drivers.so to /usr/lib/dri
Installing src/glx/libGL.so.1.2.0 to /usr/lib
Installing src/gbm/libgbm.so.1.0.0 to /usr/lib
Installing src/egl/libEGL.so.1.0.0 to /usr/lib
Installing src/gallium/targets/dri/libgallium_dri.so to /usr/lib/dri
Installing /home/chris/Downloads/build/mesa/include/KHR/khrplatform.h to /usr/include/KHR
Installing /home/chris/Downloads/build/mesa/include/GLES2/gl2.h to /usr/include/GLES2
Installing /home/chris/Downloads/build/mesa/include/GLES2/gl2ext.h to /usr/include/GLES2
Installing /home/chris/Downloads/build/mesa/include/GLES2/gl2platform.h to /usr/include/GLES2
Installing /home/chris/Downloads/build/mesa/include/GLES3/gl3.h to /usr/include/GLES3
Installing /home/chris/Downloads/build/mesa/include/GLES3/gl31.h to /usr/include/GLES3
Installing /home/chris/Downloads/build/mesa/include/GLES3/gl32.h to /usr/include/GLES3
Installing /home/chris/Downloads/build/mesa/include/GLES3/gl3ext.h to /usr/include/GLES3
Installing /home/chris/Downloads/build/mesa/include/GLES3/gl3platform.h to /usr/include/GLES3
Installing /home/chris/Downloads/build/mesa/include/GL/gl.h to /usr/include/GL
Installing /home/chris/Downloads/build/mesa/include/GL/glcorearb.h to /usr/include/GL
Installing /home/chris/Downloads/build/mesa/include/GL/glext.h to /usr/include/GL
Installing /home/chris/Downloads/build/mesa/include/GL/glx.h to /usr/include/GL
Installing /home/chris/Downloads/build/mesa/include/GL/glxext.h to /usr/include/GL
Installing /home/chris/Downloads/build/mesa/include/EGL/egl.h to /usr/include/EGL
Installing /home/chris/Downloads/build/mesa/include/EGL/eglext.h to /usr/include/EGL
Installing /home/chris/Downloads/build/mesa/include/EGL/eglplatform.h to /usr/include/EGL
Installing /home/chris/Downloads/build/mesa/include/EGL/eglmesaext.h to /usr/include/EGL
Installing /home/chris/Downloads/build/mesa/include/EGL/eglextchromium.h to /usr/include/EGL
Installing /home/chris/Downloads/build/mesa/include/GL/internal/dri_interface.h to /usr/include/GL/internal
Installing /home/chris/Downloads/build/mesa/src/gbm/main/gbm.h to /usr/include
Installing /home/chris/Downloads/build/mesa/src/util/00-mesa-defaults.conf to /usr/share/drirc.d
Installing /home/chris/Downloads/build/mesa/build/meson-private/glesv2.pc to /usr/lib/pkgconfig
Installing /home/chris/Downloads/build/mesa/build/meson-private/dri.pc to /usr/lib/pkgconfig
Installing /home/chris/Downloads/build/mesa/build/meson-private/gbm.pc to /usr/lib/pkgconfig
Installing /home/chris/Downloads/build/mesa/build/meson-private/egl.pc to /usr/lib/pkgconfig
Installing /home/chris/Downloads/build/mesa/build/meson-private/gl.pc to /usr/lib/pkgconfig
Running custom install script '/usr/bin/python /home/chris/Downloads/build/mesa/bin/install_megadrivers.py /home/chris/Downloads/build/mesa/build/src/mesa/drivers/dri/libmesa_dri_drivers.so /usr/lib/dri swrast_dri.so'
Running custom install script '/usr/bin/python /home/chris/Downloads/build/mesa/bin/install_megadrivers.py /home/chris/Downloads/build/mesa/build/src/gallium/targets/dri/libgallium_dri.so /usr/lib/dri'
FAILED: meson-install
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.

It looks like there is an argument missing to the install_megadrivers.py script for the libgallium_dri.so file.
Can you offer advice on how to fix this error please? I am new to the Meson build system, so don't know where the install script is taking values from.

mesa-21.1.0 fails to build with llvm support

mesa-21.1.0 fails to build with llvm support because of this commit:
06be898 .

the error is :

/mesa-76cfc1c0905dfd2177d7aaa117989cc862d4b851/src/gallium/drivers/llvmpipe/lp_screen.c: In function ‘llvmpipe_create_screen’:
../mesa-76cfc1c0905dfd2177d7aaa117989cc862d4b851/src/gallium/drivers/llvmpipe/lp_screen.c:891:9: error: ‘util_cpu_caps’ undeclared (first use in this function); did you mean ‘util_cpu_caps_t’?
891 | if (!util_cpu_caps.has_neon)
| ^~~~~~~~~~~~~
| util_cpu_caps_t
../mesa-76cfc1c0905dfd2177d7aaa117989cc862d4b851/src/gallium/drivers/llvmpipe/lp_screen.c:891:9: note: each undeclared identifier is reported only once for each function it appears in
ninja: build stopped: subcommand failed.

ac100: uvcvideo devices don't work with grate-driver

After installing the grate-driver libdrm, opentegra, mesa and libvdpau I noticed that the uvcvideo webcam device on AC100 no longer works. This was functional with stock mesa/libdrm/modesetting on 5.7.8.

tested with xawtv and guvcview, see attached logs. guvcview gives a little more information in the error message.

Also, the uvcvideo driver loads with some 'entity was not initialized' errors on the linux-grate kernel. On upstream 5.7.8 it loads OK.

Please see attached log.
uvcvideo.txt

depthSize for TF101

[I got the impression that this project uses GitHub issues as a support channel. If not, please direct me to a more appropriate channel.]

I'm running Ubuntu 20.10 on Asus EeePad Transformer TF101 (based on Tegra 20). I'm trying to use grate-driver to get acceleration for OpenGL. Currently I'm getting depthSize 16 for all visuals, but the OpenGL application that I'm trying to run requires at least 24.
Is this a fundamental limitation of TF101's hardware, or can it be improved with better (or more properly installed) drivers?

Output of apt list --installed: here.

Output of glxinfo: here.

My kernel is slightly modified compared to 5.11.0-rc7 from the mainline, but I don't think the modifications affect this issue at all.

tf101@localhost:~$ uname -a
Linux localhost.localdomain 5.11.0-rc7-00012-g472c2db86b4 #42 SMP PREEMPT Tue Feb 23 18:24:09 UTC 2021 armv7l armv7l armv7l GNU/Linux

tf101@localhost:~$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.10
Release:        20.10
Codename:       groovy

building hints needed

Hello!
I've brushed off the dust from my toshiba ac100 with tegra 2.

I'm using archlinux arm armv7h and sucessfully built xf86-video-opentegra, libvdpau-tegra and libdrm from your awesome grate project on the device directly (wrapped build commands from here to PKGBUILDs).

So now I have mainline kernel (~4.16.10, should I build grate kernel first?) and able to start X, so cool! %D

and trying to build mesa master brach:

sh autogen.sh
sh configure --prefix=/usr \
 --enable-dri \
 --enable-glx \
 --enable-shared-glapi \
 --enable-texture-float \
 --disable-nine \
 --enable-debug \
 --enable-dri3 \
 --enable-egl \
 --enable-gbm \
 --enable-gles1 \
 --enable-gles2 \
 --enable-glx-tls \
 --enable-valgrind=auto \
 --enable-llvm-shared-libs \
 --with-dri-drivers=swrast \
 --with-gallium-drivers=swrast,tegra \
 --with-vulkan-drivers= \
 --with-egl-platforms=x11,drm \ 
 --disable-nine \
 --disable-llvm \
 --disable-omx \
 --disable-va \
 --disable-vdpau \
 --disable-xa \
 --disable-xvmc \
 --disable-gallium-osmesa

with no luck during sh autogen.sh , getting:

...
checking for libdrm >= 2.4.75 libdrm_intel >= 2.4.75... no
configure: error: Package requirements (libdrm >= 2.4.75 libdrm_intel >= 2.4.75) were not met:

No package 'libdrm_intel' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables I915_CFLAGS
and I915_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Am I missing something obvious here? Saw this discussion but not sure how to interpret it. Looks like I cannot exclude some intel i915 drivers from building?

wayland / weston on mesa / grate

Hello,

i try to run weston on a T20 but it won't work.
Is this not supported yet, is it a bug or I'm doing something wrong?

weston log and gdb backtrace:

[12:41:46.922] weston 3.0.0
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=3.0.0
               Build: unknown (not built from git or tarball)
[12:41:46.922] Command line: /usr/bin/weston --tty 4
[12:41:46.922] OS: Linux, 4.19.98, #1 SMP PREEMPT Fri May 15 07:25:02 UTC 2020, armv7l
[12:41:46.922] warning: XDG_RUNTIME_DIR "/tmp/runtime-root" is not configured
correctly.  Unix access mode must be 0700 (current mode is 755),
and must be owned by the user (current owner is UID 0).
Refer to your distribution on how to get it, or
http://www.freedesktop.org/wiki/Specifications/basedir-spec
on how to implement it.
[12:41:46.923] Starting with no config file.
[12:41:46.923] Output repaint window is 7 ms maximum.
[12:41:46.924] Loading module '/usr/lib/libweston-3/drm-backend.so'
[12:41:47.041] initializing drm backend
[12:41:47.059] using /dev/dri/card0
[12:41:47.060] Loading module '/usr/lib/libweston-3/gl-renderer.so'
[12:41:53.464] EGL client extensions: EGL_EXT_client_extensions
               EGL_EXT_device_base EGL_EXT_device_enumeration
               EGL_EXT_device_query EGL_EXT_platform_base
               EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug
               EGL_EXT_platform_wayland EGL_MESA_platform_gbm
               EGL_MESA_platform_surfaceless EGL_EXT_platform_device
[12:41:53.479] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected.
[12:41:53.479] EGL_KHR_surfaceless_context available
[12:41:53.485] EGL version: 1.4
[12:41:53.485] EGL vendor: Mesa Project
[12:41:53.485] EGL client APIs: OpenGL OpenGL_ES 
[12:41:53.486] EGL extensions: EGL_ANDROID_blob_cache EGL_EXT_buffer_age
               EGL_EXT_image_dma_buf_import 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_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_EXT_pixel_format_float
               EGL_KHR_wait_sync EGL_MESA_configless_context
               EGL_MESA_drm_image EGL_MESA_image_dma_buf_export
               EGL_MESA_query_driver EGL_WL_bind_wayland_display
[12:41:53.486] GL version: OpenGL ES 2.0 Mesa 19.3.1 (git-eb009ef53c)
[12:41:53.486] GLSL version: OpenGL ES GLSL ES 1.0.16
[12:41:53.486] GL vendor: Grate
[12:41:53.486] GL renderer: Tegra
[12:41:53.486] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_compression_s3tc 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_float
               GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image
               GL_OES_depth_texture GL_OES_packed_depth_stencil
               GL_AMD_compressed_ATC_texture
               GL_EXT_texture_type_2_10_10_10_REV 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_KHR_texture_compression_astc_ldr
               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
               GL_KHR_texture_compression_astc_sliced_3d
               GL_EXT_texture_compression_s3tc_srgb
               GL_KHR_parallel_shader_compile
[12:41:53.487] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[12:41:53.491] event0  - [12:41:53.491] EP0700M06: [12:41:53.491] is tagged by udev as: Touchscreen
[12:41:53.491] event0  - [12:41:53.491] EP0700M06: [12:41:53.491] device is a touch device
[12:41:53.493] event2  - [12:41:53.493] gpio-keys: [12:41:53.493] is tagged by udev as: Keyboard
[12:41:53.493] event2  - [12:41:53.493] gpio-keys: [12:41:53.493] device is a keyboard
[12:41:53.599] event1  - [12:41:53.599] wm97xx touchscreen: [12:41:53.599] is tagged by udev as: Touchscreen
[12:41:53.599] event1  - [12:41:53.599] wm97xx touchscreen: [12:41:53.599] device is a touch device
[12:41:53.628] Registered plugin API 'weston_drm_output_api_v1' of size 12
[12:41:53.630] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 1 - 1
[12:41:53.630] Failed to initialize backlight
[12:41:53.631] Output LVDS-1, (connector 41, crtc 40)
               mode [email protected], preferred, current
[12:41:53.632] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[12:41:53.633] Loading module '/usr/lib/weston/desktop-shell.so'
[12:41:53.712] launching '/usr/libexec/weston-keyboard'
[12:41:53.719] launching '/usr/libexec/weston-desktop-shell'
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:217/grate_stream_push_reloc(): drm_tegra_pushbuf_relocate() failed -22
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:209/grate_stream_push_reloc(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:209/grate_stream_push_reloc(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT
../../../../../../workspace/sources/mesa/src/gallium/drivers/grate/grate_stream.c:288/grate_stream_end(): Stream status isn't CONSTRUCT
could not load cursor 'dnd-move'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
xkbcommon: ERROR: Couldn't read Compose file /tmp/compose: Invalid argument
could not create XKB compose table for locale 'C'.  Disabiling compose
xkbcommon: ERROR: Couldn't read Compose file /tmp/compose: Invalid argument
could not create XKB compose table for locale 'C'.  Disabiling compose

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb642b114 in st_create_texture_sampler_view_from_stobj (glsl130_or_later=false, format=<optimized out>, stObj=0x3a64a0, st=0x82ee0)
    at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_sampler_view.c:551
#2  st_get_texture_sampler_view_from_stobj (st=st@entry=0x82ee0, stObj=stObj@entry=0x3a64a0, samp=samp@entry=0x3a64b4, glsl130_or_later=glsl130_or_later@entry=false, 
    ignore_srgb_decode=ignore_srgb_decode@entry=false) at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_sampler_view.c:595
#3  0xb65180d8 in st_update_single_texture (st=st@entry=0x82ee0, sampler_view=sampler_view@entry=0xbefff158, texUnit=<optimized out>, glsl130_or_later=glsl130_or_later@entry=false, 
    ignore_srgb_decode=ignore_srgb_decode@entry=false) at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_atom_texture.c:93
#4  0xb6518294 in update_textures (st=0x82ee0, shader_stage=PIPE_SHADER_FRAGMENT, prog=0x3b4ff0, sampler_views=0x833b4)
    at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_atom_texture.c:156
#5  0xb65d9804 in st_validate_state (st=st@entry=0x82ee0, pipeline=pipeline@entry=ST_PIPELINE_RENDER) at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_atom.c:261
#6  0xb6523dd8 in prepare_draw (ctx=0x6a7c8, st=0x82ee0) at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_draw.c:132
#7  st_draw_vbo (ctx=ctx@entry=0x6a7c8, prims=<optimized out>, nr_prims=nr_prims@entry=1, ib=0x0, index_bounds_valid=index_bounds_valid@entry=1 '\001', min_index=<optimized out>, min_index@entry=0, 
    max_index=<optimized out>, max_index@entry=3, tfb_vertcount=0x0, stream=0, indirect=0x0) at ../../../../../../workspace/sources/mesa/src/mesa/state_tracker/st_draw.c:184
#8  0xb65c7ea8 in _mesa_draw_arrays (ctx=0x6a7c8, mode=<optimized out>, start=0, count=4, numInstances=1, baseInstance=0, drawID=0) at ../../../../../../workspace/sources/mesa/src/mesa/main/draw.c:374
#9  0xb65c7f5c in _mesa_DrawArrays (mode=6, start=0, count=4) at ../../../../../../workspace/sources/mesa/src/mesa/main/draw.c:531
#10 0xb6b18068 in repaint_region (ev=ev@entry=0x3ab2a8, region=region@entry=0xbefff41c, surf_region=surf_region@entry=0xbefff430) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/gl-renderer.c:661
#11 0xb6b1856c in draw_view (damage=<optimized out>, output=<optimized out>, ev=0xac738) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/gl-renderer.c:826
#12 repaint_views (output=0xbf800000, output@entry=0xac780, damage=0x1e0, damage@entry=0xbefff4b8) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/gl-renderer.c:850
#13 0xb6b18804 in gl_renderer_repaint_output (output=0xac780, output_damage=0x0) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/gl-renderer.c:1145
#14 0xb6baab78 in drm_output_render_gl (damage=0xbefff65c, output=0xac780) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/compositor-drm.c:734
#15 drm_output_render (damage=0xbefff65c, output=0xac780) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/compositor-drm.c:796
#16 drm_output_repaint (output_base=0xac780, damage=0xbefff65c, repaint_data=<optimized out>) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/compositor-drm.c:880
#17 0xb6fa98f0 in weston_output_repaint (repaint_data=<optimized out>, output=<optimized out>) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/compositor.c:2312
#18 weston_output_maybe_repaint (repaint_data=<optimized out>, now=0xb6fcd000, output=<optimized out>) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/compositor.c:2376
#19 output_repaint_timer_handler (data=0x0) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/libweston/compositor.c:2442
#20 0xb6f836f8 in wl_event_source_timer_dispatch (source=0x2e8d8, ep=<optimized out>) at /usr/src/debug/wayland/1.16.0-r0/wayland-1.16.0/src/event-loop.c:236
#21 0xb6f83c80 in wl_event_loop_dispatch (loop=0x2d5a0, timeout=timeout@entry=-1) at /usr/src/debug/wayland/1.16.0-r0/wayland-1.16.0/src/event-loop.c:641
#22 0xb6f82a00 in wl_display_run (display=0x2d530, display@entry=0xb6ff72c8) at /usr/src/debug/wayland/1.16.0-r0/wayland-1.16.0/src/wayland-server.c:1260
#23 0x000143e0 in main (argc=<optimized out>, argv=0xbefffd44) at /usr/src/debug/weston/3.0.0-r0/weston-3.0.0/compositor/main.c:1969

Crash inside fixup_vertex

Hi,

I was debugging a crash in SDL-Ball, an open source game.

The crash backtrace is this

(gdb) backtrace
#0 0x00007f77fbc57885 in compile_vertex_list (ctx=ctx@entry=0x55a47f555940) at ../src/mesa/vbo/vbo_save_api.c:746
#1 0x00007f77fbc57e2b in wrap_buffers (ctx=0x55a47f555940) at ../src/mesa/vbo/vbo_save_api.c:868
#2 0x00007f77fbc5842c in upgrade_vertex (ctx=ctx@entry=0x55a47f555940, attr=attr@entry=7, newsz=newsz@entry=2) at ../src/mesa/vbo/vbo_save_api.c:975
#3 0x00007f77fbc586b9 in fixup_vertex (newType=5126, sz=2, attr=7, ctx=0x55a47f555940) at ../src/mesa/vbo/vbo_save_api.c:1079
#4 _save_TexCoord2f (x=0, y=0) at ../src/mesa/vbo/vbo_attrib_tmp.h:268
#5 0x000055a47f2a7d5a in mkDLscene (dl=0x7ffcc50eba9c, tex=...) at main.cpp:2939
#6 0x000055a47f29de3a in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:4056

And the problematic code:

void mkDLscene(GLuint *dl,textureClass tex)
{
  //Scenen
  *dl = glGenLists(1);
  glNewList(*dl,GL_COMPILE);
    glLoadIdentity();
    glTranslatef( 0.0f, 0.0f, -3.0 );
    glColor4f(1.0, 1.0, 1.0, 1.0);
    glEnable(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, tex.prop.texture);
    glBegin( GL_POINTS );
      glVertex3f( -1.60, 1.25, 0.0 );
    glEnd( );
    glBegin( GL_QUADS );
      //venstre kant
      glTexCoord2f(0.0f,0.0f);glVertex3f( -1.66, 1.25, 0.0 ); // <------ HERE specifically
      glTexCoord2f(1.0f,0.0f);glVertex3f( -1.60, 1.25, 0.0 );
      glTexCoord2f(1.0f,-1.0f);glVertex3f( -1.60,-1.25, 0.0 );
      glTexCoord2f(0.0f,-1.0f);glVertex3f( -1.66,-1.25, 0.0 );
      //højre kant
      glTexCoord2f(0.0f,0.0f);glVertex3f( 1.66, 1.25, 0.0 );
      glTexCoord2f(1.0f,0.0f);glVertex3f( 1.60, 1.25, 0.0 );
      glTexCoord2f(1.0f,-1.0f);glVertex3f( 1.60,-1.25, 0.0 );
      glTexCoord2f(0.0f,-1.0f);glVertex3f( 1.66,-1.25, 0.0 );
    glEnd( );
  glEndList();
}

Ubuntu version for libgl1-mesa-dri is 21.0.3-0ubuntu0.3 amd64

this look like a bug in mesa drivers implementation.

Qt/QML support

I compiled grate (mesa 21.2.2 branch) for a Apalis T30 based device (which is powered by a Tegra 3) to replace the properitary NVIDIA drivers. While e.g. Xorg runs fine, starting a simple Qt/QML based program (dynamicscene example) fails:

QSGContext::initialize: depth buffer support missing, expect rendering errors QSGContext::initialize: stencil buffer support missing, expect rendering errors ../git/src/gallium/drivers/grate/grate_stream.c:217/grate_stream_push_reloc(): drm_tegra_pushbuf_relocate() failed -22 ../git/src/gallium/drivers/grate/grate_stream.c:209/grate_stream_push_reloc(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:209/grate_stream_push_reloc(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:209/grate_stream_push_reloc(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:337/grate_stream_push_words(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:209/grate_stream_push_reloc(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:236/grate_stream_push(): Stream status isn't CONSTRUCT ../git/src/gallium/drivers/grate/grate_stream.c:288/grate_stream_end(): Stream status isn't CONSTRUCT Segmentation fault
This happens when using an xcb-based Qt platform driver as well when using the eglfs Qt platform driver.

Is this to be expected in the current development state? xeglgears/eglgears_x11 seem to run fine (at least running with 60 FPS without too much CPU load). In another thread I read that the grate mesa driver is currently only a proof of concept and more than glxgears is not really supposed to work?

Why isn't this updated?

Might be a bit rude to ask (probably some good reason for) but why isn't the Gallium3D driver updated for Tegra?

How to uninstall?

Trying to remove the mesa drivers as they worked poorly on my computer and messed up the graphics drivers. When I run glxinfo I get:

name of display: :1
MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  53
  Current serial number in output stream:  52

I'm using an nvidia jetson nano by the way. Trying to run sudo ninja uninstall returns

[0/1] /usr/local/bin/meson --internal uninstall Log file does not exist, no installation has been done

I do see a log file in mesa/build/meson-logs though

Can I help out with improving the state of the Mesa driver?

As the title says. What needs to be done and how could I help out on the development side? I have experience in C and GL, but find it hard to figure out where to start. Also: the compile-time dependency to the grate version of libdrm was removed, but I still need to have it around at runtime, correct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.