diff options
author | Gurchetan Singh <[email protected]> | 2017-08-01 14:49:33 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-08-07 18:16:52 +0100 |
commit | bbdeddd5fd0b797e1e281f058338b3da4d98029d (patch) | |
tree | dc3061b8d41d422552236c15cc50c3d02af94f94 /src/gallium/state_trackers/dri | |
parent | 12fcdc4ba04cf7ffe0370cd35ebb26002790b9eb (diff) |
st/dri: add drisw image extension
Since the revelant functions have been moved to dri_helpers,
drisw.c can make use of the extension. Note we have version 6
of the extension, since we want to support createImageFromTexture.
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/drisw.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c index c0f3058272c..9466cfdb203 100644 --- a/src/gallium/state_trackers/dri/drisw.c +++ b/src/gallium/state_trackers/dri/drisw.c @@ -362,6 +362,14 @@ drisw_update_tex_buffer(struct dri_drawable *drawable, pipe_transfer_unmap(pipe, transfer); } +static __DRIimageExtension driSWImageExtension = { + .base = { __DRI_IMAGE, 6 }, + + .createImageFromRenderbuffer = dri2_create_image_from_renderbuffer, + .createImageFromTexture = dri2_create_from_texture, + .destroyImage = dri2_destroy_image, +}; + /* * Backend function for init_screen. */ @@ -372,6 +380,7 @@ static const __DRIextension *drisw_screen_extensions[] = { &dri2ConfigQueryExtension.base, &dri2FenceExtension.base, &dri2NoErrorExtension.base, + &driSWImageExtension.base, NULL }; @@ -413,6 +422,8 @@ drisw_init_screen(__DRIscreen * sPriv) if (!configs) goto fail; + screen->lookup_egl_image = dri2_lookup_egl_image; + return configs; fail: dri_destroy_screen_helper(screen); |