Vitaly Dilmukhametov

  Home  |   Contact  |   Syndication    |   Login
  17 Posts | 0 Stories | 67 Comments | 0 Trackbacks

News

Archives

Post Categories

Recently I found interesting “feature” of fxc compiler (it’s a part of MS DirectX SDK). When you try to compile shaders, and path to source code contains non-Latin characters, you’ll get error like following:

Error 1 The command ""%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T vs_2_0 /O3 /Zpr /Fo "f:\импортер\SilverlightApplication1\Shaders\vertexshader.vs" "f:\импортер\SilverlightApplication1\Shaders\vertexshader.hlsl"
"%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T ps_2_0 /O3 /Zpr /Fo "f:\импортер\SilverlightApplication1\Shaders\pixelshader.ps" "f:\импортер\SilverlightApplication1\Shaders\pixelshader.hlsl"" exited with code 1.

As you can see, highlighted part of paths contains Cyrillic symbols. When I rename “импортер” to “Importer”, it compiled ok.

 

So, to avoid problems I recommend you do not use non-Latin characters in the path ;)

posted on Wednesday, August 10, 2011 10:10 AM

Feedback

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 10:16 PM Sergey Zwezdin
Will it work with another than English encoding exluding Russian? For example, Chinese.

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:28 PM Vitaly Dilmukhametov
Special for you, Sergey, I tried to put sources to the path with Chinese characters. And I got the same error:

Error 1 The command ""%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T vs_2_0 /O3 /Zpr /Fo "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\vertexshader.vs" "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\vertexshader.hlsl"
"%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T ps_2_0 /O3 /Zpr /Fo "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\pixelshader.ps" "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\pixelshader.hlsl"" exited with code 1. SilverlightApplication1

So, I think it's a common issue for any path, containing non-Latin symbols!

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:32 PM Sergey Zwezdin
Hm. I very disappointed with situation with Chinese. I can understand why not supported Russian, but why Chinese?
Do you know any workaround how to use Chinese in path to shaider files?

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:39 PM Vitaly Dilmukhametov
Sergey, you are big fan of Chinese, as I can see =)
You can put fxc.exe to the shader's dir, and don't use full path names - I think, it'll be enough!

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:43 PM Sergey Zwezdin
It's a good solution. Thank you very much.
But in my case fxc.exe is a executable file, but shader is a data. It is a different semantic. I don't want to mix this in a one place. Exec != data (!!1)
May be you know any other solution?

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:47 PM Vitaly Dilmukhametov
My previous suggestion is not solution - it's only workaround.
There are no solutions in this case - only workarounds, which is not TRUE (Stanky can accept it).

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:49 PM Sergey Zwezdin
May be exist alternate tools?
Workarounds are not good real projects.

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/10/2011 11:54 PM Vitaly Dilmukhametov
May be.. I don't know, may be you can suggest some sort?

# re: [Solving]: FXC.exe shader compiler “…exited with code 1” 8/11/2011 8:57 AM Sergey Zwezdin
No ideas.
Just one - stop to using fxc.exe and search alternate tool. Or write myown.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: