diff options
author | Dave Airlie <[email protected]> | 2018-05-29 11:21:38 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-05-30 09:11:53 +1000 |
commit | b7ac0779e0228969536a6738926b8b7a0d565cd4 (patch) | |
tree | 951eecc4de17cc6d0df92fe0c2894be0b8fee773 /src/gallium/state_trackers/dri | |
parent | d2eaff33d0132ef17eb458f04e5369985129ce31 (diff) |
gallium/winsys: rename DRM_API_HANDLE_* to WINSYS_HANDLE_*
This just renames this as we want to add an shm handle which
isn't really drm related.
Originally by: Marc-André Lureau <[email protected]>
(airlied: I used this sed script instead)
This was generated with:
git grep -l 'DRM_API_' | xargs sed -i 's/DRM_API_/WINSYS_/g'
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 58a6757f037..e980698cfb6 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -620,9 +620,9 @@ dri2_allocate_buffer(__DRIscreen *sPriv, memset(&whandle, 0, sizeof(whandle)); if (screen->can_share_buffer) - whandle.type = DRM_API_HANDLE_TYPE_SHARED; + whandle.type = WINSYS_HANDLE_TYPE_SHARED; else - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; screen->base.screen->resource_get_handle(screen->base.screen, NULL, buffer->resource, &whandle, @@ -808,9 +808,9 @@ dri2_allocate_textures(struct dri_context *ctx, whandle.offset = 0; whandle.modifier = DRM_FORMAT_MOD_INVALID; if (screen->can_share_buffer) - whandle.type = DRM_API_HANDLE_TYPE_SHARED; + whandle.type = WINSYS_HANDLE_TYPE_SHARED; else - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; drawable->textures[statt] = screen->base.screen->resource_from_handle(screen->base.screen, &templ, &whandle, @@ -1068,7 +1068,7 @@ dri2_create_image_from_name(__DRIscreen *_screen, enum pipe_format pf; memset(&whandle, 0, sizeof(whandle)); - whandle.type = DRM_API_HANDLE_TYPE_SHARED; + whandle.type = WINSYS_HANDLE_TYPE_SHARED; whandle.handle = name; whandle.modifier = DRM_FORMAT_MOD_INVALID; @@ -1127,7 +1127,7 @@ dri2_create_image_from_fd(__DRIscreen *_screen, goto exit; } - whandles[i].type = DRM_API_HANDLE_TYPE_FD; + whandles[i].type = WINSYS_HANDLE_TYPE_FD; whandles[i].handle = (unsigned)fds[i]; whandles[i].stride = (unsigned)strides[i]; whandles[i].offset = (unsigned)offsets[i]; @@ -1267,35 +1267,35 @@ dri2_query_image(__DRIimage *image, int attrib, int *value) switch (attrib) { case __DRI_IMAGE_ATTRIB_STRIDE: - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) return GL_FALSE; *value = whandle.stride; return GL_TRUE; case __DRI_IMAGE_ATTRIB_OFFSET: - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) return GL_FALSE; *value = whandle.offset; return GL_TRUE; case __DRI_IMAGE_ATTRIB_HANDLE: - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) return GL_FALSE; *value = whandle.handle; return GL_TRUE; case __DRI_IMAGE_ATTRIB_NAME: - whandle.type = DRM_API_HANDLE_TYPE_SHARED; + whandle.type = WINSYS_HANDLE_TYPE_SHARED; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) return GL_FALSE; *value = whandle.handle; return GL_TRUE; case __DRI_IMAGE_ATTRIB_FD: - whandle.type= DRM_API_HANDLE_TYPE_FD; + whandle.type= WINSYS_HANDLE_TYPE_FD; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) return GL_FALSE; @@ -1323,7 +1323,7 @@ dri2_query_image(__DRIimage *image, int attrib, int *value) *value = 1; return GL_TRUE; case __DRI_IMAGE_ATTRIB_MODIFIER_UPPER: - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; whandle.modifier = DRM_FORMAT_MOD_INVALID; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) @@ -1333,7 +1333,7 @@ dri2_query_image(__DRIimage *image, int attrib, int *value) *value = (whandle.modifier >> 32) & 0xffffffff; return GL_TRUE; case __DRI_IMAGE_ATTRIB_MODIFIER_LOWER: - whandle.type = DRM_API_HANDLE_TYPE_KMS; + whandle.type = WINSYS_HANDLE_TYPE_KMS; whandle.modifier = DRM_FORMAT_MOD_INVALID; if (!image->texture->screen->resource_get_handle(image->texture->screen, NULL, image->texture, &whandle, usage)) @@ -1413,7 +1413,7 @@ dri2_from_names(__DRIscreen *screen, int width, int height, int format, return NULL; memset(&whandle, 0, sizeof(whandle)); - whandle.type = DRM_API_HANDLE_TYPE_SHARED; + whandle.type = WINSYS_HANDLE_TYPE_SHARED; whandle.handle = names[0]; whandle.stride = strides[0]; whandle.offset = offsets[0]; @@ -1945,7 +1945,7 @@ dri2_interop_export_object(__DRIcontext *_ctx, } memset(&whandle, 0, sizeof(whandle)); - whandle.type = DRM_API_HANDLE_TYPE_FD; + whandle.type = WINSYS_HANDLE_TYPE_FD; success = screen->resource_get_handle(screen, st->pipe, res, &whandle, usage); |