Bug 30351

Summary: Zero Ballistics: tank not rendered
Product: Mesa Reporter: Sven Arvidsson <sa>
Component: Drivers/Gallium/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
URL: http://www.zeroballistics.com/
Whiteboard:
i915 platform: i915 features:
Attachments: RADEON_DEBUG=fp log
RADEON_DEBUG=vp log
Screenshot comparing normal vs RADEON_NO_TCL

Description Sven Arvidsson 2010-09-23 10:26:22 UTC
Created attachment 38914 [details]
RADEON_DEBUG=fp log

In the game Zero Ballistics, the tank model is not visible. 

It seems to be working fine on llvmpipe.

Not a regression as far as I know, I just haven't reported it before as the developers website was offline and the future of the game was unclear.

http://www.zeroballistics.com/

System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: RV570
-- Model: Asus EAX1950Pro 256MB
-- Display connector: DVI
-- xf86-video-ati: e9928fe036e9382fd7bc353f3f05531445f08977
-- xserver: 1.8.99.904 (1.9.0 RC 5)
-- mesa: 96da9b28c838af00f15d6c0a5973857019d3aecc
-- drm: 23287f05cf2443ddf9e028e29beb5bd30979c6cf
-- kernel: 2.6.35.4
Comment 1 Sven Arvidsson 2010-09-23 10:26:52 UTC
Created attachment 38915 [details]
RADEON_DEBUG=vp log
Comment 2 Sven Arvidsson 2010-09-26 10:49:01 UTC
Tank is visible with RADEON_NO_TCL=1
Comment 3 Tom Stellard 2010-09-27 03:57:55 UTC
Ok, try this: open the file mesa/src/gallium/drivers/r300/r300_vs.c in a text editor, scroll down to line 214, which should look like this:
compiler.Base.max_alu_insts = r300->screen->caps.is_r500 ? 1024 : 256;

Change 1024 to 95, recompile and test.  If the part of the tank that was misrendering turns black, then stop and report the number you used, otherwise subtract 5 from the new number and repeat until the misrendering becomes black.  If you get down to 60 and nothing has changed then you can stop,you don't need to go all the way to zero.
Comment 4 Sven Arvidsson 2010-09-27 05:01:10 UTC
Tried it all the way down to 60, no sign of the tank.
Comment 5 Marek Olšák 2010-09-27 06:10:48 UTC
If a vertex shader fails to compile, nothing is rendered, because all vertices become (0,0,0,1) and a triangle with such vertices has no area.
Comment 6 Tom Stellard 2010-11-06 22:14:57 UTC
I took a look at this game, and I can't tell what the problem is.  Can you post screenshots of the current behavior and the expected behavior?
Comment 7 Sven Arvidsson 2010-11-08 13:15:41 UTC
Created attachment 40125 [details]
Screenshot comparing normal vs RADEON_NO_TCL

(In reply to comment #6)
> I took a look at this game, and I can't tell what the problem is.  Can you post
> screenshots of the current behavior and the expected behavior?

The model representing the player (the tank) is not rendered. The game uses a first person view by default, but you can press F2 to switch to third person, which should make the problem obvious.

I have attached a screenshot comparing the problem with a run using RADEON_NO_TCL=1 where the tank is visible.
Comment 8 Marek Olšák 2010-12-11 06:35:09 UTC
Commit 2af8a1983180fc0168c1e0e53bcc69ee3d684ea4 in Mesa master should fix some missing objects. Could you test the game again with current git?
Comment 9 Sven Arvidsson 2010-12-11 14:34:48 UTC
(In reply to comment #8)
> Commit 2af8a1983180fc0168c1e0e53bcc69ee3d684ea4 in Mesa master should fix some
> missing objects. Could you test the game again with current git?

Yep, it's fixed. Wohoo! :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.