jmorton06 / Lumos

Cross-Platform C++ 2D/3D game engine
MIT License
1.21k stars 130 forks source link

Lumos not work after compiling, Linux #94

Closed danilw closed 2 years ago

danilw commented 2 years ago

Linux x86-64

default debug build: Launching bin/Debug-linux-x86_64/LumosEditor result segfault

/Lumos> bin/Debug-linux-x86_64/LumosEditor
[17:24:37] Lumos Engine - Version 0.3.1
[17:24:37] Initialised JobSystem with [4 cores] [3 threads]
[17:24:37] Initialising System
[17:24:37] Loaded Editor Ini file Editor.ini
[17:24:37] VSync : True
[17:24:37] Creating window - Title : Example, Width : 1440, Height : 900
[17:24:37] Initialised GLFW version : 3.3.4 X11 GLX EGL OSMesa clock_gettime evdev
[17:24:37] Vulkan : 1.2.186
[17:24:37] GPU : NVIDIA GeForce GTX 750
[17:24:37] Vendor ID : 4318
[17:24:37] Device Type : DISCRETE GPU
[17:24:37] Driver Version : 495.176.0
[17:24:37] Selected physical device has 107 extensions
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[17:24:38] ImGui Version : 1.85 WIP
[17:24:38] ImConfig File : Source/Lumos/ImGui/ImConfig.h
[17:24:38] [SceneManager] - Enqueued scene : 2D
[17:24:38] [SceneManager] - Enqueued scene : Physics
[17:24:38] [SceneManager] - Enqueued scene : Terrain
[17:24:38] [SceneManager] - Enqueued scene : 2DTest
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[17:24:38] Initialised AudioManager - OpenAL Soft
[17:24:38] Initialised ImGui Manager
[17:24:38] DescriptorDesc not found. Index = 0
[17:24:38] [VULKAN] - ERROR : [Validation] Code 0  : Validation Error: [ VUID_Undefined ] Object 0: handle = 0x2a4d850, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x79de34d4 | vkAllocateDescriptorSets: required parameter pAllocateInfo->pSetLayouts specified as NULL.
Aborted (core dumped)

... and look like there are no command line option to select other Vulkan GPU (I have multiple in this system) https://github.com/jmorton06/Lumos/blob/master/Lumos/Source/Lumos/Platform/Vulkan/VKDevice.cpp#L41

./LumosEditor --help or ./LumosEditor -h it prints [17:19:35] Lumos Engine - Version 0.3.1 and freeze

release build has same result: Launching bin/Release-linux-x86_64/LumosEditor result segfault

/Lumos> bin/Release-linux-x86_64> ./LumosEditor
[17:44:42] Lumos Engine - Version 0.3.1
[17:44:42] Initialised JobSystem with [4 cores] [3 threads]
[17:44:42] Initialising System
[17:44:42] Loaded Editor Ini file Editor.ini
[17:44:42] No saved Project file found ExampleProject/Example.lmproj
[17:44:42] [SceneManager] - Enqueued scene : Empty Scene
[17:44:42] Serialising Application NewProject/NewProject.lmproj
[17:44:42] VSync : False
[17:44:42] Creating window - Title : App, Width : 1200, Height : 800
[17:44:42] Initialised GLFW version : 3.3.4 X11 GLX EGL OSMesa clock_gettime evdev
[17:44:42] Vulkan : 1.2.186
[17:44:42] GPU : NVIDIA GeForce GTX 750
[17:44:42] Vendor ID : 4318
[17:44:42] Device Type : DISCRETE GPU
[17:44:42] Driver Version : 495.176.0
[17:44:42] Selected physical device has 107 extensions
[17:44:42] ImGui Version : 1.85 WIP
[17:44:42] ImConfig File : Source/Lumos/ImGui/ImConfig.h
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[17:44:42] Initialised AudioManager - OpenAL Soft
[17:44:42] Initialised ImGui Manager
[17:44:42] DescriptorDesc not found. Index = 0
Aborted (core dumped)

in OpenGL mode also does not work:

[19:19:05] Lumos Engine - Version 0.3.1
[19:19:05] Initialised JobSystem with [4 cores] [3 threads]
[19:19:05] Initialising System
[19:19:05] Loaded Editor Ini file Editor.ini
[19:19:05] VSync : False
[19:19:05] Creating window - Title : App, Width : 1920, Height : 1023
[19:19:05] Initialised GLFW version : 3.3.4 X11 GLX EGL OSMesa clock_gettime evdev
[19:19:05] ----------------------------------
[19:19:05] [OPENGL] - 
[19:19:05] 4.1.0 NVIDIA 495.44
[19:19:05] NVIDIA Corporation
[19:19:05] NVIDIA GeForce GTX 750/PCIe/SSE2
[19:19:05] ----------------------------------
[19:19:05] [OPENGL] - Registering OpenGL debug callback
Aborted (core dumped)
danilw commented 2 years ago

Launching LumosEditor from First Github Release works, log

[19:09:40] Lumos Engine - Version 0.3.0
[19:09:40] Initialised JobSystem with [4 cores] [3 threads]
[19:09:40] Initialising System
[19:09:40] Editor Ini not found
[19:09:40] Creating Editor Ini Editor.ini
[19:09:40] No saved Project file found ExampleProject/Example.lmproj
[19:09:40] [SceneManager] - Enqueued scene : Empty Scene
[19:09:40] VSync : False
[19:09:40] Creating window - Title : App, Width : 1200, Height : 800
[19:09:40] Initialised GLFW version : 3.3.4 X11 GLX EGL OSMesa clock_gettime evdev
[19:09:40] Vulkan : 1.2.186
[19:09:40] GPU : NVIDIA GeForce GTX 750
[19:09:40] Vendor ID : 4318
[19:09:40] Device Type : DISCRETE GPU
[19:09:40] Driver Version : 495.176.0
[19:09:40] Selected physical device has 107 extensions
[19:09:40]   VK_KHR_16bit_storage
[19:09:40]   VK_KHR_8bit_storage
[19:09:40]   VK_KHR_bind_memory2
[19:09:40]   VK_KHR_buffer_device_address
[19:09:40]   VK_KHR_copy_commands2
[19:09:40]   VK_KHR_create_renderpass2
[19:09:40]   VK_KHR_dedicated_allocation
[19:09:40]   VK_KHR_depth_stencil_resolve
[19:09:40]   VK_KHR_descriptor_update_template
[19:09:40]   VK_KHR_device_group
[19:09:40]   VK_KHR_draw_indirect_count
[19:09:40]   VK_KHR_driver_properties
[19:09:40]   VK_KHR_external_fence
[19:09:40]   VK_KHR_external_fence_fd
[19:09:40]   VK_KHR_external_memory
[19:09:40]   VK_KHR_external_memory_fd
[19:09:40]   VK_KHR_external_semaphore
[19:09:40]   VK_KHR_external_semaphore_fd
[19:09:40]   VK_KHR_get_memory_requirements2
[19:09:40]   VK_KHR_image_format_list
[19:09:40]   VK_KHR_imageless_framebuffer
[19:09:40]   VK_KHR_maintenance1
[19:09:40]   VK_KHR_maintenance2
[19:09:40]   VK_KHR_maintenance3
[19:09:40]   VK_KHR_multiview
[19:09:40]   VK_KHR_pipeline_executable_properties
[19:09:40]   VK_KHR_present_id
[19:09:40]   VK_KHR_present_wait
[19:09:40]   VK_KHR_push_descriptor
[19:09:40]   VK_KHR_relaxed_block_layout
[19:09:40]   VK_KHR_sampler_mirror_clamp_to_edge
[19:09:40]   VK_KHR_sampler_ycbcr_conversion
[19:09:40]   VK_KHR_separate_depth_stencil_layouts
[19:09:40]   VK_KHR_shader_atomic_int64
[19:09:40]   VK_KHR_shader_clock
[19:09:40]   VK_KHR_shader_draw_parameters
[19:09:40]   VK_KHR_shader_float16_int8
[19:09:40]   VK_KHR_shader_float_controls
[19:09:40]   VK_KHR_shader_non_semantic_info
[19:09:40]   VK_KHR_shader_subgroup_extended_types
[19:09:40]   VK_KHR_shader_terminate_invocation
[19:09:40]   VK_KHR_spirv_1_4
[19:09:40]   VK_KHR_storage_buffer_storage_class
[19:09:40]   VK_KHR_swapchain
[19:09:40]   VK_KHR_swapchain_mutable_format
[19:09:40]   VK_KHR_synchronization2
[19:09:40]   VK_KHR_timeline_semaphore
[19:09:40]   VK_KHR_uniform_buffer_standard_layout
[19:09:40]   VK_KHR_variable_pointers
[19:09:40]   VK_KHR_vulkan_memory_model
[19:09:40]   VK_KHR_workgroup_memory_explicit_layout
[19:09:40]   VK_KHR_zero_initialize_workgroup_memory
[19:09:40]   VK_EXT_4444_formats
[19:09:40]   VK_EXT_blend_operation_advanced
[19:09:40]   VK_EXT_buffer_device_address
[19:09:40]   VK_EXT_calibrated_timestamps
[19:09:40]   VK_EXT_color_write_enable
[19:09:40]   VK_EXT_conditional_rendering
[19:09:40]   VK_EXT_custom_border_color
[19:09:40]   VK_EXT_depth_clip_enable
[19:09:40]   VK_EXT_depth_range_unrestricted
[19:09:40]   VK_EXT_descriptor_indexing
[19:09:40]   VK_EXT_discard_rectangles
[19:09:40]   VK_EXT_display_control
[19:09:40]   VK_EXT_extended_dynamic_state
[19:09:40]   VK_EXT_extended_dynamic_state2
[19:09:40]   VK_EXT_external_memory_host
[19:09:40]   VK_EXT_global_priority
[19:09:40]   VK_EXT_global_priority_query
[19:09:40]   VK_EXT_host_query_reset
[19:09:40]   VK_EXT_image_robustness
[19:09:40]   VK_EXT_index_type_uint8
[19:09:40]   VK_EXT_inline_uniform_block
[19:09:40]   VK_EXT_line_rasterization
[19:09:40]   VK_EXT_memory_budget
[19:09:40]   VK_EXT_multi_draw
[19:09:40]   VK_EXT_pci_bus_info
[19:09:40]   VK_EXT_physical_device_drm
[19:09:40]   VK_EXT_pipeline_creation_cache_control
[19:09:40]   VK_EXT_pipeline_creation_feedback
[19:09:40]   VK_EXT_private_data
[19:09:40]   VK_EXT_provoking_vertex
[19:09:40]   VK_EXT_robustness2
[19:09:40]   VK_EXT_scalar_block_layout
[19:09:40]   VK_EXT_separate_stencil_usage
[19:09:40]   VK_EXT_shader_atomic_float
[19:09:40]   VK_EXT_shader_demote_to_helper_invocation
[19:09:40]   VK_EXT_shader_image_atomic_int64
[19:09:40]   VK_EXT_shader_subgroup_ballot
[19:09:40]   VK_EXT_shader_subgroup_vote
[19:09:40]   VK_EXT_subgroup_size_control
[19:09:40]   VK_EXT_texel_buffer_alignment
[19:09:40]   VK_EXT_tooling_info
[19:09:40]   VK_EXT_transform_feedback
[19:09:40]   VK_EXT_vertex_attribute_divisor
[19:09:40]   VK_EXT_vertex_input_dynamic_state
[19:09:40]   VK_EXT_ycbcr_2plane_444_formats
[19:09:40]   VK_EXT_ycbcr_image_arrays
[19:09:40]   VK_NV_dedicated_allocation
[19:09:40]   VK_NV_dedicated_allocation_image_aliasing
[19:09:40]   VK_NV_device_diagnostic_checkpoints
[19:09:40]   VK_NV_device_diagnostics_config
[19:09:40]   VK_NV_device_generated_commands
[19:09:40]   VK_NV_inherited_viewport_scissor
[19:09:40]   VK_NV_shader_sm_builtins
[19:09:40]   VK_NV_shader_subgroup_partitioned
[19:09:40]   VK_NVX_multiview_per_view_attributes
[19:09:40] [VULKAN] Failed to set up debug callback!
[19:09:40] ImGui Version : 1.83 WIP
[19:09:40] ImConfig File : Source/Lumos/ImGui/ImConfig.h
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[19:09:40] Initialising AudioManager - OpenAL Soft, Number of devices : OpenAL Soft
[19:09:40] Initialised ImGui Manager
[19:09:41] [SceneManager] - Scene switched to : Empty Scene
jmorton06 commented 2 years ago

Will look into this. I think it’s not loading the shaders properly. Probably something to do with paths not being right.

danilw commented 2 years ago

Well idk how to launch it correctly or what resource it needs... if I launching wrong then sorry for wrong bugreport...

I tried to launch from dirrectroty cd bin/Debug-linux-x86_64 and from top level Lumos folder, crash the same

jmorton06 commented 2 years ago

It’ll be my mistake not setting it up to work well on different machines sorry.

In Lumos/Source/Lumos/Graphics/RHI/Renderer.cpp There is a bool to use embedded shaders. Might help setting that to true but might crash elsewhere I’m not sure. Will try to get a proper fix

jmorton06 commented 2 years ago

Latest commit may work now

danilw commented 2 years ago

works now! (after compiling it works) thanks!

there some validation errors, better il make new bugreort, this can be closed I think