[SlimDX] Reusing texture as render target, NVidia problem

Started by
2 comments, last by ArcticHammer 11 years, 5 months ago
I'm rendering into same texture incrementally. Each refresh round I'm adding some details in the texture.

Texture is set as render target. In the end of the round, I'm finally displaying the texture in the screen.

By using Ati/AMD adapters, it works just fine.

By using Nvidia (Quadro FX370 and GT9500 for example), I can only render 1 time for the texture. When I try to render into it again next round, it won't render any additinal graphics on it, is just remains the same.

If I recreate the texture, I can render on it again, but only 1 time. For NVidia, I have made a special logic that it first creates a new texture and then renders old texture in it and then the new graphics. Like this, it works but causes significant extra overhead.

I'm wondering if anybody has tangled with the same issue?

BTW, there's no errors in DirectX debug output. DirectX runtime is in debug mode and working.


Thanks in advance for any help...
Advertisement
Hi,

I am not quite sure how this might help you, but I faced similar issue with respect to GPUs few months back, where certain piece of code worked fine on ATI cards but gave issues on NVIDIA. You can refer to the thread here : http://www.gamedev.net/topic/623134-fx-shader-weird-culling-issue/page__p__4929475#entry4929475

later though I found out the cause, but am still wondering why then it worked on ATI cards?

You can try using PIX & see what is happening each frame on NVIDIA & ATI. Might give you some information as in my case.
Thanks TheOrestes,

It really must have something to do with Multisample anti-alias. When setting MultiSampling to None, re-using texture works with NVidia too.

Before rendering into the render target texture, I use Clear command with Stencil flag. It gets rid of the Debug message of non-matching multisample types, and has hidden the actual problem. device.Clear(ClearFlags.Stencil, Color.Transparent,0, 0);

But disabling AA is not option, because of loss of visual appearance. Is there any way to adjust multisampling type on-the-fly, without recreating the device?
I was in long discussion with NVidia.

They came in conclusion that NVidia render targets textures do not have support for multisampling when reusing is needed :-(

So I have to create a new render target texture with multisampling support, and render the old texture in it.

This topic is closed to new replies.

Advertisement