Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error running on linux (leftwm) #783

Closed
Oreolek opened this issue May 27, 2023 · 2 comments
Closed

error running on linux (leftwm) #783

Oreolek opened this issue May 27, 2023 · 2 comments

Comments

@Oreolek
Copy link

Oreolek commented May 27, 2023

first run went fine but on the second run this happens:

latest git commit 39ae120, ArchLinux 64bit

----- R_InitOpenGL -----
Initializing Vulkan subsystem
Enabled Vulkan instance extensions:
    VK_EXT_debug_utils
    VK_KHR_xlib_surface
    VK_KHR_surface
    VK_KHR_get_physical_device_properties2
Enabled Vulkan layers:
Sys_Error: Cannot find a Vulkan device that supports all the required extensions and prope
rties.
AMD Radeon RX 5500 XT:
  - cannot support the requested swap chain size: requested 3838x2118,  available 1918x704 - 1918x704

UPD: it's a tiling leftwm window manager. It sees a new window and auto-resizes it to 1918x704. RBRoom3 runs in windowed mode by default, doesn't expect the window size to be different and bails. The solution is to run ./RBDoom3BFG +set r_windowWidth 1918 +set r_windowHeight 704 like the window manager expects.

This bug is present every time game runs, even if the game settings are set to "Fullscreen". Setting r_fullscreen doesn't help.

@Oreolek Oreolek changed the title cannot run UltimateHD on Linux --- May 27, 2023
@Oreolek Oreolek changed the title --- error running on linux May 27, 2023
@Oreolek Oreolek changed the title error running on linux error running on linux (leftwm) May 27, 2023
@SRSaunders
Copy link

SRSaunders commented May 30, 2023

In DeviceManager_VK.cpp, would you try replacing the following code:

if( surfaceCaps.minImageExtent.width > requestedExtent.width ||
	surfaceCaps.minImageExtent.height > requestedExtent.height ||
	surfaceCaps.maxImageExtent.width < requestedExtent.width ||
	surfaceCaps.maxImageExtent.height < requestedExtent.height )
{
	errorStream << std::endl << "  - cannot support the requested swap chain size:";
	errorStream << " requested " << requestedExtent.width << "x" << requestedExtent.height << ", ";
	errorStream << " available " << surfaceCaps.minImageExtent.width << "x" << surfaceCaps.minImageExtent.height;
	errorStream << " - " << surfaceCaps.maxImageExtent.width << "x" << surfaceCaps.maxImageExtent.height;
	deviceIsGood = false;
}

with:

m_DeviceParams.backBufferWidth = std::clamp( m_DeviceParams.backBufferWidth, surfaceCaps.minImageExtent.width, surfaceCaps.maxImageExtent.width );
m_DeviceParams.backBufferHeight = std::clamp( m_DeviceParams.backBufferHeight, surfaceCaps.minImageExtent.height, surfaceCaps.maxImageExtent.height );

and let me know the result. There may be one more issue to solve regarding the initial SDL window size, but I would like to know the answer regarding the swapchain backbuffer sizes first. This might finally be the clue I was looking for regarding #740. Thx.

UPDATE: The idea was correct but in the wrong place, and the SDL window size does need adjustment to match the modified swap chain extent. I will post a PR that addresses this (and hopefully #740 as well). Don't bother testing with the above change until I post the PR. Thanks.

@SRSaunders
Copy link

Hi @Oreolek, the fix for this is now merged into the head stream. If it solves your problem, would you please close this issue? Thx.

@Oreolek Oreolek closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants