Bug 109134

Summary: ../mesa-18.3.1/src/intel/isl/isl_surface_state.c:481: isl_gen7_surf_fill_state_s: Assertion `isl_swizzle_is_identity(info->view->swizzle)' failed.
Product: Mesa Reporter: Sergey Alirzaev <zl29ah>
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED WONTFIX QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: jason
Version: 18.3   
Hardware: Other   
OS: All   
i915 platform: i915 features:

Description Sergey Alirzaev 2018-12-22 13:50:02 UTC
I'm trying to play Civilization V using DX11 through Wine and DXVK, and encounter this assertion failure at start.
Comment 1 Sergey Alirzaev 2018-12-22 14:00:05 UTC
=>0 0xf7effb59 __kernel_vsyscall+0x9() in [vdso].so (0x0032e93c)
  1 0xf7add44a gsignal+0xc9() in libc.so.6 (0x0032e93c)
  2 0xf7ac62b6 abort+0xef() in libc.so.6 (0xf7c92ca0)
  3 0xf7ac61c1 in libc.so.6 (+0x191c0) (0xf7c92ca0)
  4 0xf7ad49ef __assert_fail+0x4e() in libc.so.6 (0xf55786ac)
  5 0xf53d5f74 isl_gen7_surf_fill_state_s+0x6bb() in libvulkan_intel.so (0x00000000)
  6 0xf53c538e isl_surf_fill_state_s+0x1a7() in libvulkan_intel.so (0x00000001)
  7 0xf51160a2 anv_image_fill_surface_state+0xd58() in libvulkan_intel.so (0x00000000)
  8 0xf5116849 anv_CreateImageView+0x65c() in libvulkan_intel.so (0x0032efa8)
  9 0x7cb7b3df _ZNK4dxvk2vk8VulkanFnIPF8VkResultP10VkDevice_TPK21VkImageViewCreateInfoPK21VkAllocationCallbacksPyEEclES4_S7_SA_SB_+0x22() in d3d11 (0x0032efd8)
  10 0x7cb7aab7 _ZN4dxvk13DxvkImageView10createViewE15VkImageViewTypej+0x1d0() in d3d11 (0x0032f0c8)
  11 0x7cb7a560 _ZN4dxvk13DxvkImageViewC2ERKNS_2RcINS_2vk8DeviceFnEEERKNS1_INS_9DxvkImageEEERKNS_23DxvkImageViewCreateInfoE+0x129() in d3d11 (0x0032f148)
  12 0x7cb6ac84 _ZN4dxvk10DxvkDevice15createImageViewERKNS_2RcINS_9DxvkImageEEERKNS_23DxvkImageViewCreateInfoE+0x39() in d3d11 (0x0032f188)
  13 0x7cbc367a _ZN4dxvk20DxvkUnboundResources15createImageViewEPNS_10DxvkDeviceERKNS_2RcINS_9DxvkImageEEE15VkImageViewTypej+0xcb() in d3d11 (0x0032f1f8)
  14 0x7cbc2de6 _ZN4dxvk20DxvkUnboundResourcesC2EPNS_10DxvkDeviceE+0xf5() in d3d11 (0x0032f258)
  15 0x7cb69bf1 _ZN4dxvk10DxvkDeviceC1ERKNS_2RcINS_11DxvkAdapterEEERKNS1_INS_2vk8DeviceFnEEERKNS_20DxvkDeviceExtensionsERKNS_18DxvkDeviceFeaturesE+0x398() in d3d11 (0x0032f2b8)
  16 0x7cb43402 _ZN4dxvk11DxvkAdapter12createDeviceENS_18DxvkDeviceFeaturesE+0x779() in d3d11 (0x0032f4b8)
  17 0x7cad66e9 _ZN4dxvk15D3D11DXGIDevice12CreateDeviceE17D3D_FEATURE_LEVEL+0xa8() in d3d11 (0x0032f708)
  18 0x7cad54e7 _ZN4dxvk15D3D11DXGIDeviceC1EP12IDXGIAdapterPNS_11DxvkAdapterE17D3D_FEATURE_LEVELj+0x94() in d3d11 (0x0032f758)
  19 0x7cae9ace D3D11CoreCreateDevice+0x6a0() in d3d11 (0x0032f918)
  20 0x7caea1f9 D3D11CreateDevice+0x37e() in d3d11 (0x0032f9c8)
Comment 2 Jason Ekstrand 2019-01-02 23:30:29 UTC
Looks like you're on Ivy Bridge.  Unfortunately, that platform doesn't support texture swizzle which the app is trying to use.  It's theoretically possible to implement with shader workarounds but likely not worth the effort.  This is why Vulkan on Ivy Bridge dumps a nice big warning. :-)

Given that Civilization V has a native Linux version, I recommend you use that.
Comment 3 Sergey Alirzaev 2019-01-03 00:01:07 UTC
glxinfo suggests mesa supports texture swizzling for OpenGL on this machine:
‰ glxinfo | grep -i swizzl
    GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, 
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback, 
    GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, 
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback, 

There's no Vox Populi mod for the Linux version, unfortunately, and the vanilla game sucks.
Comment 4 Jason Ekstrand 2019-01-03 00:03:35 UTC
We support it on Ivy Bridge with OpenGL using a shader re-compile mechanism that doesn't work and isn't practical to support in Vulkan.  Starting at Haswell, the hardware supports texture swizzle directly and we rely on that for Vulkan.  As I said above, it would be possible to implement with shader code but it's quite a bit of work and significantly harder than what we do in OpenGL.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.