Commit d2eaff33 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

gallium: move winsys handle to it's own file.

This will be used in the drisw interface later, which isn't
drm specific.
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent 4bd2047d
......@@ -4,58 +4,13 @@
#include "pipe/p_compiler.h"
#include "winsys_handle.h"
struct pipe_screen;
struct pipe_screen_config;
struct pipe_context;
struct pipe_resource;
#define DRM_API_HANDLE_TYPE_SHARED 0
#define DRM_API_HANDLE_TYPE_KMS 1
#define DRM_API_HANDLE_TYPE_FD 2
/**
* For use with pipe_screen::{texture_from_handle|texture_get_handle}.
*/
struct winsys_handle
{
/**
* Input for texture_from_handle, valid values are
* DRM_API_HANDLE_TYPE_SHARED or DRM_API_HANDLE_TYPE_FD.
* Input to texture_get_handle,
* to select handle for kms, flink, or prime.
*/
unsigned type;
/**
* Input for texture_get_handle, allows to export the offset
* of a specific layer of an array texture.
*/
unsigned layer;
/**
* Input to texture_from_handle.
* Output for texture_get_handle.
*/
unsigned handle;
/**
* Input to texture_from_handle.
* Output for texture_get_handle.
*/
unsigned stride;
/**
* Input to texture_from_handle.
* Output for texture_get_handle.
*/
unsigned offset;
/**
* Input to resource_from_handle.
* Output from resource_get_handle.
*/
uint64_t modifier;
};
/**
* Configuration queries.
*/
......
#ifndef _WINSYS_HANDLE_H_
#define _WINSYS_HANDLE_H_
#ifdef __cplusplus
extern "C" {
#endif
#define DRM_API_HANDLE_TYPE_SHARED 0
#define DRM_API_HANDLE_TYPE_KMS 1
#define DRM_API_HANDLE_TYPE_FD 2
/**
* For use with pipe_screen::{texture_from_handle|texture_get_handle}.
*/
struct winsys_handle
{
/**
* Input for texture_from_handle, valid values are
* WINSYS_HANDLE_TYPE_SHARED or WINSYS_HANDLE_TYPE_FD.
* Input to texture_get_handle,
* to select handle for kms, flink, or prime.
*/
unsigned type;
/**
* Input for texture_get_handle, allows to export the offset
* of a specific layer of an array texture.
*/
unsigned layer;
/**
* Input to texture_from_handle.
* Output for texture_get_handle.
*/
unsigned handle;
/**
* Input to texture_from_handle.
* Output for texture_get_handle.
*/
unsigned stride;
/**
* Input to texture_from_handle.
* Output for texture_get_handle.
*/
unsigned offset;
/**
* Input to resource_from_handle.
* Output from resource_get_handle.
*/
uint64_t modifier;
};
#ifdef __cplusplus
}
#endif
#endif /* _WINSYS_HANDLE_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment