1 /**************************************************************************
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 * Screen, Adapter or GPU
31 * These are driver functions/facilities that are context independent.
39 #include "pipe/p_compiler.h"
40 #include "pipe/p_state.h"
51 * Gallium screen/adapter context. Basically everything
52 * hardware-specific that doesn't actually require a rendering
56 struct pipe_winsys
*winsys
;
58 void (*destroy
)( struct pipe_screen
* );
61 const char *(*get_name
)( struct pipe_screen
* );
63 const char *(*get_vendor
)( struct pipe_screen
* );
66 * Query an integer-valued capability/parameter/limit
67 * \param param one of PIPE_CAP_x
69 int (*get_param
)( struct pipe_screen
*, int param
);
72 * Query a float-valued capability/parameter/limit
73 * \param param one of PIPE_CAP_x
75 float (*get_paramf
)( struct pipe_screen
*, int param
);
78 * Check if the given pipe_format is supported as a texture or
80 * \param type one of PIPE_TEXTURE, PIPE_SURFACE
82 boolean (*is_format_supported
)( struct pipe_screen
*,
83 enum pipe_format format
,
87 * Create a new texture object, using the given template info.
89 struct pipe_texture
* (*texture_create
)(struct pipe_screen
*,
90 const struct pipe_texture
*templat
);
92 void (*texture_release
)(struct pipe_screen
*,
93 struct pipe_texture
**pt
);
95 /** Get a surface which is a "view" into a texture */
96 struct pipe_surface
*(*get_tex_surface
)(struct pipe_screen
*,
97 struct pipe_texture
*texture
,
98 unsigned face
, unsigned level
,
107 #endif /* P_SCREEN_H */