IDirect3D9::GetAdapterCount wont find my second video card - directx

My laptop has two video cards, a high powered NVIDIA one and an onboard Intel one. When I call IDirect3D9::GetAdapterCount however, it only finds the onboard Intel one, probably because the high powered one is being hidden.
I'm able to go into my laptop settings and tell it 'force choose' the NVIDIA card, and then it works, but this is not an acceptable solution for my end-users. I've also noticed that when I run Battlefield3, it's able to properly find the NVIDIA card even without 'force choose' enabled. Maybe there's a special white-list that has Battlefield listed? Or some other secret method?
Any ideas how to acquire that elusive card?

Are you sure the intel chip is enumeratable? Quite often its not. By sticking in a discrete GPU the sandybridge (and older) chipset is generally disabled. You probably want to check the Nvidia optimus test tool.

GetAdapterCount will actually returns count of the monitors in system, not videocards. And as far as I know there is no way to force choose it programmatically.
If you talking about nVidia optimus technology, it choose videochip using driver settings.

Related

Is it possible to associate single wireless network card to multiple WiFi Access Points at a time?

Is it possible to associate single wireless network interface controller (WNIC) with multiple Wireless Access Points (WAP) at a time? If not: why?
I've never heard about such a feature, so I assume it's technically impossible or fairly difficult and rarely implemented. Is it really that difficult/impossible to implement driver providing such a feature? Is it software or hardware difficulty?
I assume that TCP/IP protocols' specifications doesn't limit us at all because if I attach multiple WNICs to my computer, I can easily connect to multiple APs.
If it's software difficulty, than what's the actual problem? Does Linux/Windows kernel or WNIC's drivers limits it? Or maybe system libraries (like libc on GNU/Linux systems)?
If it's hardware difficulty, what actually limits us? Antennas? Using single radio frequency at a time? If yes, than why can't we implement frequency hopping (like Kismet does)? Because of lost packets during time spent on other channels? If yes, than can we associate WNIC with multiple routers working on the same channel (I know that channel overlapping is bad)?
Note: I'm not talking about dual band routers. I assume that we consider most common WNIC and AP which both work on 2.4GHz channels. If I have to put my question into OS context, than I choose GNU/Linux context.
Yes. The basic technique is that the client tells AP 'A' that it is going to sleep and then talks to AP 'B' while A is buffering frames for it.
Microsoft research worked this out a while ago:
http://research.microsoft.com/en-us/um/redmond/projects/virtualwifi/
Many low-level drivers support Wi-Fi interface virtualization (e.g. the BRCM wl command has options which support this).
Apple's AirDrop and MultiPeer features for OS X and iOS use a similar technique, but instead of talking to a 2nd AP they talk to a peer device.

How to get which video card(nvdia or amd) is using in DirectX

I need to know how to get which kind of video card is using in directX, because some features in my program are not supported in amd video card and cause crash.
So, I need to get which card the computer is using(some computer may have more than one video card).
So before you throw ATI/AMD under the bus here, make sure that the problem is not actually due to your application. For Direct3D 10/11, be sure to enable the debug device and ensure you do not have any CORRUPTION or ERRORS, and look at all WARNINGS.
Next, see if there is a newer driver available for the repro case. If there is, then just tell your users to update their drivers. If not, and it seems to be a legitimate crash inside the driver then report that as a bug to ATI/AMD (or NVidia or Intel as the case may be).
Test your app on more than one video card/driver combination from each vendor. For indies this can be challenging, but it's an important part of making sure your application works on a broad set of hardware. For Direct3D 11, you need to try various Direct3D hardware feature level devices to ensure good coverage.
Real games do have some extra warnings tied to detecting specific hardware IDs when dealing with wide-spread driver bugs and unofficial vendor-specific extensions). There is an example of doing this detection here based on the vendorid/deviceid combination in DXGI_ADAPTER_DESC or D3DADAPTER_IDENTIFIER9. Locking out all cards from a specific vendor is overkill and likely to just annoy your customers.

Switching between graphics cards Nvidia or ATI in OpenCV

I'm going to run my project on servers with a lot of ATI and NVidia Tesla. How can I optimize the use of graphics cards? Can I choose the specific video card when I start the instance application?
Depending on your definition of "specific":
If you just want to select between NVIDIA and AMD, you can use CL_PLATFORM_VENDOR with clGetPlatformInfo and look for "AMD" or "NVIDIA".
If you want to get back to a specific GPU you've used before, you can use CL_DEVICE_VENDOR_ID with clGetDeviceInfo and compare the saved value.
Sometimes those are the same in a dual-GPU installation. Use vendor extensions to get more specific (see Associating OpenCL device ids with GPU).

Can I use openCL in a application that I distribute to non developer machine?

I recently started to learn how to use openCL to speed up some part of my code. So far the speed gain is impressive. In one case the code ran up to 50X faster than on the CPU. However I wonder if can start using this code in a production environnement. The reason is that the first time that I tried to run the example code, nothing worked. I was able to make it run by downloading the driver on the Nvidia openCL SDK download page (I have a Geforce GTX260). It gave me a blue during installation but after that I was able to run the example program and create my own code.
Does the fact that it didn't work "out of the box" for me mean that the mainstream drivers does not yet support it, despite the fact that it is specifically written that it does on the driver download page? What about ATI support? Will everyone have to download the special driver that gave me a blue screen on install?
In short, is openCL ready for production code?
If someone can give me some details, I'd like to know. Does anyone has been able to run a simple program on a number of different device without installing anything SDK related?
You may find an accurate answer on the OpenCL forums on the Khronos Group message boards. The OpenCL work group hangs out there regularly.
Does anyone has been able to run a
simple program on a number of
different device without installing
anything SDK related?
Nop. For instance, on ATI's GPUs end-users need to install ATI Stream SDK in order to run OpenCL code (just having an up-to-date graphics driver is not sufficient).
You may want to consider trying DirectCompute (Microsoft's version of GPU programming) or doing your OpenCL work on a Snow Leopard Mac. Those are the two ways (that I know of) that you can deliver a GPU programming solution to another user without any driver or other installation hassle.

Programming Monitors. Setup and make HP, Dell, or other?

I have been developing using a single 15.4" laptop for a while (duh!). Actually I am quite comfortable. I use compiz Grid, scale, window and some other nice add ons, to easily navigate.
I am now impressed by other dual monitor related questions on Stackoverflow and am buying more monitors.
Since I am not exactly used to these multiple monitor setups, I have a few (possibly basic) queries.
If I buy just one monitor, will I be able to set up it for a different resolution than on my laptop, on Ubuntu. What packages I need to install on ubuntu to better manage multiple monitors.
If I buy 2 22" monitors and intend to use the laptop screen as well, wont the third one appear like an odd man. Does it happen even if I have just 2 monitors.
I have used Dell and HP monitors in my earlier company and I feel HP is so much better. Obviously I would love to have a monitor that has little corners and nearly all visible screen, like iPhone. Is there a specific recommended model.
For a 3 monitor setup, is it absolutely necessary to buy an extra graphics card. Are there any other better solutions.
You can have two monitors at different resolution on Ubuntu just fine. I used to connect an Ubuntu laptop to a TV using HDMI and it worked fine. Something annoying is what monitor gets to be the main one, because you get all your desktop there. I thing generally the biggest one is the main one, which is not what I wanted for the TV, but probably what you want.
I'm not sure if it's possible to get a third monitor in any way on a laptop. I'd recommend you to go for the biggest monitor you can (budget and laptop capabilities, can you go to 30"?) and use the laptop as secondary screen space (useful for a browser, or docs, or im/tweeter/mails, etc.
A CRT monitor can be set up with most any resolution you like, while a LCD monitor works best at it's max resolution.
You can mix monitors with different resolutions without problems in Windows, I can't imagine that it would be very hard in Linux either.
Be carefully dual head on Linux still sucks. The only time i got a triple screen configured with a GUI frontend and without .XConfig hacks was with Mandriva Spring 2007 never before and never after with any of Suse, Mandriva, CentOS.
It really sucks. It seems that configuration like dual head on one card and single head on another one is just not in the head of the programmers. You can enable all cards (maybe dual head is not always supported) or none.
Windows and MacOSX are the only systems which work fine. But MacOSX (and Hackintoshs) do not support dual head on all supported cards, for example my two 7300GTS cards can't run as dual head on MacOSX.

Resources