Opened 6 years ago

Last modified 6 years ago

#4883 new defect

Shadow framebuffer problem a23

Reported by: OptimusShepard Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description

Since this developer alpha (23) I get this warning and the following bug (see the screenshot) when I selecting shadow quality "very high". My graphiccard is a GTX 970

WARNING: Framebuffer object incomplete: 0x8CD6

Attachments (1)

shadow_bug.png (1.8 MB ) - added by OptimusShepard 6 years ago.

Download all attachments as: .zip

Change History (11)

by OptimusShepard, 6 years ago

Attachment: shadow_bug.png added

comment:1 by Stan, 6 years ago

Component: Art & AnimationCore engine

comment:2 by elexis, 6 years ago

Got a system_info.txt? wiki:ReportingErrors

I'd assume the graphics card ran out of memory. But that had shown me an according human-readable error IIRC.

comment:3 by elexis, 6 years ago

Also, does it only occur on a specific maps or very large maps? Tried anatolian plateau tiny mapsize?

comment:4 by OptimusShepard, 6 years ago

So I have tryed now a few maps on different sizes.

Every time I start the first game (when I start 0AD from new), I get the warning and the following message. There it doesn't matter witch map or size. (Don't know if I had overlook this error when I had write this ticket)

ERROR: CRenderer::EndFrame: GL errors GL_OUT_OF_MEMORY (0505) occurred

If I start a second game (without restarting 0AD) there is no error or warning.

I had check my vram with gpu-z. My highest use is ~1,2GB from 4(3,5)GB, so there should be no problem. I also had updatet my graphic driver.

Interstingly, not every time I get this error message the textures are not loading. And I also can't recognize a pattern.

When I get this texture problem I have to restart 0AD til it could run normaly.

comment:5 by elexis, 6 years ago

I believe the memory must not only be available but also contiguous.

r20001 is the commit and ShadowMap.cpp the file you're looking for.

Can you try to add a LOGERROR in the CreateTexture function to print the size of the texture (quick websearch should help finding out the size)?

I suppose the GL_OUT_OF_MEMORY occurs in the ogl_WarnIfError(); call.

If we can confirm that it's this, perhaps we can handle it a bit better, print a human readable error and inform the user that the lower quality shadow map is used rather than a glitchy plain black.

comment:6 by OptimusShepard, 6 years ago

Because of using a high resolution of 3440x1440 I had tested dem vram usage with another system.

Setting maxed out, shadow on high, 3440x1440 (giantic mapize)

~1,9GB vram usage

Setting maxed out, shadow very high, 3440x1440 (giantic mapsize)

~3,9GB vram usage

The problem occurs every time by using shadow quality very high, or more often by using shadow quality high.

Maybe this could be a special problem by the GTX 970? This card has 3,5GB normal vram, and 0,5GB slow vram. Nvidia driver forces the applications to use the 3,5GB before using the other. So maybe the driver causes the problem?

If time permits I could work on this problem for alpha 24.

comment:7 by Vladislav Belov, 6 years ago

There is a problem, that we can't calculate a free space in a common way. So we can't prevent the error in a common way. Only with GL extensions, and there is a different extension for each kind of vendor. I'm not sure that there's one for Intel.

comment:8 by OptimusShepard, 6 years ago

I think you meant Nvidia, right? So the bug is currently unfixable?

https://developer.nvidia.com/nvidia-opengl-specs

So maybe there are the extensions which are needed? Maybe someone else who have this problems too, will look on this. I don't think this is for beginners.

in reply to:  8 ; comment:9 by Vladislav Belov, 6 years ago

Replying to OptimusShepard:

I think you meant Nvidia, right?

Not only.

So the bug is currently unfixable? So maybe there are the extensions which are needed? Maybe someone else who have this problems too, will look on this. I don't think this is for beginners.

In common way - yes. Because OpenGL doesn't have a standard/specification for the videocard internal information. It's fixable for modern NVidia and AMD videocards, but not for old and Intel videocards.

So I suggest to add a warning for players, that the option requires a lot of video memory. And then reset it to the lowest option value (what I am doing in my diff). And then we can close the ticket.

in reply to:  9 comment:10 by OptimusShepard, 6 years ago

Replying to Vladislav Belov:

In common way - yes. Because OpenGL doesn't have a standard/specification for the videocard internal information. It's fixable for modern NVidia and AMD videocards, but not for old and Intel videocards.

I don't thing the GTX 900 series isn't that old. But I also think we shouldn't care about every single card. The programming resources should be put in the whole game and not on such little things.


So I suggest to add a warning for players, that the option requires a lot of video memory. And then reset it to the lowest option value (what I am doing in my diff). And then we can close the ticket.

I agree with that. If someone has a solution for this, he/she should reopen the ticket.

Note: See TracTickets for help on using tickets.