Opened 2 years ago

Closed 19 months ago

Last modified 19 months ago

#6491 closed task (fixed)

Shadow framebuffer error, can't set shadows at "very high" level even when there is enough memory.

Reported by: nani Owned by:
Priority: If Time Permits Milestone: Alpha 26
Component: Core engine Keywords: gpu shadow buffer no memory
Cc: nani Patch:

Description (last modified by nani)

0ad shadow buffer crashes if shadow setting is very high even if there is enough memory. My hunch is that is trying to allocate at the integrated graphics. Resolution 4k, integrated VRAM memory 500 MB, dedicated GPU 4GB.

(Already set all system/nvidia control panel to only use the dedicated gpu for 0ad)

Windows 10. Attachment with the system info.

Attachments (4)

logs.zip (35.4 KB ) - added by nani 2 years ago.
logs.2.zip (29.1 KB ) - added by nani 2 years ago.
logs_mode_debug.zip (66.9 KB ) - added by nani 2 years ago.
logs_mode_release.zip (66.5 KB ) - added by nani 2 years ago.

Download all attachments as: .zip

Change History (18)

by nani, 2 years ago

Attachment: logs.zip added

comment:1 by nani, 2 years ago

Description: modified (diff)

comment:2 by Vladislav Belov, 2 years ago

Could you try enable debug checks via adding the lines below to the config file?

renderer.backend.debugcontext = "true"
renderer.backend.debugmessages = "true"
renderer.backend.debuglabels = "true"
renderer.backend.debugscopedlabels = "true"

by nani, 2 years ago

Attachment: logs.2.zip added

comment:3 by nani, 2 years ago

Attached the logs with those debug lines added to user config.

Opened game, changed shadow  from "high" to "very high" multiple times. Error Framebuffer showed up on  the left top each time, shadows disappeared.

comment:4 by Vladislav Belov, 2 years ago

So, the game doesn't crash itself and only shadows disappear?

Could you compile the game in Debug mode?

Last edited 2 years ago by Vladislav Belov (previous) (diff)

comment:5 by nani, 2 years ago

Summary: Shadow buffer crash even when enough VRAM memory.Shadow framebuffer error, can't set shadows at "very high" level even when there is enough memory.

in reply to:  4 ; comment:6 by nani, 2 years ago

Replying to Vladislav Belov:

So, the game doesn't crash itself and only shadows disappear? Could you compile the game in Debug mode?

No, no game crash. The shadows disappear, when trying to change them to "very high" level in the settings.

in reply to:  6 comment:7 by Vladislav Belov, 2 years ago

Replying to nani:

No, no game crash. The shadows disappear, when trying to change them to "very high" level in the settings.

Have you had a chance to test the debug build?

comment:8 by nani, 2 years ago

Added the new logs. This time I did the debug and release build against the last commit revision (18/4/2022).

by nani, 2 years ago

Attachment: logs_mode_debug.zip added

by nani, 2 years ago

Attachment: logs_mode_release.zip added

comment:9 by nani, 2 years ago

BTW: on the debug build it also happens the exact same thing, nothing different from what I can see.

Last edited 2 years ago by nani (previous) (diff)

comment:10 by Vladislav Belov, 2 years ago

From logs:

WARNING: OpenGL | high: error source: the API id 1285: GL_OUT_OF_MEMORY error generated. Failed to allocate CPU address space mapping for texture (consider building 64-bit app).

So we have no other way but to switch to 64-bit for shadows with high resolution. Refs #2611

comment:11 by Vladislav Belov, 2 years ago

Milestone: Alpha 26Alpha 27

in reply to:  11 comment:12 by nani, 19 months ago

Replying to Vladislav Belov:

Happy to say that this issue is not happening for the new release Alpha 26. I don't know if the fix was accidental from another change but now works without out of memory errors.

comment:13 by Vladislav Belov, 19 months ago

Resolution: fixed
Status: newclosed

Fixed in r26983.

comment:14 by Stan, 19 months ago

Milestone: Alpha 27Alpha 26
Note: See TracTickets for help on using tickets.