2025-07-19 14:35 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001532Spring engineGeneralpublic2009-08-12 21:31
Reporterimbaczek 
Assigned Toimbaczek 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version0.79.1.0+git 
Target VersionFixed in Version0.79.1.0+git 
Summary0001532: almost-completed nanoframes (with partial texture) use too much cpu
Descriptionsee this video for an example:

http://www.darkstars.co.uk/downloads/view.php?file=spring/other/nanoframe_cpu_and_shadow_debug_bugs.mp4&dl=1

you can pause around 7 seconds in the video to check out the constructions.
Additional InformationATI 4850, 9.7 drivers
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0003849

imbaczek (reporter)

/advshading 0 fixes the slowdown, but makes the game fugly obviously.

~0003850

imbaczek (reporter)

further investigation showed this may be a driver issue.

~0003851

Auswaschbar (reporter)

[quote][17:41:03] <baczek2> btw how come i've got 90 fps with /advshading 0 and 10 with /advshading 1?
[17:41:12] <baczek2> when building stuff
[17:42:09] <jk`gentoo@IRC> press [b] and check shadow/relect time usage
[17:42:19] <baczek2> it's all drawworld
[17:42:28] <baczek2> check that video
[17:42:32] <jk`gentoo@IRC> strange
[17:43:36] <baczek2> oh no wait
[17:43:52] <baczek2> shadows/reflect are there too
[17:43:56] <baczek2> but drawworld is more
[17:44:07] <jk`gentoo@IRC> how much is ti
[17:44:13] <baczek2> depends
[17:44:49] <baczek2> no constructions on screen - about draw world is about twice as big as shadows
[17:45:06] <jk`gentoo@IRC> ohh could be that zerver also added advshading to units in build
[17:45:27] <baczek2> with a single nanoframe in filling with texture phase, it's about 4 times larger
[17:45:38] <jk`gentoo@IRC> he did some mistakes in that code ?¼_?¼
[17:46:48] <jk`gentoo@IRC> it just isn't possible to do such stuff with the current unit renderer
[17:47:00] <baczek2> fix plz ^^
[17:47:31] <jk`gentoo@IRC> i got lazy to fix other's bug[/quote]

~0003852

imbaczek (reporter)

the slowdown also happens in 79.1.2.

~0003868

zerver (reporter)

I added adv shading to transparent units only (or at least that was the intention). This was to fix bugs with rendering of submerged transparent stuff.

Will check it out though.

~0003887

zerver (reporter)

It's not happening with my 8800GTX, likely to be a driver issue.

~0003889

imbaczek (reporter)

more info:

doing this modification to the unit drawer (DrawUnitBeingBuilt) results in no slowdown:


    glDisable(GL_CLIP_PLANE0);
    if (unit->buildProgress > 0.66f) {
        const double plane0[4] = {0, -1, 0 , start + height * (unit->buildProgress * 3 - 2)};
        /*
        glClipPlane(GL_CLIP_PLANE0, plane0);

        glPolygonOffset(1.0f, 1.0f);

        glEnable(GL_POLYGON_OFFSET_FILL);
        */

        DrawUnitModel(unit);

        /*
        glDisable(GL_POLYGON_OFFSET_FILL);
        */
    }
    /*
    glDisable(GL_CLIP_PLANE0);
    */

clearly, there seems to be an issue with clip planes in the driver.

~0003890

imbaczek (reporter)

also, it doesn't happen when i comment out

//unitDrawer->UnitDrawingTexturesOn(unit->model);

~0003891

imbaczek (reporter)

yet more info: commenting out this in UnitDrawingTexturesOn

        //glEnable(GL_VERTEX_PROGRAM_ARB);
        //glEnable(GL_FRAGMENT_PROGRAM_ARB);

results in no slowdown.

~0003892

imbaczek (reporter)

also, enabling only the vertex program causes the slowdown. where is the one used here stored?

~0003893

Kloot (developer)

Note that one of the earlier atiHacks also specifically disabled clip planes in DrawUnitBeingBuilt.

~0003898

imbaczek (reporter)

status should really be 'worked around' - clip planes are disabled on atis now.
+Notes

-Issue History
Date Modified Username Field Change
2009-08-09 16:55 imbaczek New Issue
2009-08-09 17:40 imbaczek Note Added: 0003849
2009-08-09 18:00 imbaczek Note Added: 0003850
2009-08-09 18:05 Auswaschbar Note Added: 0003851
2009-08-09 18:09 imbaczek Note Added: 0003852
2009-08-09 18:09 imbaczek Additional Information Updated
2009-08-09 18:09 imbaczek Additional Information Updated
2009-08-10 12:45 zerver Status new => assigned
2009-08-10 12:45 zerver Assigned To => zerver
2009-08-10 12:49 zerver Note Added: 0003868
2009-08-11 16:29 zerver Note Added: 0003887
2009-08-11 16:29 zerver Status assigned => closed
2009-08-11 16:29 zerver Resolution open => unable to reproduce
2009-08-11 23:10 imbaczek Assigned To zerver =>
2009-08-11 23:10 imbaczek Note Added: 0003889
2009-08-11 23:10 imbaczek Status closed => new
2009-08-11 23:10 imbaczek Resolution unable to reproduce => reopened
2009-08-11 23:20 imbaczek Note Added: 0003890
2009-08-11 23:39 imbaczek Note Added: 0003891
2009-08-11 23:41 imbaczek Note Added: 0003892
2009-08-12 00:18 Kloot Note Added: 0003893
2009-08-12 21:31 imbaczek Note Added: 0003898
2009-08-12 21:31 imbaczek Status new => resolved
2009-08-12 21:31 imbaczek Fixed in Version => 0.79.1.0+git
2009-08-12 21:31 imbaczek Resolution reopened => fixed
2009-08-12 21:31 imbaczek Assigned To => imbaczek
+Issue History