Skip to content

test_d3d10 fails to create an OpenCL context on Nvidia proprietary driver #2615

@ahesham-arm

Description

@ahesham-arm

Running test_d3d10 fails for me on my Nvidia RTX 2080 (TU104) when creating an OpenCL context. The call to:

    // create the context
    properties[0] = (cl_context_properties)CL_CONTEXT_D3D10_DEVICE_KHR;
    properties[1] = (cl_context_properties)pDevice;
    properties[2] = (cl_context_properties)CL_CONTEXT_INTEROP_USER_SYNC;
    properties[3] = (cl_context_properties)CL_TRUE; // or CL_FALSE
    properties[4] = (cl_context_properties)0;
    context = clCreateContext(
        properties,
        1,
        &device,
        NULL,
        NULL,
        &result);

fails with the following log:

[assertion failed: (result == CL_SUCCESS) at OpenCL-CTS\test_conformance\d3d10\main.cpp:306]
ERROR: clCreateContext with CL_CONTEXT_D3D10_DEVICE_KHR failed
FAILED

The actual error returned is CL_INVALID_VALUE (-30), which is also not the correct error code to return, as it should be CL_INVALID_PROPERTY instead:

CL_INVALID_PROPERTY if a context property name in properties is not a supported property name, if the value specified for a supported property name is not valid, or if the same property name is specified more than once.

Removing the CL_CONTEXT_INTEROP_USER_SYNC from the context properties passes the test.

I am running driver version 591.86 on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    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