Jump to content
  • Advertisement
Sign in to follow this  
jrh2365

DX11 [D3D11] PIX - CreateGeometryShaderWithStreamOutput - E_FAIL

This topic is 2812 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

When I try to debug my game with PIX, I get the error message shown below. I have provided the effect code I'm using, as well as the code I use to load it. The CreateGeometryShaderWithStreamOutput it complains about is inside the shader code.

Does anyone know why I am getting this error? Note that the shader works as intended when not debugging with PIX, and there are no Error/Warning/Info/etc messages displayed.

Thank you.

Cpp Code:
D3DX11CompileFromFile("effect.fx", NULL, NULL, NULL, "fx_5_0", 0, 0, NULL, &shader, &errors, NULL);
D3DX11CreateEffectFromMemory(shader->GetBufferPointer(), shader->GetBufferSize(), 0, GetDevice(), &_effect);


Error:
---------------------------
PIX
---------------------------
A call that previously succeeded failed during playback:

EID: 34
Call: ID3D11Device::CreateGeometryShaderWithStreamOutput()
HRESULT: E_FAIL

For more information click 'Help'.

---------------------------
OK Help
---------------------------


Effect:
DepthStencilState DisableDepth
{
DepthEnable = FALSE;
DepthWriteMask = ZERO;
};

struct VS_IN
{
float3 Position : POSITION;
float3 Velocity : VELOCITY;
float Age : AGE;
uint Type : TYPE;
};

struct PS_IN
{
float4 Position : SV_POSITION;
};

#define PT_EMITTER 0
#define PT_FLARE 1

VS_IN VS(VS_IN input)
{
return input;
}

[maxvertexcount(2)]
void GS(point VS_IN input[1], inout PointStream<VS_IN> stream)
{
if (input[0].Type == PT_EMITTER)
{
input[0].Age += 0.1;
stream.Append(input[0]);

VS_IN p;
p.Position = input[0].Position;
p.Velocity = float3(0.005 * cos(input[0].Age), 0.005 * sin(input[0].Age), 0);
p.Age = 0;
p.Type = PT_FLARE;
stream.Append(p);
}
else
{
if (input[0].Age < 120)
{
input[0].Age++;
input[0].Position += input[0].Velocity;
stream.Append(input[0]);
}
}
}

GeometryShader gsStreamOut = ConstructGSWithSO(CompileShader(gs_4_0, GS()), "POSITION.xyz; VELOCITY.xyz; AGE.x; TYPE.x");
technique11 T0
{
pass P0
{
SetVertexShader(CompileShader(vs_4_0, VS()));
SetGeometryShader(gsStreamOut);
SetPixelShader(NULL);
SetDepthStencilState(DisableDepth, 0);
}
}


[Edited by - jrh2365 on October 10, 2010 6:00:41 PM]

Share this post


Link to post
Share on other sites
Advertisement
Have you tried disabling shader optmizations?

I had the same kind of errors with d3d11 shaders specially the Hull Shader.

Try setting the disable optimizations flag before compiling the shaders.

is something like D3D10_SHADER_SKIP_OPTIMIZATION or D3D11_SHADER_SKIP_OPTIMIZATION

Share this post


Link to post
Share on other sites
Have you tried another application that uses stream out with the GS? Perhaps there is something about the way you are using the API that doesn't work well with PIX. I believe the ParticlesGS sample uses DX10 with stream out, so that could be a good place to start.

I would also check the docs and see if stream out is officially supported yet or not - I don't recall if it is, but that could also be the problem if it isn't supported.

Share this post


Link to post
Share on other sites
I had already tested the DX10 ParticlesGS sample and it did not crash. I forgot to mention that. I don't know of any DX11 samples that I could test, though. I was unable to find anything in the documentation related to features that are not supported.

Thanks,
Jeff

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!