I'm filing this just in case it's of interest for those hacking shaders on r300. Humus DynamicBranching3 demo does not run: Note: 'for (i ... )' body is too large/complex to unroll Fragment program using varying vars not written by vertex shader For reference, this demo does work with the i965 driver. http://www.humus.name/index.php?page=3D&ID=67 System environment: -- system architecture: 32-bit -- Linux distribution: Debian unstable -- GPU: RV570 -- Model: Asus EAX1950Pro 256MB -- Display connector: DVI -- xf86-video-ati: 801e83227a59a29eea425ea612083bbf2b536c30 -- xserver: 1.8.1.901 -- mesa: 61a26cdfdc9c75a83c0d362c973d5436fe077be4 -- drm: 6ea2bda5f5ec8f27359760ce580fdad3df0464df -- kernel: 2.6.35-rc3
Could you test the demo with current mesa git?
It seems to have regressed after the glsl2 merge it fails with "0:4(2): preprocessor error: Invalid tokens after #" for both shaders. /* Shader 2 source, checksum 0 */ #version 120 #define saturate(x) clamp(x,0.0,1.0) #define lerp mix #line 2 attribute vec2 textureCoord; attribute vec3 tangent; attribute vec3 binormal; attribute vec3 normal; uniform vec3 camPos; varying vec2 texCoord; varying vec3 vVec; void main(){ gl_Position = ftransform(); #ifdef MULTIPASS texCoord = textureCoord; vec3 viewVec = camPos - gl_Vertex.xyz; vVec.x = dot(viewVec, tangent); vVec.y = dot(viewVec, binormal); vVec.z = dot(viewVec, normal); #endif } /* Compile status: fail */ /* Log Info: */ 0:4(2): preprocessor error: Invalid tokens after #
Could you please file a new bug against the GLSL2 compiler (Mesa core, I guess) to keep driver-specific and core bugs separate?
Other than that, dynamic branching and loops should work with r300g to my knowledge, I recall Tom adding the support for it just recently.
Filed as bug 29654
Small update: the demo runs now, but isn't rendering correctly. It is however looking the same as softpipe, so any bugs is probably on a more general level.
Since error messages was added to r300g it now reports: r300 FP: Compiler Error: Fragment program does not support relative addressing of source operands. Using a dummy shader instead. r300 VP: Compiler error: Vertex program does not support relative addressing of destination operands (yet). Using a dummy shader instead.
Seems to be running fine now with loop unrolling.
bug/show.html.tmpl processed on Mar 20, 2017 at 09:46:36. (provided by the Example extension).