d3d/dx8 GLSL-patch shader question: access on VC constants out of bounds

2006-10-20 Thread Christoph Frick
hiho

the game LFS[1] uses in its shaders constants with high numbers
(c10-c17,c90-c95); so in sum no problem. but due to check against the
OpenGL implemented maximum (in my case VC[31]) the shaders wont work
anymore (array out of bounds).

is this due to recently discussed max/4 is correct but old nvidia
driver reports wrong numers-problem or is this something new?

would it be possible to map the constants from the shader into the
vertex program using a look-up-table so we just need to allocate a
VC-array there with the actualy used size and so the check against the
maximum of uniforms would make sense again?

[1] http://www.liveforspeed.net/?page=downloads

-- 
cu


pgpLZOpDGhQyo.pgp
Description: PGP signature



Re: d3d/dx8 GLSL-patch shader question: access on VC constants out of bounds

2006-10-20 Thread H. Verbeet

On 20/10/06, Christoph Frick [EMAIL PROTECTED] wrote:

hiho

the game LFS[1] uses in its shaders constants with high numbers
(c10-c17,c90-c95); so in sum no problem. but due to check against the
OpenGL implemented maximum (in my case VC[31]) the shaders wont work
anymore (array out of bounds).

is this due to recently discussed max/4 is correct but old nvidia
driver reports wrong numers-problem or is this something new?

Probably, VC[31] certainly looks too small. You should probably use
96.25 anyway, as the current stable drivers have some security
issues.


would it be possible to map the constants from the shader into the
vertex program using a look-up-table so we just need to allocate a
VC-array there with the actualy used size and so the check against the
maximum of uniforms would make sense again?

Not really, a shader can use relative addressing into the constants
array as well.