On 10/07/06, Ivan Gyurdiev ivg231@gmail.com wrote:
H. Verbeet wrote:
Yes. In d3d8 constants set with the def instructions persist between shaders.
It is not so simple.
- msdn does not make it clear whether that's visible on the app side
If I had to guess I'd say it is, but it shouldn't be that hard to write a test for that.
- msdn claims constants take effect on Set*Shader*, whereas ours do on draw
Sounds plausible. But that's something we have to fix anyway then, since if it does. that means we potentially overwrite constant values set with SetShaderConstant*.
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.
Did you use dcl_ instructions by any chance? That's one of the things that only really works with d3d9.
As for documentation, there's http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/direc... not sure if that's what you're looking for though.
Either way, we should test d3d9 as well, since it's quite possible it behaves the same for the 2 points you mentioned.