w00t

25/02/10
Invalid register semantic

So here's an obscure D3D9 compiler error that google gives barely 10 hits for:
"error X4509: invalid register semantic 'i0', or variable must be bound to multiple register banks (c register binding required)"



This isn't really documented too well, so I just wanted to add to the google knowledge pool that when I ran into this, it was due to using tex2D with non-zero gradients inside a loop. Of course we all know by now that this is a no-no, it's just that DX9 has a funny way of telling you. The register it complains about is the loop end-counter (eg. number of lights or whatever).

So, yeah: use tex2D (sampler, uv, 0, 0) instead of tex2D (sampler, uv) and you're all set :)

Fortunately DX10 cleans this up and tells you the truth.
posted at 18:19:47 on 02/25/10 by peirz - Category: zwans - Tag: programming / graphics

Comments

No comments yet

Comment Notification

get a mail...
manage...

Add Comments