supagu

Does PIX support DX10 properly i need to link dx9 libs to get pix support which makes me think its not.

Secondly, pix does give me some information when i do a capture, how ever now that i've implemented some more render to texture goodness, pix doesnt capture a whole frame, it only captures till i unbind the first render texture, anything i can do do some how get it to capture a whole frame




Re: Direct3D 10 PIX, DX10 and Render to Texture

manders

Hi,

PIX supports D3D10, though it is a newer codebase and may be less stable than D3D9 support.

To use the D3DPERF APIs in a D3D10 app, you currently need to link to d3d9.lib and #include d3d9.h. If you don't use user events/markers from your app, you shouldn't need this D3D9 dependency.

Can you clarify what you're seeing in PIX with a capture of your render-to-texture app Are you looking at a single-frame capture or a full-stream capture

Thanks,

-Mike





Re: Direct3D 10 PIX, DX10 and Render to Texture

supagu

when i do a single frame capture, it only record up un till the first render to texture has been unbound.

If i do a full stream capture (ie multiple frames) it recordes everthing, but this stream is so large its unusable :-/




Re: Direct3D 10 PIX, DX10 and Render to Texture

manders

> when i do a single frame capture, it only record up un till the first render to texture has been unbound.

So, you're saying it records up until you call SOSetTargets to unbind the texture you rendered to At that point does it crash, or is that just the last call that makes it into the PIXRun file

Have you run your app with the debug validation layer turned on, and made sure it doesn't spew about problems with API usage

Thanks,

-Mike





Re: Direct3D 10 PIX, DX10 and Render to Texture

supagu

no crash, actually pix stops recording on:
GetD3DDevice()->OMGetRenderTargets( 1, &mOrigRTV, &mOrigDSV );



> debug validation layer turned on
device is created with D3D10_CREATE_DEVICE_DEBUG flag

> and made sure it doesn't spew about problems with API usage

this might explain it:

D3D10: WARNING: ID3D10Device::OMSetRenderTargets: Resource being set to OM RenderTarget slot 0 is still bound on input! [ STATE_SETTING WARNING #9: DEVICE_OMSETRENDERTARGETS_HAZARD ]
D3D10: WARNING: ID3D10Device::OMSetRenderTargets: Forcing PS shader resource slot 0 to NULL. [ STATE_SETTING WARNING #7: DEVICE_PSSETSHADERRESOURCES_HAZARD ]

here is the code snippet it complains about:

void DX10RenderTexture::BindTarget(int index, bool clear, int flags)
{
// Store off original render targets
mDevice->GetD3DDevice()->OMGetRenderTargets( 1, &mOrigRTV, &mOrigDSV );

ID3D10RenderTargetView* aRTViews[1] = { 0 };

if (flags & RTF_Colour)
aRTViews[0] = mRenderTargetView;

mDevice->GetD3DDevice()->OMSetRenderTargets(1, aRTViews, (flags & RTF_Depth) mDepthStencilView : 0);

if (clear)
{
mDevice->GetD3DDevice()->ClearRenderTargetView(mRenderTargetView, (float*)&mClearColour);
mDevice->GetD3DDevice()->ClearDepthStencilView(mDepthStencilView, D3D10_CLEAR_DEPTH, 1.0f, 0);
}
}

the warning pops up when BindTexture is called for the second time in the frame, not sure what the warning means but it probably is my problem i guess





Re: Direct3D 10 PIX, DX10 and Render to Texture

Kapoulkine Arseny

This warning means that you're setting an RT while the same RT is already set as an input to some stage of pipeline. So runtime complains about it and resets that input to 0.



Re: Direct3D 10 PIX, DX10 and Render to Texture

supagu

ive managed to fix all dx warning, and pix still fails to capture a whole frame, unless i do a stream record in which case i cant do anything as it is so massive it causes my pc to die!


void DX10Effect::SetTexture(EffectParameterHandle handle, Texture* texture)
{
    ID3D10EffectShaderResourceVariable* resourceVar = ((ID3D10EffectVariable*)handle)->AsShaderResource();

    HRESULT hr;
    if (texture)
        hr = resourceVar->SetResource(static_cast<DX10Texture*>(texture)->GetTextureRV());
    else
        hr = resourceVar->SetResource(0);

    //HRESULT hr = ((ID3D10EffectShaderResourceVariable*)handle)->SetResource(static_cast<DX10Texture*>(texture)->GetTextureRV());
    int nothing = 0;
}

this line seems to be killing pix:
resourceVar->SetResource(static_cast<DX10Texture*>(texture)->GetTextureRV());

it appears to be a valid resource, i've been using this set up to render stuff for ages :-/
it only happens when binding a depth render texture

edit:
okay i've fixed it my render texture was too big.




Re: Direct3D 10 PIX, DX10 and Render to Texture

winit maneewat

supagu wrote:
Does PIX support DX10 properly i need to link dx9 libs to get pix support which makes me think its not.

Secondly, pix does give me some information when i do a capture, how ever now that i've implemented some more render to texture goodness, pix doesnt capture a whole frame, it only captures till i unbind the first render texture, anything i can do do some how get it to capture a whole frame