mesa

dlsymdlopen

20.2.1

20 / 7568 files match, 11 filtered matches.

src/loader/loader.c



580 | 
581 |    get_extensions_name = loader_get_extensions_name(driver_name);
582 |    if (get_extensions_name) {
583 |       get_extensions = dlsym(driver, get_extensions_name);
584 |       if (get_extensions) {
585 |          extensions = get_extensions();
591 |    }
592 | 
593 |    if (!extensions)
594 |       extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
595 |    if (extensions == NULL) {
596 |       log_(_LOADER_WARNING,


src/drm-shim/drm_shim.c



135 | 
136 | static void *get_function_pointer(const char *name)
137 | {
138 |    void *func = dlsym(RTLD_NEXT, name);
139 |    if (!func) {
140 |       fprintf(stderr, "Failed to resolve %s\n", name);


src/gallium/auxiliary/util/u_dl.c



58 |                          const char *procname)
59 | {
60 | #if defined(PIPE_OS_UNIX)
61 |    return (util_dl_proc) pointer_to_func(dlsym((void *)library, procname));
62 | #elif defined(PIPE_OS_WINDOWS)
63 |    return (util_dl_proc)GetProcAddress((HMODULE)library, procname);


src/gallium/frontends/dri/dri_helpers.c



53 |    }
54 | 
55 |    screen->opencl_dri_event_add_ref =
56 |       dlsym(RTLD_DEFAULT, "opencl_dri_event_add_ref");
57 |    screen->opencl_dri_event_release =
58 |       dlsym(RTLD_DEFAULT, "opencl_dri_event_release");
59 |    screen->opencl_dri_event_wait =
60 |       dlsym(RTLD_DEFAULT, "opencl_dri_event_wait");
61 |    screen->opencl_dri_event_get_fence =
62 |       dlsym(RTLD_DEFAULT, "opencl_dri_event_get_fence");
63 | 
64 |    success = dri2_is_opencl_interop_loaded_locked(screen);


src/mesa/drivers/dri/common/megadriver_stub.c



115 |     * RTLD_DEFAULT. It seems unlikely that the symbol will
116 |     * be found in another library, but this isn't optimal.
117 |     */
118 |    get_extensions = dlsym(RTLD_DEFAULT, get_extensions_name);
119 |    free(get_extensions_name);
120 |    if (!get_extensions)


src/intel/tools/intel_dump_gpu.c



646 | static void
647 | init(void)
648 | {
649 |    libc_close = dlsym(RTLD_NEXT, "close");
650 |    libc_ioctl = dlsym(RTLD_NEXT, "ioctl");
651 |    fail_if(libc_close == NULL || libc_ioctl == NULL,
652 |            "failed to get libc ioctl or close\n");


src/intel/tools/intel_sanitize_gpu.c



425 | init(void)
426 | {
427 |    fds_to_bo_sizes = _mesa_pointer_hash_table_create(NULL);
428 |    libc_open = dlsym(RTLD_NEXT, "open");
429 |    libc_close = dlsym(RTLD_NEXT, "close");
430 |    libc_fcntl = dlsym(RTLD_NEXT, "fcntl");
431 |    libc_ioctl = dlsym(RTLD_NEXT, "ioctl");
432 | }
433 | 


src/glx/applegl_glx.c



104 | static void *
105 | applegl_get_proc_address(const char *symbol)
106 | {
107 |    return dlsym(apple_cgl_get_dl_handle(), symbol);
108 | }
109 | 


src/glx/dri_glx.c



220 | 
221 |    if (!config) {
222 |       /* Fall back to the old method */
223 |       config = dlsym(handle, "__driConfigOptions");
224 |       if (config)
225 |          config = strdup(config);


src/glx/windows/windowsgl.c



337 |    int *result = (int *)args;
338 | 
339 |    /* Rather than play linkage games using stdcall to ensure we get
340 |       glGetString from opengl32.dll here, use dlsym */
341 |    void *dlhandle = windows_get_dl_handle();
342 |    const char *(*proc)(int) = dlsym(dlhandle, "glGetString");
343 |    const char *gl_renderer = (const char *)proc(GL_RENDERER);
344 | 
367 |    windows_extensions_result *r = (windows_extensions_result *)args;
368 | 
369 |    void *dlhandle = windows_get_dl_handle();
370 |    const char *(*proc)(int) = dlsym(dlhandle, "glGetString");
371 | 
372 |    r->gl_extensions = strdup(proc(GL_EXTENSIONS));


src/glx/apple/apple_cgl.c



49 | {
50 |    void *s;
51 | 
52 |    s = dlsym(h, name);
53 | 
54 |    if (NULL == s) {