fxc.exe throws error when running on wine

Viewed 34

I have this fxc.exe which is copied from a working windows SDK. It does everything properly on a windows machine. However when I transported it to my linux machine and ran it in wine with the exact same arguments, it did not work.

The output of it (including wine messages):

0100:fixme:d3dcompiler:D3DCompile2 Ignoring flags 0x5.
Z:\home\sunnymonster\dev\DestinyEngine\DestinyEngine\assets\shaders\hlsl\test_shader_vs.hlsl:28:2: E5017: Aborting due to
not yet implemented feature: Call to user-defined function "vert_main".

compilation failed; no code produced

and the command that I ran:

vendor/shader-compiling/fxc.exe /nologo /Emain /Tvs_5_0 /Od /Zi /Fo assets/shaders/hlsl/thing_vs.cso assets/shaders/hlsl/test_shader_vs.hlsl

The source code of my shader (it is generated by another program):

static float4 gl_Position;
static float3 f_Colour;
static float3 a_Colour;
static float2 a_Pos;

struct SPIRV_Cross_Input
{
    float2 a_Pos : POSITION;
    float3 a_Colour : COLOR0;
};

struct SPIRV_Cross_Output
{
    float3 f_Colour : TEXCOORD10;
    float4 gl_Position : SV_Position;
};

void vert_main()
{
    f_Colour = a_Colour;
    gl_Position = float4(a_Pos, 1.0f, 1.0f);
}

SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
    a_Colour = stage_input.a_Colour;
    a_Pos = stage_input.a_Pos;
    vert_main();
    SPIRV_Cross_Output stage_output;
    stage_output.gl_Position = gl_Position;
    stage_output.f_Colour = f_Colour;
    return stage_output;
}

Any ideas on why this is happening?

0 Answers
Related