Jump to content
  • Advertisement
Sign in to follow this  
solenoidz

Cross-vendor shader compatibility

This topic is 2544 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 guys.
I'm using DirectX 9.0 SDK (november 2007) to write a simple demo. My dev computer has nVidia 9800GT video card and everything worj nice and smooth. However I recently gained access to a friends computer wich has AMD Radeon HD 6450 video card, where I installed my tiny demo only to find out that my sky was gone, my meshes were not visible either. Only the terrain and the particles were drawn.
What I did to fix the issue :
1.Installed the latest ATI drivers for the card
2.Installed DirectX 9.0 (november 2007 ) and Visual C++ Express just like on my development computer with the nVidia card.
3.Put the source code and recompiled.

The 2 computers had same operating system (Win XP pro with SP3) same DirectX SDK version, same compiler and same source code. The only difference are the video cards and their corresponding drivers of course. What I did again :
1. Recompiled the code with reference D3D device.
2.Recompiled the code to draw my sky and meshes without shaders, but with the fixed function pipeline.
Both methods give me the expected results, and everything was drawn as it should, so I thing something is wrong with some of my HLSL shaders(Sky, meshes) and the ATI driver just ignores the draw calls.
No errors durring shader compilation whatsoever. All the HRESULT returned S_OK, also.

What I should do in order to get my program to wrok on different hardware ?
How can I debug my program and see where my shaders fail ?

Thank you.

Share this post


Link to post
Share on other sites
Advertisement
In order to debug D3D programs, use the debug output stream (turn this on in the DX SDK control panel app) and PIX. When you compile shaders, you can request debug symbols in the shader binary; then, you can inspect shaders at code level with PIX.

And download the latest SDK, it still has support for D3D9. I don't remember if Nov 2007 SDK even has PIX for Windows yet.

In general, if the reference rasterizer shows the correct results but hardware rendering doesn't, it is the driver's fault.

Share this post


Link to post
Share on other sites
Is there a reason not to use the latest SDK? The shader compiler is greatly improved with each of the SDK releases (or at least it has up until the most recent and final version), and perhaps you are fighting an issue that has already been corrected. You would want the June 2010 SDK if possible.

Share this post


Link to post
Share on other sites
Thanks. I fixed the issues, it was mainly because I was using a vertex shader 2.0 combined with pixel shader 3.0 in the same technique.
It was working on my dev computer, but after I switched to debug version of the DirectX dll's it failed.
Yes, PIX is included even in december 2004 SDK of the DirectX (and probably earlier versions too), but I pin-point the problems using the
debug verion of D3D with combination with 'break on D3D error" in DX control panel.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!