Am Sonntag 27 August 2006 04:31 schrieb Ivan Gyurdiev:
Also, maybe the stateblock should be passed as an argument to all functions that use its states. I don't like walking up the tree to find what you need (this->wineD3Ddevice) - it's a hidden dependency on device state, which isn't even all the time - that's why you had to move the point where the shader is compiled [ this needs better documentation ].
isn't even < valid > all the time Texture dimensions are set in drawprim's upload function.
Our shaders depend on the values set in the stateblock, which can be different every draw theoretically. I think we should add a fast verficication of the parameters in CompileShader(any better place?) which compares the relevant settings in the stateblock to the values that were used to cross-compile the shader. That should be in a seperate patch though, not in the sampling patch, and it should be done for vertex shaders too(can the declaration change?)