summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMike Blumenkrantz <[email protected]>2019-05-29 16:56:30 -0400
committerKenneth Graunke <[email protected]>2019-07-01 15:16:56 -0700
commit08fc14a97962ea2741956bf8fca90f659740db15 (patch)
treec4f9a85a08efbec34e30afd1a14a8a6c391073ea /src/gallium
parent2cc85670a79194a4c89797f0942d9eef4455fb92 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c9
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;