error C1101: ambigous overloaded function reference "max(int,int)"

Hi

I just downloaded racer 0.8.37 from main site.

racer.exe starts normal, but when I click "Free Driving" or "Select car" game crash with shader error:

Window title: "Fatal error - the program will exit"
in window lot of warnings and error:
data/renderer/shaders/shadowmapping.cg(87) : error C1101: ambiguous overloaded function reference "max(int,int)"

My config is:
Windows 7
i5 processor
Intel HD Graphics (Sandybridge)
Graphics driver 8.15.10.2430
 
I worarounded that max() function, but there are many others problems related to Cg shaders.

i.e.
data/renderer/shaders/standard_xtree_f.cg(88) : error C3004: function "float ddx(float);" not supported in this profile

I also checked latest Intel driver (2559) and there is same problem

any ideas?
 
I checked it on NVidia driver and as it works.
But I think that fault is not caused by graphics card, but there are rather SW bugs in Racer code.


I workarounded Cg related errors, and now Racer starts on Intel, geometry looks ok, but there is no textures at all.

I am rather not experienced as Cg programmer, but some parts of that program looks suspicious for me.

I.e.
File: shadowmapping.cg:88
Line:
int iSqrtSamples=max((iSqrtSamples-index),2);

It looks like use of unintialized variable iSqrtSamples, and whole line rather doesn't make sense.
Another problem is that max function is not defined for (int,int) arguments (according to NVidia docs at http://http.developer.nvidia.com/Cg/max.html ).
Of course not-strict std library can implement max(int,int) function, but using such undocumented functions is risky (at least for performance, even when it works).

There also set of suspicious warnings and errors related to use not suported functions in used profiles - but because my first contact with Cg language was few hours ago, I still don't understand it.
But it also looks like use some undocumented features that should not be used.

Maybe somebody who wrote that programs (or know more about Cg) should review that code once more?

I'll also try to check why I don't see textures.
I am experienced in OpenGL apps debugging, but maybe I could find what is wrong also here.
I think it should not be much work to run racer also on Intel GPU.
Intel should support Cg and all necessary extensions to run Racer.
 
Cg in complex form is only available to nVidia GPU's, unless someone wants to write a Cg profile for their GPU. Racer one day will use GLSL which is the open source equivalent of Cg. Then most recent GPU's with GLSL enabled drivers will all be able to use the complex shaders. Until then, it's just not worth the effort.
 

Latest News

Do you prefer licensed hardware?

  • Yes for me it is vital

  • Yes, but only if it's a manufacturer I like

  • Yes, but only if the price is right

  • No, a generic wheel is fine

  • No, I would be ok with a replica


Results are only viewable after voting.
Back
Top