Skip to content

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

Closed

Description

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.

Activity

  1. marcelolr commented on Feb 8, 2017

    @marcelolr
    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.

  2. tex3d commented on Mar 17, 2017

    @tex3d
    Contributor

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

  3. jholewinski commented on Mar 30, 2017

    @jholewinski
    CollaboratorAuthor

    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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions