libcg/grvk

Civilization: Beyond Earth

libcg opened this issue ยท 19 comments

libcg commented

Meta-issue for CivBE.

  • Working?
  • ???

Doesn't work.
grvk.log
grvk_axl.log is empty.

Looks like CUBEMAP_ARRAY dimension and CULL_DISTANCE imported register aren't handled.

Hoi! Just made some testrun. Game starts up with DX11, crash with mantle with:

`Unhandled Exception
Code: EXCEPTION_ACCESS_VIOLATION
Error writing address 0x6a317088

Call Stack

(0x0000000000000000 : 0x6A317088) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00A2882E) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00A28EDD) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00A185A6) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00636B46) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x0051EF4E) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x0066AAB0) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00A0C534) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00A0C7EB) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x007D6D0F) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x00B01E54) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x7B62DCA0) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x7BC5D7F7) ??? ! ??? (???, line 0)
(0x0000000000000000 : 0x7BC5DEB0) ??? ! ??? (???, line 0)
`
steam-65980.log
grvk.log
grvk_axl.log

Ryzen 7 3800XT
32GB RAM
2 VEGA64

ArchLinux
Kernel 5.16.RC5
Proton Experimental and Proton GE 6.21 GE2
grvk 0.5.0

PS: just realized im still on MESA 21.3.

PS2:
Still the same error on freshly built mesa22-git. At one point in the logs it say:

I/00000118/grCreateDevice: 10005:0000 "llvmpipe (LLVM 13.0.0, 256 bits)" (Vulkan 1.2.199, driver 0.0.1)
I/00000118/grCreateDevice: DMA queue remapped to universal queue 0
E/00000118/grCreateDevice: vkCreateDevice failed (-7)
E/00000118/grCreateDevice: missing extension. make sure your Vulkan driver supports:
E/00000118/grCreateDevice: - VK_EXT_custom_border_color
E/00000118/grCreateDevice: - VK_EXT_extended_dynamic_state
E/00000118/grCreateDevice: - VK_EXT_shader_demote_to_helper_invocation
E/00000118/grCreateDevice: - VK_KHR_dynamic_rendering
E/00000118/grCreateDevice: - VK_KHR_swapchain

But in vulkaninfo:
Device Extensions: count = 134 VK_AMD_buffer_marker : extension revision 1 VK_AMD_device_coherent_memory : extension revision 1 VK_AMD_draw_indirect_count : extension revision 2 VK_AMD_gcn_shader : extension revision 1 VK_AMD_gpu_shader_half_float : extension revision 2 VK_AMD_gpu_shader_int16 : extension revision 2 VK_AMD_memory_overallocation_behavior : extension revision 1 VK_AMD_mixed_attachment_samples : extension revision 1 VK_AMD_rasterization_order : extension revision 1 VK_AMD_shader_ballot : extension revision 1 VK_AMD_shader_core_properties : extension revision 2 VK_AMD_shader_core_properties2 : extension revision 1 VK_AMD_shader_explicit_vertex_parameter : extension revision 1 VK_AMD_shader_fragment_mask : extension revision 1 VK_AMD_shader_image_load_store_lod : extension revision 1 VK_AMD_shader_info : extension revision 1 VK_AMD_shader_trinary_minmax : extension revision 1 VK_AMD_texture_gather_bias_lod : extension revision 1 VK_EXT_4444_formats : extension revision 1 VK_EXT_buffer_device_address : extension revision 2 VK_EXT_calibrated_timestamps : extension revision 2 VK_EXT_color_write_enable : extension revision 1 VK_EXT_conditional_rendering : extension revision 2 VK_EXT_conservative_rasterization : extension revision 1 VK_EXT_custom_border_color : extension revision 12 VK_EXT_depth_clip_enable : extension revision 1 VK_EXT_depth_range_unrestricted : extension revision 1 VK_EXT_descriptor_indexing : extension revision 2 VK_EXT_discard_rectangles : extension revision 1 VK_EXT_display_control : extension revision 1 VK_EXT_extended_dynamic_state : extension revision 1 VK_EXT_extended_dynamic_state2 : extension revision 1 VK_EXT_external_memory_dma_buf : extension revision 1 VK_EXT_external_memory_host : extension revision 1 VK_EXT_global_priority : extension revision 2 VK_EXT_global_priority_query : extension revision 1 VK_EXT_host_query_reset : extension revision 1 VK_EXT_image_drm_format_modifier : extension revision 2 VK_EXT_image_robustness : extension revision 1 VK_EXT_image_view_min_lod : extension revision 1 VK_EXT_index_type_uint8 : extension revision 1 VK_EXT_inline_uniform_block : extension revision 1 VK_EXT_line_rasterization : extension revision 1 VK_EXT_memory_budget : extension revision 1 VK_EXT_memory_priority : extension revision 1 VK_EXT_multi_draw : extension revision 1 VK_EXT_pci_bus_info : extension revision 2 VK_EXT_physical_device_drm : extension revision 1 VK_EXT_pipeline_creation_cache_control : extension revision 3 VK_EXT_pipeline_creation_feedback : extension revision 1 VK_EXT_primitive_topology_list_restart : extension revision 1 VK_EXT_private_data : extension revision 1 VK_EXT_provoking_vertex : extension revision 1 VK_EXT_queue_family_foreign : extension revision 1 VK_EXT_robustness2 : extension revision 1 VK_EXT_sample_locations : extension revision 1 VK_EXT_sampler_filter_minmax : extension revision 2 VK_EXT_scalar_block_layout : extension revision 1 VK_EXT_shader_atomic_float : extension revision 1 VK_EXT_shader_atomic_float2 : extension revision 1 VK_EXT_shader_demote_to_helper_invocation : extension revision 1 VK_EXT_shader_image_atomic_int64 : extension revision 1 VK_EXT_shader_stencil_export : extension revision 1 VK_EXT_shader_subgroup_ballot : extension revision 1 VK_EXT_shader_subgroup_vote : extension revision 1 VK_EXT_shader_viewport_index_layer : extension revision 1 VK_EXT_subgroup_size_control : extension revision 2 VK_EXT_texel_buffer_alignment : extension revision 1 VK_EXT_transform_feedback : extension revision 1 VK_EXT_vertex_attribute_divisor : extension revision 3 VK_EXT_vertex_input_dynamic_state : extension revision 2 VK_EXT_ycbcr_image_arrays : extension revision 1 VK_GOOGLE_decorate_string : extension revision 1 VK_GOOGLE_hlsl_functionality1 : extension revision 1 VK_GOOGLE_user_type : extension revision 1 VK_KHR_16bit_storage : extension revision 1 VK_KHR_8bit_storage : extension revision 1 VK_KHR_bind_memory2 : extension revision 1 VK_KHR_buffer_device_address : extension revision 1 VK_KHR_copy_commands2 : extension revision 1 VK_KHR_create_renderpass2 : extension revision 1 VK_KHR_dedicated_allocation : extension revision 3 VK_KHR_deferred_host_operations : extension revision 4 VK_KHR_depth_stencil_resolve : extension revision 1 VK_KHR_descriptor_update_template : extension revision 1 VK_KHR_device_group : extension revision 4 VK_KHR_draw_indirect_count : extension revision 1 VK_KHR_driver_properties : extension revision 1 VK_KHR_dynamic_rendering : extension revision 1 VK_KHR_external_fence : extension revision 1 VK_KHR_external_fence_fd : extension revision 1 VK_KHR_external_memory : extension revision 1 VK_KHR_external_memory_fd : extension revision 1 VK_KHR_external_semaphore : extension revision 1 VK_KHR_external_semaphore_fd : extension revision 1 VK_KHR_format_feature_flags2 : extension revision 1 VK_KHR_get_memory_requirements2 : extension revision 1 VK_KHR_image_format_list : extension revision 1 VK_KHR_imageless_framebuffer : extension revision 1 VK_KHR_incremental_present : extension revision 2 VK_KHR_maintenance1 : extension revision 2 VK_KHR_maintenance2 : extension revision 1 VK_KHR_maintenance3 : extension revision 1 VK_KHR_maintenance4 : extension revision 1 VK_KHR_multiview : extension revision 1 VK_KHR_pipeline_executable_properties : extension revision 1 VK_KHR_push_descriptor : extension revision 2 VK_KHR_relaxed_block_layout : extension revision 1 VK_KHR_sampler_mirror_clamp_to_edge : extension revision 3 VK_KHR_sampler_ycbcr_conversion : extension revision 14 VK_KHR_separate_depth_stencil_layouts : extension revision 1 VK_KHR_shader_atomic_int64 : extension revision 1 VK_KHR_shader_clock : extension revision 1 VK_KHR_shader_draw_parameters : extension revision 1 VK_KHR_shader_float16_int8 : extension revision 1 VK_KHR_shader_float_controls : extension revision 4 VK_KHR_shader_integer_dot_product : extension revision 1 VK_KHR_shader_non_semantic_info : extension revision 1 VK_KHR_shader_subgroup_extended_types : extension revision 1 VK_KHR_shader_subgroup_uniform_control_flow : extension revision 1 VK_KHR_shader_terminate_invocation : extension revision 1 VK_KHR_spirv_1_4 : extension revision 1 VK_KHR_storage_buffer_storage_class : extension revision 1 VK_KHR_swapchain : extension revision 70 VK_KHR_swapchain_mutable_format : extension revision 1 VK_KHR_synchronization2 : extension revision 1 VK_KHR_timeline_semaphore : extension revision 2 VK_KHR_uniform_buffer_standard_layout : extension revision 1 VK_KHR_variable_pointers : extension revision 1 VK_KHR_vulkan_memory_model : extension revision 3 VK_KHR_workgroup_memory_explicit_layout : extension revision 1 VK_KHR_zero_initialize_workgroup_memory : extension revision 1 VK_NV_compute_shader_derivatives : extension revision 1 VK_VALVE_mutable_descriptor_type : extension revision 1

All of the mentioned extensions are there.
steam-65980.log
grvk.log
grvk_axl.log

PS3:

After playing around with vulkaninfo and the vulkan loaders, turns out, for some reason the game want to load other icds instead of RADV, so moved them out of the way, no the game open a window, but closes it right after.

steam-65980.log
grvk.log
grvk_axl.log

theres a bunch of 'W/00000118/grAllocMemory: unhandled shareable flag' and 'W/00000118/emitOutput: unhandled import usage 7' and 'E/00000118/getSpvDimension: unhandled resource type 13'.

I/00000118/grCreateDevice: 10005:0000 "llvmpipe (LLVM 13.0.0, 256 bits)" (Vulkan 1.2.199, driver 0.0.1)

why the hell it selects llvmpipe "physical device"?

Also don't mind the shareable flag, but the game is actually crashing due to some flags in amd il translation being unimplemented, which triggers the crash after attempting to create a shader module.

I/00000118/grCreateDevice: 10005:0000 "llvmpipe (LLVM 13.0.0, 256 bits)" (Vulkan 1.2.199, driver 0.0.1)

why the hell it selects llvmpipe "physical device"?

Not sure why it did (possible misconfiguration, i have two identical gpu (two vega64) in my system and the default vulkan behaviour for some weird reason mark the wrong GPU as primary (the actually primary is on pcie bus 0c and the secondary is in 0f, but vulkan just reverse that order and mark 0f as gpuid0 while the actual primary gets gpuid1), so i have to overwrite it with either mesa device select layer or with vkdevicechooser layer, and if i dont do it, it goes...anywhere.), but after i got rid of every other icd (what mesa-git def install) except the radv icds, it stopped doing that...

Also don't mind the shareable flag, but the game is actually crashing due to some flags in amd il translation being unimplemented, which triggers the crash after attempting to create a shader module.

Sooo, its not supposed to work yet. Gotcha. Well, i will see notification about updates and when it will be about time i will be able to try to run the game with it.

libcg commented

@niobium93 @plasticbomb1986 can one of you run the game with this build and GRVK_DUMP_SHADERS=1, zip up the files and email them to me? I need to see what the shader looks like to fix unhandled import usage 7. However the shaders are under copyright so they can't be shared publicly.

In the afternoon i can, in about 9 hour.

@niobium93 @plasticbomb1986 can one of you run the game with this build and GRVK_DUMP_SHADERS=1, zip up the files and email them to me? I need to see what the shader looks like to fix unhandled import usage 7. However the shaders are under copyright so they can't be shared publicly.

New log, theres something new, at least it seems new in it for me.
grvk.log

About to send shaders now.

PS:Shaders sent. Now checking Thief.

@libcg Sent the shaders, here's a new trace log:
grvk.log

with trace here too
steam-65980.log
grvk.log
:

libcg commented

Thanks, I'll look into it soon. Focusing on DA:I right now.

New set of logs:
steam-65980.log
APP.log
Renderer.log
grvk.log
grvk_axl.log

I think its still the same story here.

Welp it seems that IL_BUF_DATA_FMT_8_8 isn't handled in AMD IL compiler.

libcg commented

Work in progress

Screenshot from 2022-03-19 16-25-35

Just built latest master, still doesn't load the menu.
grvk.log
wine.log
APP.log

libcg commented

Screenshot from 2022-05-01 12-35-49
it's going ingame with master + a few unmerged changes

I use the latest build "grvk-cf28ccc395b9b1a4099784df6160469ed2e3659e.zip" run this game
but it still didn't work
grvk.log

libcg commented

Yes, it needs some hacks to even reach the menu. I'll get these cleaned up and merged soon