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

(Windows) Game falls back to software renderer #400

Closed
lemming104 opened this issue Mar 12, 2022 · 6 comments
Closed

(Windows) Game falls back to software renderer #400

lemming104 opened this issue Mar 12, 2022 · 6 comments
Labels
bug renderer-hw Renderer: Any hardware renderer
Milestone

Comments

@lemming104
Copy link

lemming104 commented Mar 12, 2022

Currently on commit 6699d5a, building 64-bit using MSVC v17.

Regardless of renderer selected, the game always falls back to Direct3D + Software. Log contents below.

This is on a Windows 10 machine with an RTX 3080 card and up-to-date drivers.

Debugging into this, C:\git\bstone\src\bstone_detail_ren_3d_gl_error.cpp around line 199, assert fails. ERROR_CODE is 1282.

Call stack:

 	bstone.exe!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 388
 	bstone.exe!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 424
 	bstone.exe!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444	C++
 	bstone.exe!bstone::detail::Ren3dGlError::ensure_assert() Line 199
>	bstone.exe!bstone::detail::Ren3dGlSamplerImpl::sampler_deleter(unsigned int gl_name) Line 339
 	bstone.exe!bstone::UniqueResource<unsigned int,&bstone::detail::Ren3dGlSamplerImpl::sampler_deleter>::close() Line 157
 	bstone.exe!bstone::UniqueResource<unsigned int,&bstone::detail::Ren3dGlSamplerImpl::sampler_deleter>::~UniqueResource<unsigned int,&bstone::detail::Ren3dGlSamplerImpl::sampler_deleter>() Line 86
 	bstone.exe!bstone::detail::Ren3dGlSamplerImpl::~Ren3dGlSamplerImpl() Line 194
 	[External Code]	
 	bstone.exe!bstone::HwVideo::fail_nested(const char * message) Line 944
 	bstone.exe!`bstone::HwVideo::initialize_video'::`1'::catch$2() Line 11590
 	[External Code]	
 	bstone.exe!bstone::HwVideo::initialize_video() Line 11582
 	bstone.exe!bstone::HwVideo::HwVideo() Line 87
 	[External Code]	
 	bstone.exe!bstone::make_hw_video() Line 11600
 	bstone.exe!VL_Startup() Line 1712
 	bstone.exe!VW_Startup() Line 331
 	bstone.exe!InitGame() Line 1368
 	bstone.exe!freed_main() Line 1529
 	bstone.exe!SDL_main(int argc, char * * argv) Line 10016
 	bstone.exe!main_getcmdline() Line 71

Log:

VID] --------------------
[VID] Common configuration
[VID] --------------------
[VID] Renderer: OpenGL 3.2 core
[VID] Window positioned: false
[VID] Windowed x: 0
[VID] Windowed y: 0
[VID] Windowed width: 1280
[VID] Windowed height: 800
[VID] UI stretched: false
[VID] Widescreen: true
[VID] 2D texture filter: linear
[VID] 3D texture image filter: linear
[VID] 3D texture mipmap filter: linear
[VID] Texture anisotropy: 16
[VID] Texture upscale filter: xbrz
[VID] Texture upscale xBRZ factor: 4
[VID] Anti-aliasing kind: msaa
[VID] Anti-aliasing value: 8
[VID] --------------------
[VIDHW] 
[VIDHW] Initializing 3D renderer.
[VIDHW] Trying to initialize "OpenGL 3.2 core".
[VIDHW] 
[VIDHW] Device features
[VIDHW] ===============
[VIDHW] V-Sync: true
[VIDHW] V-Sync requires restart: false
[VIDHW] Texture max dimension: 32768
[VIDHW] Viewport max width: 32768
[VIDHW] Viewport max height: 32768
[VIDHW] Anisotropy: true
[VIDHW] Anisotropy max degree: 16
[VIDHW] Non-power-of-two textures: true
[VIDHW] Mipmap auto-generation: true
[VIDHW] Samplers: true
[VIDHW] MSAA: true
[VIDHW] MSAA (render-to-window): false
[VIDHW] MSAA requires restart: false
[VIDHW] MSAA max degree: 32
[VIDHW] Vertex input max locations: 16
[ERROR] [VID] [HW_VIDEO] HwVideo
[VID] Falling back to software accelerated video system.

[VID] --------------------
[VID] Common configuration
[VID] --------------------
[VID] Renderer: OpenGL 3.2 core
[VID] Window positioned: false
[VID] Windowed x: 0
[VID] Windowed y: 0
[VID] Windowed width: 1280
[VID] Windowed height: 800
[VID] UI stretched: false
[VID] Widescreen: true
[VID] 2D texture filter: linear
[VID] 3D texture image filter: linear
[VID] 3D texture mipmap filter: linear
[VID] Texture anisotropy: 16
[VID] Texture upscale filter: xbrz
[VID] Texture upscale xBRZ factor: 4
[VID] Anti-aliasing kind: msaa
[VID] Anti-aliasing value: 8
[VID] --------------------
[VIDSW] Available renderer drivers:
[VIDSW] 1. direct3d
[VIDSW] 2. opengl
[VIDSW] 3. opengles2
[VIDSW] 4. software
[VIDSW] Renderer: "direct3d".
[VIDSW] Pixel format: "SDL_PIXELFORMAT_ARGB8888"
@mrmatteastwood
Copy link

@bibendovsky @lemming104, I can confirm this bug. I thought the latest build was breaking XBRZ implementation, but reading through the logs, I realize that this is what's happening: the game falls back on Software rendering regardless of which OpenGL variant is selected in the menus. Detailed info and logs in my comment here:

#408 (comment)

Note I'm running the game on Linux Mint using the latest version of Wine. Issue does not occur on 1.2.11, but it does occur on the latest WIP builds for 1.2.12.

@bibendovsky bibendovsky added bug renderer-hw Renderer: Any hardware renderer labels Sep 10, 2022
@bibendovsky bibendovsky added this to the v1.2.12 milestone Sep 10, 2022
@bibendovsky
Copy link
Owner

Fixed in #429.
xBRZ upscale should work now.

@mrmatteastwood
Copy link

Sick! Would you happen to have an up-to-date binary? I'll be happy to test both this and the sound normalization issue on Wine under Linux Mint 21, then.

@bibendovsky
Copy link
Owner

Windows builds:
bstone-bin-win32-v1.2.12-wip-cb1f927bd892e0dafa8a94a790d230648c092821.zip
bstone-bin-win64-v1.2.12-wip-cb1f927bd892e0dafa8a94a790d230648c092821.zip

Changes:

@mrmatteastwood
Copy link

Fix confirmed in today's build on Wine Staging 7.17 under Linux Mint 21.

@lemming104
Copy link
Author

Confirmed. Hardware rendering and xBRZ texture upscaling seem to be working again on my machine.

Thanks; it's nice to have sharp textures and sprites again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug renderer-hw Renderer: Any hardware renderer
Projects
None yet
Development

No branches or pull requests

3 participants