Skip to content

add build option for clGetExtensionFunctionAddress behavior #11

Open
@bashbaug

Description

@bashbaug

clGetExtensionFunctionAddress has been deprecated but it still can be useful in some cases and some applications rely on it. The OpenCL runtime loader should optionally support it by dynamically loading the real OpenCL ICD loader similar to clGetPlatformIDs even if the default is to return NULL to encourage use of clGetExtensionFunctionAddressForPlatform instead.

This behavior is currently hard coded with an ifdef:

CL_API_ENTRY void* CL_API_CALL clGetExtensionFunctionAddress(
    const char* function_name)
{
#if 0
    static _sclModuleHandle module = _sclOpenICDLoader();
    _sclpfn_clGetExtensionFunctionAddress _clGetExtensionFunctionAddress =
        (_sclpfn_clGetExtensionFunctionAddress)::GetProcAddress(
            module, "clGetExtensionFunctionAddress");
    if (_clGetExtensionFunctionAddress) {
        return _clGetExtensionFunctionAddress(function_name);
    }
#endif
    return NULL;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions