1 /**************************************************************************
3 * Copyright 2010 VMware, Inc.
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 * USE OR OTHER DEALINGS IN THE SOFTWARE.
22 * The above copyright notice and this permission notice (including the
23 * next paragraph) shall be included in all copies or substantial portions
26 **************************************************************************/
30 * Null software rasterizer winsys.
32 * There is no present support. Framebuffer data needs to be obtained via
35 * @author Jose Fonseca
40 #include "pipe/p_format.h"
41 #include "util/u_memory.h"
42 #include "frontend/sw_winsys.h"
43 #include "null_sw_winsys.h"
47 null_sw_is_displaytarget_format_supported(struct sw_winsys
*ws
,
49 enum pipe_format format
)
56 null_sw_displaytarget_map(struct sw_winsys
*ws
,
57 struct sw_displaytarget
*dt
,
66 null_sw_displaytarget_unmap(struct sw_winsys
*ws
,
67 struct sw_displaytarget
*dt
)
74 null_sw_displaytarget_destroy(struct sw_winsys
*winsys
,
75 struct sw_displaytarget
*dt
)
81 static struct sw_displaytarget
*
82 null_sw_displaytarget_create(struct sw_winsys
*winsys
,
84 enum pipe_format format
,
85 unsigned width
, unsigned height
,
87 const void *front_private
,
90 fprintf(stderr
, "null_sw_displaytarget_create() returning NULL\n");
95 static struct sw_displaytarget
*
96 null_sw_displaytarget_from_handle(struct sw_winsys
*winsys
,
97 const struct pipe_resource
*templat
,
98 struct winsys_handle
*whandle
,
106 null_sw_displaytarget_get_handle(struct sw_winsys
*winsys
,
107 struct sw_displaytarget
*dt
,
108 struct winsys_handle
*whandle
)
116 null_sw_displaytarget_display(struct sw_winsys
*winsys
,
117 struct sw_displaytarget
*dt
,
118 void *context_private
,
119 struct pipe_box
*box
)
126 null_sw_destroy(struct sw_winsys
*winsys
)
135 static struct sw_winsys
*winsys
;
137 winsys
= CALLOC_STRUCT(sw_winsys
);
141 winsys
->destroy
= null_sw_destroy
;
142 winsys
->is_displaytarget_format_supported
= null_sw_is_displaytarget_format_supported
;
143 winsys
->displaytarget_create
= null_sw_displaytarget_create
;
144 winsys
->displaytarget_from_handle
= null_sw_displaytarget_from_handle
;
145 winsys
->displaytarget_get_handle
= null_sw_displaytarget_get_handle
;
146 winsys
->displaytarget_map
= null_sw_displaytarget_map
;
147 winsys
->displaytarget_unmap
= null_sw_displaytarget_unmap
;
148 winsys
->displaytarget_display
= null_sw_displaytarget_display
;
149 winsys
->displaytarget_destroy
= null_sw_displaytarget_destroy
;