diff options
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 5caaa9deac4..1507170d3a1 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -781,7 +781,7 @@ dri2_update_tex_buffer(struct dri_drawable *drawable, static __DRIimage * dri2_create_image_from_winsys(__DRIscreen *_screen, - int width, int height, enum pipe_format pf, + int width, int height, const struct dri2_format_mapping *map, int num_handles, struct winsys_handle *whandle, void *loaderPrivate) { @@ -791,6 +791,7 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, struct pipe_resource templ; unsigned tex_usage = 0; int i; + enum pipe_format pf = map->pipe_format; if (pscreen->is_format_supported(pscreen, pf, screen->target, 0, 0, PIPE_BIND_RENDER_TARGET)) @@ -889,7 +890,7 @@ dri2_create_image_from_name(__DRIscreen *_screen, whandle.stride = pitch * util_format_get_blocksize(map->pipe_format); - img = dri2_create_image_from_winsys(_screen, width, height, map->pipe_format, + img = dri2_create_image_from_winsys(_screen, width, height, map, 1, &whandle, loaderPrivate); if (!img) @@ -962,7 +963,7 @@ dri2_create_image_from_fd(__DRIscreen *_screen, map = dri2_get_mapping_by_fourcc(fourcc); } - img = dri2_create_image_from_winsys(_screen, width, height, map->pipe_format, + img = dri2_create_image_from_winsys(_screen, width, height, map, num_fds, whandles, loaderPrivate); if(img == NULL) { err = __DRI_IMAGE_ERROR_BAD_ALLOC; @@ -1249,7 +1250,7 @@ dri2_from_names(__DRIscreen *screen, int width, int height, int format, whandle.offset = offsets[0]; whandle.modifier = DRM_FORMAT_MOD_INVALID; - img = dri2_create_image_from_winsys(screen, width, height, map->pipe_format, + img = dri2_create_image_from_winsys(screen, width, height, map, 1, &whandle, loaderPrivate); if (img == NULL) return NULL; |