XNA Creators Club Online
Page 2 of 2 (29 items) < Previous 1 2
Sort Posts: Previous Next

I'm testing out shaders..."error X2001: shader version expected"

Last post 8/17/2009 4:15 AM by GodOfOdd. 28 replies.
  • 8/16/2009 1:14 PM In reply to

    Re: I'm testing out shaders..."error X2001: shader version expected"

    Well, one of the problems would be that I'm using Windows XP, so I don't have DirectX 10 - I have DirectX 9.

    Edit: Ok, looks like I was mistaken - DirectX 10 is supported on XP. I downloaded the installer and it said I have 'newer or equivalent'. Which is wierd, as dxdiag.exe says I have 'DirectX 9.0c'.

    Something wierd is going on here.

    Also, I ran fxc using your command line (And my filename, of course) and got the same error.
  • 8/16/2009 7:00 PM In reply to

    Re: I'm testing out shaders..."error X2001: shader version expected"

    Yeah... the fxc compiler is DX10's compiler no matter what version of DirectX you're using (with the exception of the DX11 preview, I believe). If you have the latest DirectX SDK then all effects, whether you're under DX8,9 or 10 are compiled using DX10's effect compiler. I'm also on XP. When you run fxc, what version does it tell you that it is? Do you have any strange whitespace characters or perhaps something you're missing in your file? do any effects compile for you at all? download an example from the community site and see if you can compile those effects. Otherwise it sounds like you've either got an old or broken version of fxc. You may have to uninstall and reinstall the DirectX SDK or install a newer version. Sorry man but I don't think the code is the problem.

    Also, DirectX 10 is not supported on XP, but some of the tools are; like the effect compiler. Also, they package the same SDK and redistributable together; so if you've got the latest and greatest windows is smart enough to know it's running DX9 but you have the tools,headers, libs, and dlls for DX10. There is nothing preventing you from writing code using DX10 API calls or compiling it, Windows XP simply lacks the driver support so it won't run... that's the part that isn't compatible. The newest version of the SDK even comes with a DX11 preview... which we can also code and compile using our dusty old Windows XP installations. It might looks weird to you, but that's actually correct. Good luck.
  • 8/17/2009 3:10 AM In reply to

    Re: I'm testing out shaders..."error X2001: shader version expected"

    So basically, I've got to uninstall the SDK I have and install the DX9 one?
  • 8/17/2009 4:15 AM In reply to

    Re: I'm testing out shaders..."error X2001: shader version expected"

    There is only one SDK, but it's updated regularly. It can be found here. I'm not sure if that's the problem, it's hard to debug issues like this remotely through a forum. Unless there is some other important step you're missing, then yeah, that might be the only solution. Did you try compiling other effects which are known to be good? Any of the samples on this site which have effects will compile cleanly. Are you running fxc through the DirectX SDK command prompt or, alternatively, make sure that you ran their dx_setenv.cmd file in your command prompt before running fxc? I hope you get it worked out.
Page 2 of 2 (29 items) < Previous 1 2 Previous Next