st/dri: pass dri2_format_mapping directly to dri2_create_image_from_winsys

this makes the entire struct available for use here

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Mike Blumenkrantz 2019-05-29 16:56:30 -04:00 committed by Kenneth Graunke
parent 2cc85670a7
commit 08fc14a979
1 changed files with 5 additions and 4 deletions

View File

@ -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;