H. Verbeet wrote:
On 10/07/06, Ivan Gyurdiev ivg231@gmail.com wrote:
Also note that there's diffrent lifetime rules for immediate constants in d3d8 and d3d9, and as far as I know we implement one of them wrong. Here I stick with the current behavior, which I think is d3d9-compliant.
Yes. In d3d8 constants set with the def instructions persist between shaders.
It is not so simple. 1) msdn does not make it clear whether that's visible on the app side 2) msdn claims constants take effect on Set*Shader*, whereas ours do on draw
A test is really needed if this is to be fixed - I tried to write one, but d3d8 wouldn't accept my asm shader for some reason.... and I can't find d3d8 documentation online which really makes me not very interested in writing d3d8 patches.
=========== Anyway, I think that bringing constants out of the shader is a step in the right direction, fixing issues like this should be easier afterwards.