Error 0x80070057 calling VertexShader for Direct3d11 - directx-11

My Windows 8.1 system has Directx11 installed but my video card is Directx 9. I'm trying to use SharpDX libaries and getting an 'parameter is incorrect' error new'ing up a VertexShader object.
Here is what I've tried
Running Directx 9 and using those libraries instead. Microsoft doesn't allow download of Directx 9 libraries from their web site now.
Running using software emulation. This is early stage development so I'm ok with that software emulation at this stage. This attempt failed with another error.
The call is this. d3dDevice and vertexShaderByteCode are non-null
new D3D11.VertexShader(d3dDevice, vertexShaderByteCode);
Question 0. Is there a way to identify what parameter it doesn't like? I'm using tutorial code which theoretically worked.
Question 1. Is the error coming from the video card?
Question 2. Is this a known issue?
thanks,
john

If you enable the Direct3D Debug Layer you should get more information on why the call failed.
What is the name of your video card? What Direct3D hardware feature level is your video card? 9.1, 9.2, 9.3? You can check by running dxcapsviewer from a Visual Studio Command Prompt. DirectX 11 can support 9.1 - 12.1 feature levels so it's quite likely at least some set of features will work on your hardware.

I figured it out. I was using sample code for DirectX 11 and the version of the pixel and vertex shader was incompatible with the DirectX 9 card that I had. In the call to compile the shader the version of the pixel shader was ps_5_0, I needed ps_4_0_level_9_1, the version of vertex shader was vs_5_0 and I needed vs__4_0_level_9_1. The 'invalid argument' was the compiled shader code.

Related

Vulkan cannot find physical devices on windows 10

I am very new to the vulkan API and have been having problems with getting it working. When I run the vulkan SDK examples or attempt to run my own code, vulkan is unable to find any supported devices. I have attempted to completely reinstall my display drivers, a complete reinstall of the vulkan SDK, a manual install of the vulkan runtime and tried installing the beta version of the nvidia vulkan drivers. I am running an Nvidia GeForce GTX 1660 Ti which should support vulkan just fine. The driver version is 451.79 and the vulkan SDK version is 1.2.148.0.
When it comes to using my own code, I am able to succesfully create an instance and setup debug callbacks. The error comes in as soon as I attempt to use vkEnumeratePhysicalDevices. The callback prints out this error:
Vulkan Callback: [Loader Message] code: 0 : setupLoaderTrampPhysDevs: Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
Along with that error I immediately check if the device count is 0, which ends up being true.
I feel like I have a problem with my vulkan RT or vulkan SDK install but I can't figure out what it is. Any help is greatly appreciated!
EDIT: I have also tried running vulkaninfo and that does successfully find my GPU and lists information about it.

MonoGame 3.6: Direct3D Shader/Effect works on Windows 7 but not Windows 10

I've got a small test program using a MonoGame 3.6 Direct3D shader/effect that displays an Earth model with continents shaded with a day/night texture (city lights show on the dark side).
https://github.com/davidsummers/mgtest
It works great on Windows 7 but not on Windows 10 Pro. On Windows 10 Pro it doesn't give any errors but just displays a black ball.
I've been trying to figure out for the last week what might cause it to work correctly on Windows 7 but not Windows 10 Pro.
I've also opened a bug report at https://github.com/MonoGame/MonoGame/issues/6171 with only 1 response so far with someone verifying that it just displays a black ball for them as well.
My understanding is that there should be no differences between Windows 7 and Windows 10 Direct3D that would prevent Direct3D from working. Is this the case or is there something I should do to update code that would make it work on both Windows 7 and Windows 10?
I'm fairly new at shaders/effects so there might be something obvious to someone else that I'm not knowledgeable about yet.
I'm running this on a Dell Precision M6700 with Nvidia Quadro K3000M card with Windows 10 Pro that previously was running Windows 7 Pro and displayed the earth/continents/NightDay Shader/effect with no problems.
The program still works correctly on another box with Windows 7 Pro.
The main question with respect to this issue is: SHOULD a MonoGame 3.6 custom effect/shader that works with Direct3D 9 on Windows 7 work on Windows 10 without any changes?
If not, what changes would need to be made to get it to work?
If it should work, why is not working?
Please let me know if more information is needed.
I've resolved the issue. A kind user on GitHub showed me that I had two data structures that should have been the same that weren't the same.
I deleted one of them and changed one of the shader subroutines to use the other data structure.
I also found that some (additional) lighting variables in the shader were not being initialized.
Once I did both of these things then the program seems to work correctly on all platforms.

kinect v1 no output although the drivers are installed correctly

a Kinect-Noob here.
My machine runs Windows 10 - x86
I connected my kinect v1 to computer after installing kinect runtime, kinect for windows drivers, SDKs and developer toolkit. It wont show anything on the kinect studio even when I ran kinect enabled app - 3D scan from windows store.
This is the screen shot of the drivers being properly installed
The processing example (called Point Cloud of OpenKinect processing library) code shows error as :
64 windows
There are no kinects, returning null
Earlier (5 weeks back) same code used to give output. During those 5 weeks, I updated windows 10.
I uninstalled and installed the whole kinect package (runtime, SDK, toolkit and drivers), but no results. Also, removed zigfu plugins (for primesense and OpenNI). Still no results
Any help is appreciated !
Thanks !!!

Intel RealSense 3D camera cannot be initialized

I wonder why every once in a while, Intel RealSense 3D camera fails to start? I have re-installed the drivers and SDK as well as the DCM but still it is whacky and very unpredictable. Any idea what the source of the problem could be? It should be able to run the examples in the SDK in a normal working situation.
Well, previously that it couldn't init problem was that only two of the its drivers could be recognized (not the virtual driver) like the following but now all of its driver are recognized and still it can't init.
so I am receiving an init failed message when running the SDK examples.
Any pointer for fixing is really appreciated.
If you are also showing an integrated webcam (other than the 3 RealSense listings), try disabling that so the RS camera can be seen as the primary.
Actually you can select the device you want to run the sample on in the menu "Device". If you installed the RealSense correctly and if the latest DCM is running (the current version is 1.4 if I remember), you should be able to select the RealSense device there and then run the sample.
Sometimes the DCM Service fails to start (e.g. if you force-restarted your machine recently). Then you just need to make the service restart and it should work.
Hope this helps.
I’m also facing the same problem (on windows 10), and found a way that solved it for me: search “Scanners and Cameras” in Control Panel, choose “Add Device”, under “Manufacturer” choose “Intel” and under “Model” choose “Intel(R) RealSense(TM) Camera SR300 Virtual Driver” or the version you use, and continue to install.
Have you installed the right drivers? There are two versions of the real sense cameras. The Windows 10 works with Intel Real Sense R3 which has completely different architecture than its predecessor.

Problem with OpenCV camera based samples

I'm doing a project on Hand Gesture Recognition , I installed OpenCV on my system it works fine except for sample programs related to camera like bgfg_segm, camshiftdemo etc . When I run these programs I get a window asking me to select the Video Source type from Integrated camera or FA VirtualCam(Fast Acces Software for Facial Recognition,Dell) . When I select Integrated cam light does not even glow whereas when I choose FA VirtualCam Cam switches on but it does not capture any image its just dark.
Using same setup I installed in my friend's laptop -Lenovo/WinXP it worked.
My camera works fine otherwise, no problem with it. I tried uninstalling and reinstalling and all possible combination but it didn't work.
Configuration: Dell Studio 1558
Ram: 4GB,
OS: Windows 7 Home Premium x64
OpenCV version 2.2
Software for camera: Dell WebCam Central.
There's an workaround for that, it worked for me.
You just have to capture the webcam using Processing and redirect it to OpenCV.
I explain it with more details at the Processing forum.
My source code is available at my page .
It appears that your camera is not compatible with OpenCV, see http://opencv.willowgarage.com/wiki/Welcome/OS
I have the exact same issue on a Vaio laptop using OpenCV (light comes on but a blank image). I managed to use processing/jmyron to get the functionality I needed (face detection).

Resources