One is the highest shader model supported by the installed graphics card, and I am currently detecting this using Direct3D 9.0cs device capabilities and checking the VertexShaderVersion and PixelShaderVersion fields of the D3DCAPS9 structure.I am currently dynamically loading DX9, so on those systems the check gracefully fails (which is ok.) But I am seeking a similar solution: something that will still run on all systems, and work correctly (detect the SM version) on most systems.I am using it to report hardware capabilities as a ping to a server, which is used to we have a good idea of typical hardware that our customers use, which can inform future product decisions.
For example: how many customers have SM4 or above How many are using a 64-bit OS Etc.) This is why either (a) gracefully failing, so we know it failed, or (b) getting an accurate shader model number are the two preferred modes. For example, I am running Windows on a VMWare Fusion virtual machine on OSX. Shader Model 3.0 Drivers Report DX11The Fusion drivers report DX11 in DxDiag, yet I know from the Fusion tech specs that it only supports DX9.0c and shader model 3. Still, with this exception, this method seems the best way so far. There are a few odd driver features that sort of backport D3D10 stuff (like AMDs R2VB extensions), but you cant just load up a SM4 shader in D3D9. Using it comes later when we know that x of our customers can use it, so its worth coding for. Use LoadLibrary GetProcAddress to load D3D10 functions, because if you link with D3D10 using.lib file, your application will fail to start if d3d10 is missing. In this case the only way to detect capabilites will be to make GPU database of some sort, detect installed devices, and return answer from database. OpenGL shader features dont necessarily map to D3D (many older drivers support D3D somewhat better), and keeping a lookup table will cause nothing but problems and false negativespositives. Trying to create a D3D910 context on first-run and checking caps isnt terribly slow and is very reliable. Just make sure not to link your program against D3D10 (or it wont run on systems without it, use LoadLibrary). How do I Use D3D10D3D11 api to detect higher version (Believe me, I have googled, and there are no results for things like getting capabilities, detecting the shader model, etc with D3D10. Nor can I find anything starting from the D3D10 device create method in MSDN, etc.) Ie, can you either write a method name as a pointer to google from, or even better a code snippet, please. It looks like D3D10 supports SM4, D3D10.1 supports 4.1 and D3D11 supports SM5. I dont work with D3D10, but my guess is that this behavior would make card non-standard-compliant (or that GPU-Z has a bug). You could also investigate GPU-Z executables with dumpbin imports and see what it actually calls. Or search for opensource project that can do the same thing and tear it apart. Making statements based on opinion; back them up with references or personal experience. Not the answer youre looking for Browse other questions tagged directx shader-model or ask your own question.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |