5 Replies Latest reply on Feb 16, 2012 1:21 PM by Byron

    Quad Buffer Stereo With DirectX11

    mahoaga

      Currently , I am working on a project name Remote Stereo.

      My objective in this phase is,displaying an image pair in stereo mode with DirectX 11 with the Quad Buffer SDK that AMD published.I have already written a software for DirectX 9 that is displaying images in 3D,but the problem about that one is AMD's functions that they provided with SDK for DirectX 9 is not working.However,I did it by creating two back buffers and changing the view between them relatively. The thing about DirectX version 11 is the same.I am following all the steps in documentation,however there is a problem about the interface I guess.

       

      This is OpenStereoInterface function.Software loads 64 bit dll.files .There is not any problems about this function.Every routine works including AmdDxExtCreate11.

       

      HRESULT OpenStereoInterface()

                {

                          PFNAmdDxExtCreate11 AmdDxExtCreate11;

                          HMODULE hDLL;

                          HRESULT hr = S_OK;

                          DWORD code;

                          AmdDxExtVersion extVersion;

       

      #if defined _WIN64

                          LoadLibrary(L"atidxx64.dll");

                          hDLL=GetModuleHandle(L"atidxx64.dll");

       

      #else

                          LoadLibrary(L"atidxx32.dll");

                          hDLL=GetModuleHandleW(L"atidxx32.dll");

      #endif

       

                          /*code=GetLastError();          */

                          AmdDxExtCreate11=reinterpret_cast<PFNAmdDxExtCreate11>(GetProcAddress(hDLL,"AmdDxExtCreate11"));

                          if (AmdDxExtCreate11 == NULL)

                          {

                                    hr = E_FAIL;

                          }

                           if (SUCCEEDED(hr))

                          {

                                    hr=AmdDxExtCreate11(pDevice,&pExtension);

                          }

       

                           if (SUCCEEDED(hr))

                           {

                                     hr=pExtension->GetVersion(&extVersion);

                                     if(hr==S_OK)

                                     {

                                               sprintf_s(versionInfo,"Extension Version: %d.%d",extVersion.majorVersion,extVersion.minorVersion);

       

                                     }

       

                           }

       

                           if(FAILED(hr))

                           {

                                     CloseStereoInterface();

                                     FreeLibrary(hDLL);

                           }

       

                           return hr;

       

                }

       

      And this is the CreateDevice function.I create the device without swap chain,as mentioned in documentation.

       

      hr=D3D11CreateDevice(NULL,D3D_DRIVER_TYPE_HARDWARE,(HMODULE)0,0,&FeatureLevels,1,D3D11_SDK_VERSION,&pDevice,&featureLevel,&pDeviceContext);


                          if(SUCCEEDED(hr))

                          {

                                    if(SUCCEEDED(OpenStereoInterface()))

                                    {

                                               pStereo=static_cast<IAmdDxExtQuadBufferStereo*>(pExtension->GetExtInterface(AmdDxExtQuadBufferStereoID));

                                                        if(pStereo==NULL)

                                                                  hr=E_FAIL;

                                                        else

                                                                  pStereo->EnableQuadBufferStereo(TRUE);

                                    }

       

                          }

                          return hr;

       

      However,in the line below;

      pStereo=static_cast<IAmdDxExtQuadBufferStereo*>(pExtension->GetExtInterface(AmdDxExtQuadBufferStereoID));

       

      pExtension->GetExtInterface(AmdDxExtQuadBufferStereoID) returns null because of a reason I could not found.I debugged the Sample DirectX11 application included in Documentation,and still the same problem in same function.There is no problem with casting,problem is with the GetExtInterface function.

       

       

       

      I am using Visual Studio Express Edition 2008 as development tool and all the necessary headers and libraries are imported.

       

      What should I do to overcome this problem ?

        • Re: Quad Buffer Stereo With DirectX11
          Byron

          What is the monitor/TV that is being used?

           

          In the samples, if this fails, the code falls back to non-stereo rendering.

            • Re: Quad Buffer Stereo With DirectX11
              mahoaga

              We are using MSI  AE2420 All-In-One PC.

              Yes,it fails. Probably this fail has something to do with IZ3D drivers,because I  could not find any other explanations that Directx9 version(both sample and my application) works,but DirectX11 does not.

              However,in my application,there is no option that I render the sprites without stereo enabled,so if enabling fails,program terminates.

                • Re: Quad Buffer Stereo With DirectX11
                  Byron

                  How is the IZ3D drivers affecting it? It looks like it has nothign to do with it, since the sample doesn’t use IZ3D at all.

                   

                  IZ3D is only needed when the application isn’t using the stereo quad buffer interface.

                    • Re: Quad Buffer Stereo With DirectX11
                      mahoaga

                      How come the IZ3D drivers has nothing to do with it?  If I disable IZ3D drivers,both Directx9 and Directx11 samples do not work(in stereo mode),that is the first reason I made an assumption like that.

                      Second reason is,I am attaching the output of debug process for both drivers enabled and drivers disabled.If drivers are enabled,process loads all the IZ3D libraries.However,If I disable it,nothing is imported with IZ3D.

                       

                      Even though there is no code directly for IZ3D,in full screen stereo mode,drivers are affecting it. If I am wrong,could you please tell me the mechanism or relation between the third party driver and application?

                       

                      These italic lines are debug output of Directx9 sample with IZ3D drivers enabled.

                       

                      'Stereo3D9.exe': Loaded 'C:\Users\mechatronica\Desktop\Stereo SDK\Samples\Stereo3D9\Debug\Stereo3D9.exe', Symbols loaded.

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\D3DX10d_43.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\D3dx9d_43.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16661_none_ebfb56996c72aefc\comctl32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\iZ3D Driver\Win32\S3DInjector.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll'

                      D3DX10: (INFO) Using Intel SSE2 optimizations

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_420fe3fa2b8113bd\comctl32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll'

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\version.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll'

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\iZ3D Driver\Win32\S3DWrapperD3D9.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\D3DX9_42.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\iZ3D Driver\Win32\S3DDevIL.DLL', Binary was not built with debug information.

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\iZ3D Driver\Win32\S3DAPI.dll'

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\iZ3D Driver\Win32\OutputMethods\CMOShutterOutput.dll'

                      ...

                       

                       

                      These italic lines are debug output of Directx9 sample with IZ3D drivers disabled.

                       

                      'Stereo3D9.exe': Loaded 'C:\Users\mechatronica\Desktop\Stereo SDK\Samples\Stereo3D9\Debug\Stereo3D9.exe', Symbols loaded.

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\D3DX10d_43.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\D3dx9d_43.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16661_none_ebfb56996c72aefc\comctl32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'

                      D3DX10: (INFO) Using Intel SSE2 optimizations

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_420fe3fa2b8113bd\comctl32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll'

                      'Stereo3D9.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\version.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\atiu9pag.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll'

                      'Stereo3D9.exe': Unloaded 'C:\Windows\SysWOW64\atiumdva.dll'

                      'Stereo3D9.exe': Unloaded 'C:\Windows\SysWOW64\atiumdag.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll'

                      'Stereo3D9.exe': Loaded 'C:\Windows\SysWOW64\d3dref9.dll'


                        • Re: Quad Buffer Stereo With DirectX11
                          Byron

                          After cunsulting with one of the engineers

                           

                          Third party software like IZ3D and DDD can take any game and make it 3D stereo. They do this by intercepting the calls to the driver and rendering a separate left and right image for each draw call. I believe DDD uses our HD3D quad buffer API to do this, and IZ3D may also use it.

                           

                          The HD3D quad buffer API in our driver is a lower level interface which requires the game to explicitly render the left and right images separately to get stereo 3D.  So while 3rd party software may use our quad buffer API, the quad buffer API does not use IZ3D or DDD. Many games are currently using the AMD HD3D quad buffer API to get full stereo 3D without requiring any 3rd party software like IZ3D or DDD. In fact, the stereo samples do not require IZ3D or DDD to work.

                           

                          It sounds like something is wrong with the initialization, possibly because of the display you’re using, or some other configuration. Because you have IZ3D installed, it’s probably rendering left and right images for each draw call, as if the game was not directly using the HD3D quad buffer API.