Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShaderOpTest.{cpp,h} does not support hardware devices #74

Closed
jholewinski opened this issue Feb 8, 2017 · 3 comments
Closed

ShaderOpTest.{cpp,h} does not support hardware devices #74

jholewinski opened this issue Feb 8, 2017 · 3 comments
Assignees

Comments

@jholewinski
Copy link
Collaborator

The DXIL tests in clang-hlsl-tests.dll do not all support running on hardware (without source modifications).

ShaderOpTest.h:

 bool UseWarpDevice = true;

ShaderOpTest.cpp:

    if (m_pShaderOp->UseWarpDevice) {                                                                         
      CComPtr<IDXGIAdapter> warpAdapter;                                                                      
      CHECK_HR(factory->EnumWarpAdapter(IID_PPV_ARGS(&warpAdapter)));                                         
      CHECK_HR(D3D12CreateDevice(warpAdapter, FeatureLevelRequired,                                           
                                 IID_PPV_ARGS(&pDevice)));                                                    
    } else {                                                                                                  
      CComPtr<IDXGIAdapter1> hardwareAdapter;                                                                 
      GetHardwareAdapter(factory, m_pShaderOp->AdapterName, &hardwareAdapter);                                
      if (hardwareAdapter == nullptr) {                                                                       
        CHECK_HR(HRESULT_FROM_WIN32(ERROR_NOT_FOUND));                                                        
      }                                                                                                       
      CHECK_HR(D3D12CreateDevice(hardwareAdapter, FeatureLevelRequired,                                       
                                 IID_PPV_ARGS(&pDevice)));                                                    
    }    

There are no other accesses (in particular, writes) to UseWarpDevice, meaning all runs will use WARP, regardless of hardware support.

@marcelolr
Copy link
Contributor

Thanks for filing the issue.

We're looking at allowing the device to be provided for the test (a sort of middle-ground between "do everything from the test description" and "we've got a window ready for display, please hook into that"). Stay tuned.

@tex3d
Copy link
Contributor

tex3d commented Mar 17, 2017

Closing, as I believe this is fixed. Open another issue if there are more problems.

@tex3d tex3d closed this as completed Mar 17, 2017
@jholewinski
Copy link
Collaborator Author

I'm still unable to run the following tests on a hardware device due to this issue:

BasicTriangleOpTest
MinMaxTest
OutOfBoundsTest
SaturateTest
DoShaderOpArithTest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants