Bug 36723 - [r300g, bisected] Unigine Sanctuary: fog is not rendered properly
Summary: [r300g, bisected] Unigine Sanctuary: fog is not rendered properly
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: All Linux (All)
: medium minor
Assignee: Default DRI bug account
QA Contact:
URL: http://www.unigine.com/download/#sanc...
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2011-04-30 13:11 UTC by Pavel Ondračka
Modified: 2013-02-06 14:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
screenshot of the problem (516.28 KB, image/png)
2011-04-30 13:11 UTC, Pavel Ondračka
Details

Description Pavel Ondračka 2011-04-30 13:11:33 UTC
Created attachment 46198 [details]
screenshot of the problem

Fog in Unigine Sanctuary is not rendered properly, there are some "stripes" in the fog, which weren't present before. Screenshot attached.

fe622bac0c1b5b9f2a9fcf9f35b51232a06bea42 is the first bad commit
commit fe622bac0c1b5b9f2a9fcf9f35b51232a06bea42
Author: Tom Stellard <tstellar@gmail.com>
Date:   Tue Jan 11 00:05:08 2011 -0800

    r300/compiler: Rewrite register allocator
    
    The new allocator uses ra and does swizzle packing.
    
    Also, a data structure (struct rc_variable) and associated functions have
    been added for generating UD and DU chains.

This may also be related to the floating textures, since the fog wasn't rendered at all before the floating work was committed.

GPU: RV530
mesa: d7cf9833d7138daa1c2acdc489ab0c86c2ea7e41
kernel: 2.6.38.2
Comment 1 Pavel Ondračka 2011-08-29 02:44:41 UTC
Since "linker: Reject shaders that use too many varyings" most of the fog is not rendered at all and the rest is fine.

Terminal output:
GLShader::compile(): error: shader uses too many varying components (36 > 32)
Material::create_shader(): can't compile "core/shaders/volumes/vertex_box_fog_ambient.shader" vertex shader
defines: UNKNOWN,QUALITY_LOW,MULTISAMPLE_0,USE_INSTANCING,USE_DEFERRED,OPENGL,USE_PSEUDO_INSTANCING,USE_PSEUDO_TRANSFORM,,NOISE,HEIGHT���
Material::create_shader(): can't compile "core/shaders/volumes/fragment_box_fog_ambient.shader" fragment shader
defines: UNKNOWN,QUALITY_LOW,MULTISAMPLE_0,USE_INSTANCING,USE_DEFERRED,OPENGL,USE_PSEUDO_INSTANCING,USE_PSEUDO_TRANSFORM,,NOISE,HEIGHT���
GLShader::compile(): error: shader uses too many varying components (36 > 32)
Material::create_shader(): can't compile "core/shaders/volumes/vertex_sphere_fog_ambient.shader" vertex shader
defines: UNKNOWN,QUALITY_LOW,MULTISAMPLE_0,USE_INSTANCING,USE_DEFERRED,OPENGL,USE_PSEUDO_INSTANCING,USE_PSEUDO_TRANSFORM,,NOISE,HEIGHT���
Material::create_shader(): can't compile "core/shaders/volumes/fragment_sphere_fog_ambient.shader" fragment shader
defines: UNKNOWN,QUALITY_LOW,MULTISAMPLE_0,USE_INSTANCING,USE_DEFERRED,OPENGL,USE_PSEUDO_INSTANCING,USE_PSEUDO_TRANSFORM,,NOISE,HEIGHT���


So the original bug is gone and the new one is a different problem. Is this too many varying message a WONTFIX?
Comment 2 Tomasz P. 2012-12-05 18:43:04 UTC
The problem still exists with current mesa-git ?
Comment 3 Pavel Ondračka 2012-12-05 18:57:20 UTC
(In reply to comment #2)
> The problem still exists with current mesa-git ?

Yeah, the broken fog is still there.
Comment 4 Marek Olšák 2012-12-05 19:13:30 UTC
This is not a compiler issue. The fog isn't rendered properly, because there are not enough varyings. I have a patch that reuses unused color varyings for texcoords. It fixes the fog, but it also breaks a lot of other things.
Comment 5 Marek Olšák 2013-02-06 14:12:42 UTC
Fixed with 85efb2fff0d4de56c31e414fd05a37d212211da1. Closing.


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.