Assertion Failed on Intel HD 5500 with Linux / Mesa 22.3.1 / Vulkan
A failed assertion forces the yuzu-emulator to abort on Intel HD 5500 (Debian Testing). This is not a regression, yuzu did not work with earlier versions of Mesa on Vulkan on my system.
Using Vulkan, I see two different error instances, depending on the content:
Error Message 1:
yuzu: ../src/intel/vulkan_hasvk/anv_image.c:2567: anv_image_fill_surface_state: Assertion `isl_formats_have_same_bits_per_channel(lower_format, view.format) || isl_swizzle_is_identity_for_format(view.format, view.swizzle)' failed.
Error Message 2:
yuzu: ../src/intel/vulkan_hasvk/anv_image.c:863: add_aux_surface_if_supported: Assertion `!(image->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)' failed.
System information
System: Host: deb Kernel: 6.0.0-6-amd64 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 Desktop: N/A wm: xfwm dm: LightDM Distro: Debian GNU/Linux bookworm/sid CPU: Info: dual core model: Intel Core i5-5300U bits: 64 type: MT MCP arch: Broadwell rev: 4 cache: L1: 128 KiB L2: 512 KiB L3: 3 MiB Speed (MHz): avg: 975 high: 2400 min/max: 500/2900 cores: 1: 500 2: 500 3: 500 4: 2400 bogomips: 18357 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 Graphics: Device-1: Intel HD Graphics 5500 Mobile Workstation driver: i915 v: kernel arch: Gen-8 ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:1616 Display: x11 server: X.Org v: 1.21.1.5 compositor: xfwm v: 4.18.0 driver: X: loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1 Screen-1: 0 s-res: 1600x900 s-dpi: 96 Monitor-1: eDP-1 model: AU Optronics 0x233e res: 1600x900 dpi: 132 diag: 355mm (14") API: OpenGL v: 4.6 Mesa 22.3.1 (git-6db008a8) renderer: Mesa Intel HD Graphics 5500 (BDW GT2) direct render: Yes
glxinfo -B: name of display: :0.0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel (0x8086) Device: Mesa Intel(R) HD Graphics 5500 (BDW GT2) (0x1616) Version: 22.3.1 Accelerated: yes Video memory: 7829MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) HD Graphics 5500 (BDW GT2) OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.3.1 (git-6db008a8) OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.3.1 (git-6db008a8) OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.3.1 (git-6db008a8) OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Update Jan 06 2023: I was able to reproduce both errors in gdb.
------- gdb output Error 1:
yuzu: ../src/intel/vulkan_hasvk/anv_image.c:2567: anv_image_fill_surface_state: Assertion `isl_formats_have_same_bits_per_channel(lower_format, view.format) || isl_swizzle_is_identity_for_format(view.format, view.swizzle)' failed.
Thread 55 "GPU" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f7e8dcfa6c0 (LWP 15639)]
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation
(threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
at ./nptl/pthread_kill.c:44
#1 0x00007ffff48a9d2f in __pthread_kill_internal
(signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff485aef2 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/posix/raise.c:26
#3 0x00007ffff4845472 in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007ffff4845395 in __assert_fail_base
(fmt=0x7ffff49b9a70 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f7e5da26240 "isl_formats_have_same_bits_per_channel(lower_format, view.format) || isl_swizzle_is_identity_for_format(view.format, view.swizzle)", file=0x7f7e5da24f80 "../src/intel/vulkan_hasvk/anv_image.c", line=2567, function=<optimized out>) at ./assert/assert.c:92
#5 0x00007ffff4853df2 in __GI___assert_fail
(assertion=assertion@entry=0x7f7e5da26240 "isl_formats_have_same_bits_per_channel(lower_format, view.format) || isl_swizzle_is_identity_for_format(view.format, view.swizzle)", file=file@entry=0x7f7e5da24f80 "../src/intel/vulkan_hasvk/anv_image.c", line=line@entry=2567, function=function@entry=0x7f7e5da26500 <__PRETTY_FUNCTION__.8> "anv_image_fill_surface_state") at ./assert/assert.c:101
#6 0x00007f7e5d287407 in anv_image_fill_surface_state
(device=device@entry=0x555557b9c920, image=image@entry=0x7f7e5a361f40, aspect=aspect@entry=VK_IMAGE_ASPECT_COLOR_BIT, view_in=view_in@entry=0x7f7e5bce1390, --Type <RET> for more, q to quit, c to continue without paging--
view_usage=view_usage@entry=128, aux_usage=aux_usage@entry=ISL_AUX_USAGE_NONE, clear_color=0x7f7e8dcf7ef0, flags=ANV_IMAGE_VIEW_STATE_STORAGE_LOWERED, state_inout=0x7f7e5bce1490, image_param_out=0x7f7e5bce14d8)
at ../src/intel/vulkan_hasvk/anv_image.c:2567
#7 0x00007f7e5d287ea3 in anv_CreateImageView
(_device=0x555557b9c920, pCreateInfo=0x7f7e8dcf8270, pAllocator=<optimized out>, pView=0x7f7e8dcf8188) at ../src/intel/vulkan_hasvk/anv_image.c:2802
#8 0x0000555556441f14 in Vulkan::vk::Device::CreateImageView(VkImageViewCreateInfo const&) const (this=0x7f7e65e77a98, ci=...)
at /home/u/yuzu/src/video_core/vulkan_common/vulkan_wrapper.cpp:705
#9 0x00005555564044d6 in operator()Python Exception <class 'gdb.error'>: value has been optimized out
Python Exception <class 'gdb.error'>: value has been optimized out
(num_layers=..., num_layers=..., tex_type=Shader::TextureType::Color2D, __closure=<synthetic pointer>)
at /home/u/yuzu/src/video_core/renderer_vulkan/vk_texture_cache.cpp:1578
#10 Vulkan::ImageView::ImageView(Vulkan::TextureCacheRuntime&, VideoCommon::ImageViewInfo const&, VideoCommon::SlotId, Vulkan::Image&)
(this=0x7f7e5bbe87a8, runtime=<optimized out>, info=<optimized out>, image_id_=..., image=<optimized out>)
at /home/u/yuzu/src/video_core/renderer_vulkan/vk_texture_cache.cpp:1594
#11 0x00005555564050e1 in Vulkan::ImageView::ImageView(Vulkan::TextureCacheRuntime&, VideoCommon::ImageViewInfo const&, VideoCommon::SlotId, Vulkan::Image&, VideoCommon::SlotVector<Vulkan::Image> const&)
(this=0x7f7e5bbe87a8, runtime=..., info=..., image_id_=...,
--Type <RET> for more, q to quit, c to continue without paging--
image_id_@entry=..., image=..., slot_imgs=...)
at /home/u/yuzu/src/video_core/renderer_vulkan/vk_texture_cache.cpp:1615
#12 0x00005555563f5823 in VideoCommon::SlotVector<Vulkan::ImageView>::insert<Vulkan::TextureCacheRuntime&, VideoCommon::ImageViewInfo const&, VideoCommon::SlotId&, Vulkan::Image&, VideoCommon::SlotVector<Vulkan::Image>&>(Vulkan::TextureCacheRuntime&, VideoCommon::ImageViewInfo const&, VideoCommon::SlotId&, Vulkan::Image&, VideoCommon::SlotVector<Vulkan::Image>&) (this=0x7f7e75ffb840)
at /home/u/yuzu/src/./video_core/texture_cache/slot_vector.h:115
#13 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FindOrEmplaceImageView(VideoCommon::SlotId, VideoCommon::ImageViewInfo const&)
(this=this@entry=0x7f7e75ffb460, image_id=image_id@entry=..., info=...)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:1527
#14 0x00005555563fd60e in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::CreateImageView(Tegra::Texture::TICEntry const&)
(this=0x7f7e75ffb460, config=...)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:838
#15 0x00005555564199cf in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FindImageView(Tegra::Texture::TICEntry const&)
(config=..., this=0x7f7e75ffb460)
at /usr/include/c++/11/bits/hashtable.h:308
#16 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FindImageView(Tegra::Texture::TICEntry const&) (config=..., this=0x7f7e75ffb460)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:809
--Type <RET> for more, q to quit, c to continue without paging--
#17 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::VisitImageView(VideoCommon::DescriptorTable<Tegra::Texture::TICEntry>&, std::span<VideoCommon::SlotId, 18446744073709551615ul>, unsigned int)
(this=this@entry=0x7f7e75ffb460, table=..., index=<optimized out>, cached_imPython Exception <class 'gdb.error'>: No symbol "static_cast" in current context.
Python Exception <class 'gdb.error'>: value has been optimized out
age_view_ids=..., cached_image_view_ids=)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:412
#18 0x000055555641d634 in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FillImageViews<false>(VideoCommon::DescriptorTable<Tegra::Texture::TICEntry>&, std::span<VideoCommon::SlotId, 18446744073709551615ul>, std::span<VideoCommon::ImageViewInOut, 18446744073709551615ul>)Python Exception <class 'gdb.error'>: value has been optimized out
Python Exception <class 'gdb.error'>: value has been optimized out
Python Exception <class 'gdb.error'>: value has been optimized out
(cached_image_view_ids=, cached_image_view_ids=, views=, table=..., this=0x7f7e75ffb460) at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:388
#19 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FillGraphicsImageViews<false>(std::span<VideoCommon::ImageViewInOut, 18446744073709551615ul>)
Python Exception <class 'gdb.error'>: value has been optimized out
(this=0x7f7e75ffb460, views=)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:159
#20 0x000055555641ab0c in Vulkan::GraphicsPipeline::ConfigureImpl<Vulkan::(anonymous namespace)::SimpleVertexFragmentSpec>(bool)
(this=0x7f7e1c3858d0, is_indexed=<optimized out>)
at /usr/include/c++/11/span:90
#21 0x00005555563d2d9c in Vulkan::GraphicsPipeline::Configure(bool)
(is_indexed=true, this=0x7f7e1c3858d0)
at /home/u/yuzu/src/./video_core/renderer_vulkan/vk_graphics_pipeline.h:93
------- gdb output Error 2:
yuzu: ../src/intel/vulkan_hasvk/anv_image.c:863: add_aux_surface_if_supported: Assertion `!(image->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)' failed.
Thread 59 "GPU" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f7e077fe6c0 (LWP 31123)]
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation
(threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
at ./nptl/pthread_kill.c:44
#1 0x00007ffff48a9d2f in __pthread_kill_internal
(signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff485aef2 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/posix/raise.c:26
#3 0x00007ffff4845472 in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007ffff4845395 in __assert_fail_base
(fmt=0x7ffff49b9a70 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f7e4da253a0 "!(image->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)", file=0x7f7e4da24f80 "../src/intel/vulkan_hasvk/anv_image.c", line=863, function=<optimized out>) at ./assert/assert.c:92
#5 0x00007ffff4853df2 in __GI___assert_fail
(assertion=assertion@entry=0x7f7e4da253a0 "!(image->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)", file=file@entry=0x7f7e4da24f80 "../src/intel/vulkan_hasvk/anv_image.c", line=line@entry=863, function=function@entry=0x7f7e4da267f0 <__PRETTY_FUNCTION__.36> "add_aux_surface_if_supported") at ./assert/assert.c:101
#6 0x00007f7e4d28375d in add_aux_surface_if_supported
(device=device@entry=0x555557935180, image=image@entry=0x7f7c893f1b40, plane=plane@entry=0, fmt_list=fmt_list@entry=0x0, offset=offset@entry=18446744073709551615, stride=0, isl_extra_usage_flags=0, plane_format=...)
at ../src/intel/vulkan_hasvk/anv_image.c:863
#7 0x00007f7e4d283e95 in add_all_surfaces_implicit_layout
(stride=0, isl_extra_usage_flags=<optimized out>, isl_tiling_flags=<optimized out>, format_list_info=0x0, image=<optimized out>, device=<optimized out>)
at ../src/intel/vulkan_hasvk/anv_image.c:1249
#8 anv_image_init
(device=<optimized out>, image=<optimized out>, create_info=<optimized out>) at ../src/intel/vulkan_hasvk/anv_image.c:1497
#9 0x00007f7e4d284cc8 in anv_image_init_from_create_info
(device=device@entry=0x555557935180, image=image@entry=0x7f7c893f1b40, pCreateInfo=pCreateInfo@entry=0x7f7e077fc520)
at ../src/intel/vulkan_hasvk/anv_image.c:1587
#10 0x00007f7e4d284e9a in anv_CreateImage
--Type <RET> for more, q to quit, c to continue without paging--
(_device=0x555557935180, pCreateInfo=0x7f7e077fc520, pAllocator=0x0, pImage=0x7f7e077fc4c8) at ../src/intel/vulkan_hasvk/anv_image.c:1619
#11 0x00005555563ffff4 in Vulkan::vk::Device::CreateImage(VkImageCreateInfo const&) const (this=this@entry=0x7f7e4de77a28, ci=...)
at /home/u/yuzu/src/video_core/vulkan_common/vulkan_wrapper.cpp:685
#12 0x00005555563c6145 in Vulkan::(anonymous namespace)::MakeImage
(info=..., device=...)
at /home/u/yuzu/src/video_core/renderer_vulkan/vk_texture_cache.cpp:169
#13 Vulkan::Image::Image(Vulkan::TextureCacheRuntime&, VideoCommon::ImageInfo const&, unsigned long, unsigned long)
(this=this@entry=0x7f7e4a21d0c8, runtime_=..., info_=..., gpu_addr_=<optimized out>, cpu_addr_=<optimized out>)
at /home/u/yuzu/src/video_core/renderer_vulkan/vk_texture_cache.cpp:1246
#14 0x00005555563bd8e4 in VideoCommon::SlotVector<Vulkan::Image>::insert<Vulkan::TextureCacheRuntime&, VideoCommon::ImageInfo&, unsigned long&, unsigned long&>(Vulkan::TextureCacheRuntime&, VideoCommon::ImageInfo&, unsigned long&, unsigned long&) (this=<optimized out>)
at /home/u/yuzu/src/./video_core/texture_cache/slot_vector.h:115
#15 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::JoinImages(VideoCommon::ImageInfo const&, unsigned long, unsigned long)
(this=<optimized out>, info=<optimized out>, gpu_addr=<optimized out>, cpu_addr=<optimized out>)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:1087
#16 0x00005555563d9320 in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::InsertImage(VideoCommon::ImageInfo const&, unsigned long, VideoCommon::RelaxedOptions) (this=this@entry=0x7f7e5dffb3c8, info=..., gpu_addr=<optimized out>,
gpu_addr@entry=21692088320, options=VideoCommon::RelaxedOptions::Samples)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:980
#17 0x00005555563dcb6d in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FindOrInsertImage(VideoCommon::ImageInfo const&, unsigned long, VideoCommon::RelaxedOptions)
(options=VideoCommon::RelaxedOptions::Samples, gpu_addr=21692088320, info=..., this=0x7f7e5dffb3c8)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:808
#18 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FindRenderTargetView(VideoCommon::ImageInfo const&, unsigned long, bool)
--Type <RET> for more, q to quit, c to continue without paging--
(this=this@entry=0x7f7e5dffb3c8, info=..., gpu_addr=gpu_addr@entry=21692088320, is_clear=is_clear@entry=true)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:1293
#19 0x00005555563dd0bd in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::FindColorBuffer(unsigned long, bool)
(is_clear=true, index=0, this=0x7f7e5dffb3c8)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:1268
#20 VideoCommon::TextureCache<Vulkan::TextureCacheParams>::RescaleRenderTargets(bool) (this=0x7f7e5dffb3c8, is_clear=is_clear@entry=true)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:267
#21 0x00005555563dd389 in VideoCommon::TextureCache<Vulkan::TextureCacheParams>::UpdateRenderTargets(bool) (this=0x7f7e5dffb3c8, is_clear=true)
at /home/u/yuzu/src/./video_core/texture_cache/texture_cache.h:338
#22 0x00005555563930f5 in Vulkan::RasterizerVulkan::Clear(unsigned int)
(this=0x7f7e4de78580, layer_count=1)
at /home/u/yuzu/src/video_core/renderer_vulkan/vk_rasterizer.cpp:237
#23 0x00005555562ee750 in Tegra::MacroEngine::Execute(unsigned int, std::vector<unsigned int, std::allocator<unsigned int> > const&)
(this=0x7f7e0962c260, method=<optimized out>, parameters=std::vector of length 1, capacity 5 = {...}) at /home/u/yuzu/src/video_core/macro/macro.cpp:62
#24 0x00005555562ead2e in Tegra::Engines::Maxwell3D::CallMacroMethod(unsigned int, std::vector<unsigned int, std::allocator<unsigned int> > const&)
(parameters=std::vector of length 1, capacity 5 = {...}, method=<optimized out>, this=0x7f7e09622de0)
at /home/u/yuzu/src/video_core/engines/maxwell_3d.cpp:242
#25 Tegra::Engines::Maxwell3D::ProcessMacro(unsigned int, unsigned int const*, unsigned int, bool) (this=this@entry=0x7f7e09622de0, method=<optimized out>,
method@entry=3586, base_start=base_start@entry=0x7f7e077fcca8, amount=amount@entry=1, is_last_call=is_last_call@entry=true)
at /home/u/yuzu/src/video_core/engines/maxwell_3d.cpp:136
#26 0x00005555562eb9b8 in Tegra::Engines::Maxwell3D::CallMethod(unsigned int, unsigned int, bool)
(this=0x7f7e09622de0, method=<optimized out>, method_argument=<optimized out>, is_last_call=<optimized out>)
at /home/u/yuzu/src/video_core/engines/maxwell_3d.cpp:257