Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#623 closed task (fixed)

Shadows should be disabled by default on slower cards/drivers

Reported by: fabio Owned by:
Priority: Nice to Have Milestone: Alpha 5
Component: Core engine Keywords:
Cc: Patch:

Description

Shadows on some cards/drivers are really slow and should be disabled by default there (eventually the shadows setting on these cards should also be "greyed out" in the GUI and could be only changed in the config file).

On my Radeon X1600:

  • with the mesa r300 gallium driver shadows are pretty fast;
  • with the mesa r300 classic driver enabling shadows make the game run at 1 frame every 20s, while it work at a playable fps without them.

I am attaching glxinfo obtained while using both drivers.

Attachments (3)

glxinfo-r300-gallium.txt (23.5 KB ) - added by fabio 13 years ago.
glxinfo of gallium r300 - shadows are usable
glxinfo-r300-classic.txt (22.9 KB ) - added by fabio 13 years ago.
glxinfo of classic r300 - with shadows game run at 1 frame every 20s
intel-945.txt (11.1 KB ) - added by fabio 13 years ago.
glxinfo intel 945

Download all attachments as: .zip

Change History (18)

by fabio, 13 years ago

Attachment: glxinfo-r300-gallium.txt added

glxinfo of gallium r300 - shadows are usable

by fabio, 13 years ago

Attachment: glxinfo-r300-classic.txt added

glxinfo of classic r300 - with shadows game run at 1 frame every 20s

comment:1 by Philip Taylor, 13 years ago

Would be good to do something like this.

How can we detect when it's needed? I guess the options are a database of hardware/driver combinations and their capabilities and known bugs, so we can choose what graphics features to enable; or some kind of dynamic detection via a benchmark on first run in order to set sensible defaults, and then let the user tweak it.

comment:2 by fabio, 13 years ago

I also tried 0ad on an intel 945 under Ubuntu 10.10 (glxinfo attached) and shadows are really slow also with it. The only thing that came to my mind is that the fast card/driver (r300 gallium) is OpenGL 2.1, the slow cards/drivers are OpenGL 1.4 (intel) and 1.5 (r300 classic). Maybe enable it by default only if OpenGL >= 2.0 (with a three choice option in the config file with default/true/false)?

Also about the renderpath: vertexshader are not supported on r300 classic (I get the fixed one even when forced) and are supported on intel and r300 gallium; however vertexshader is slower (with msec/frames almost double) on intel while it's about the same speed on r300 gallium.

Lastly, on intel fancywater is always disabled (due to #270), but it's changeable in the GUI (however it does nothing): maybe fancyshaders GUI option should also be greyed and made unchangeable.

by fabio, 13 years ago

Attachment: intel-945.txt added

glxinfo intel 945

comment:3 by Kieran P, 13 years ago

Priority: majorminor

comment:4 by Kieran P, 13 years ago

Type: defecttask

comment:5 by fabio, 13 years ago

  • priority changed from major to minor.

Hi, I would assign a higher priority to this, or else users that just try the game will be disappointed that it doesn't run properly on their card and complain on the forum or just disinstall the game. There is also an easy workaround, disabling shadows when OpenGL < 2.0.

comment:6 by fabio, 13 years ago

There are many examples on the forum, e.g.: http://www.wildfiregames.com/forum/index.php?showtopic=13731

comment:7 by Kieran P, 13 years ago

Compared to some of the other things (like broken functionality, or patches which need reviewing and applying), I don't consider this 'major'. Users can edit the config and turn shadows off themselves. I agree disabling this automatically, along with fancy water, so it at least runs is a good idea, but right now, as far as development goes, it's not stopping anything.

And I didn't push it back to Alpha 4 yet, like I did with quite a few other tickets, as it would be good to have in Alpha 3 if there is time. You might check with Philip or Brian to see how easy this would be. IF they can nut it out in an hour or so, great.

comment:8 by Kieran P, 13 years ago

Milestone: Alpha 3Alpha 4

comment:9 by Kieran P, 13 years ago

Priority: Nice to HaveIf Time Permits

comment:10 by philip, 13 years ago

(In [8983]) Disable shadows and fancy-water by default on some slower graphics devices. See #623.

comment:11 by Philip Taylor, 13 years ago

Milestone: Alpha 4Alpha 5

Since we've got the hwdetect thing now, I've set it to disable shadows on the devices reported here (and on my own Intel one) (and also disable fancywater on some devices).

This isn't comprehensively solving the problem for all cases where shadows are slow - need some more data for that (hopefully the new reporting feature will provide useful data) so I'm leaving this ticket open for now, and it should be addressed more thoroughly later.

comment:12 by fabio, 13 years ago

I'd suppose this can be closed now.

comment:13 by Kieran P, 13 years ago

Priority: If Time PermitsNice to Have

comment:14 by philip, 13 years ago

Resolution: fixed
Status: newclosed

(In [9305]) Disable shadows/fancywater by default on more Intel devices. Fixes #623 for now. Add script to help verify correctness of hwdetect.

comment:15 by elexis, 7 years ago

In 19886:

Update Mesa software renderer detection.

Fixes #4670
Refs #623, D86, https://cgit.freedesktop.org/mesa/mesa/commit/?id=92b4ca45504e7ffc5f4fa385ada1be48e6123181
Patch By: fabio

Note: See TracTickets for help on using tickets.