H. Verbeet wrote:
On 03/07/06, Ivan Gyurdiev ivg231@gmail.com wrote:
and I just made it work today, by storing a fake semantic for d3d8 shaders.
By the way, I am still keeping that fake semantic around - it is useful
- it allows me to have a single code path for loading arrays, instead of
the two we currently have, which is a mess..
Well, it is wrong.
How is it wrong? In one case you have a semantic, and you use that to load up the correct register (query shader, shader gives you the index to load). In the other case you preinitialize the semantics with the declaration register numbers - it's all the same thing really. I know this works, because I've already written the code.
Now, for the color fix, I agree with you - that part needs to be different for d3d8 vs d3d9 - that's the part that didn't work. Changes I've made also put the decision for whether something is color or not in its own function, instead of copying that for each backend. We just need to edit the function accordingly.
Keep in mind though that the d3d8 path was added specifically to fix the problem you described earlier :-).
I remember a bunch of dead code that looked like it was trying to write to arrayUsageMap, but wasn't actually writing anything :)