XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

Shader compiler bug? (DX10)

Last post 08-19-2008 1:14 PM by AGPX. 4 replies.
  • 08-17-2008 10:01 AM

    Shader compiler bug? (DX10)

    Hi,

    I have a geometry shader (DirectX 10 SDK, June 2008), like the following:

    #define MAXTEXCOORDS 8

    struct VSOutput
    {
        float4 pos:              SV_POSITION;
        float2 UV[MAXTEXCOORDS]: TEXCOORD;
    };

    int normalMapUVChannel;  // From 0 to 7

    [maxvertexcount(3)]
    void GS(triangle VSOutput input[3], inout TriangleStream<GSOutput> OutputStream)
    {
        float DeltaU1 = input[2].UV[normalMapUVChannel].x - input[1].UV[normalMapUVChannel].x;

    etc...

    }


    The shader compiler report the following errors:

    error X8000: D3D10 Internal Compiler Error: Invalid Bytecode: Overlapping input index range decl encountered. Opcode #28 (count is 1-based).
    error X8000: D3D10 Internal Compiler Error: Invalid Bytecode: Can't continue validation - aborting.

    The error is generated by the first line. Note if I make the index constant, the error disappear:

    float DeltaU1 = input[2].UV[0].x - input[1].UV[0].x;

    but in this way I need to replicate the shader 8 times (that moreover it's already replicated for other reasons), that's quite a problem.

    Someone know a workaround to this? Thanks in advance.

    - AGPX
  • 08-18-2008 7:40 AM In reply to

    Re: Shader compiler bug? (DX10)

    If you'd send me the shader at johnrapp@microsoft.com I can see about finding a workaround, or at least make sure it's fixed in a future compiler.
  • 08-18-2008 3:18 PM In reply to

    Re: Shader compiler bug? (DX10)

    Hello,

    I had send to you the shader.

    Many thanks for your reply,

    - AGPX

  • 08-19-2008 2:09 AM In reply to

    Re: Shader compiler bug? (DX10)

    Barring any unforeseen circumstances, this issue should get fixed in the November release. In the meantime, a workaround is to make the vertex indices dynamic as well as the interior index (ie, vert[someindex].tex[otherindex]).
  • 08-19-2008 1:14 PM In reply to

    Re: Shader compiler bug? (DX10)

    Oh! Your workaround of dynamic index works! Many many thanks!
Page 1 of 1 (5 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG