glsl2: Add and use new variable mode ir_var_temporary
[mesa/nouveau-pmpeg.git] / src / gallium / targets / xorg-vmwgfx / vmw_driver.h
blobd6e3620cd3d1baf8cfbb7a1a578e6afc566b89b6
1 /**********************************************************
2 * Copyright 2009 VMware, Inc. All rights reserved.
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
24 **********************************************************/
26 /**
27 * @file
28 * Contains the shared resources for VMware Xorg driver
29 * that sits ontop of the Xorg State Traker.
31 * It is initialized in vmw_screen.c.
33 * @author Jakob Bornecrantz <jakob@vmware.com>
36 #ifndef VMW_DRIVER_H_
37 #define VMW_DRIVER_H_
39 #include "state_trackers/xorg/xorg_tracker.h"
41 struct vmw_dma_buffer;
43 struct vmw_rect
45 int32_t x;
46 int32_t y;
47 uint32_t w;
48 uint32_t h;
51 struct vmw_customizer
53 CustomizerRec base;
54 ScrnInfoPtr pScrn;
56 int fd;
58 void *cursor_priv;
60 /* vmw_video.c */
61 void *video_priv;
64 static INLINE struct vmw_customizer *
65 vmw_customizer(CustomizerPtr cust)
67 return cust ? (struct vmw_customizer *) cust : NULL;
70 /***********************************************************************
71 * vmw_ctrl.c
74 void vmw_ctrl_ext_init(struct vmw_customizer *vmw);
77 /***********************************************************************
78 * vmw_video.c
81 Bool vmw_video_init(struct vmw_customizer *vmw);
83 Bool vmw_video_close(struct vmw_customizer *vmw);
85 void vmw_video_stop_all(struct vmw_customizer *vmw);
88 /***********************************************************************
89 * vmw_ioctl.c
92 int vmw_ioctl_cursor_bypass(struct vmw_customizer *vmw, int xhot, int yhot);
94 struct vmw_dma_buffer * vmw_ioctl_buffer_create(struct vmw_customizer *vmw,
95 uint32_t size,
96 unsigned *handle);
98 void * vmw_ioctl_buffer_map(struct vmw_customizer *vmw,
99 struct vmw_dma_buffer *buf);
101 void vmw_ioctl_buffer_unmap(struct vmw_customizer *vmw,
102 struct vmw_dma_buffer *buf);
104 void vmw_ioctl_buffer_destroy(struct vmw_customizer *vmw,
105 struct vmw_dma_buffer *buf);
107 int vmw_ioctl_supports_streams(struct vmw_customizer *vmw);
109 int vmw_ioctl_num_streams(struct vmw_customizer *vmw,
110 uint32_t *ntot, uint32_t *nfree);
112 int vmw_ioctl_unref_stream(struct vmw_customizer *vmw, uint32_t stream_id);
114 int vmw_ioctl_claim_stream(struct vmw_customizer *vmw, uint32_t *out);
116 int vmw_ioctl_update_layout(struct vmw_customizer *vmw, uint32_t num, struct vmw_rect *rects);
119 #endif