1 /**********************************************************
2 * Copyright 2008-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
24 **********************************************************/
28 * VMware SVGA specific winsys interface.
30 * @author Jose Fonseca <jfonseca@vmware.com>
32 * Documentation taken from the VMware SVGA DDK.
35 #ifndef SVGA_WINSYS_H_
36 #define SVGA_WINSYS_H_
38 #include "svga_types.h"
40 #include "svga3d_reg.h"
42 #include "pipe/p_compiler.h"
43 #include "pipe/p_defines.h"
45 #include "svga_mksstats.h"
47 struct svga_winsys_screen
;
48 struct svga_winsys_buffer
;
51 struct pipe_debug_callback
;
52 struct pipe_fence_handle
;
58 #define SVGA_BUFFER_USAGE_PINNED (1 << 0)
59 #define SVGA_BUFFER_USAGE_WRAPPED (1 << 1)
60 #define SVGA_BUFFER_USAGE_SHADER (1 << 2)
63 * Relocation flags to help with dirty tracking
64 * SVGA_RELOC_WRITE - The command will cause a GPU write to this
66 * SVGA_RELOC_READ - The command will cause a GPU read from this
68 * SVGA_RELOC_INTERNAL The command will only transfer data internally
69 * within the resource, and optionally clear
71 * SVGA_RELOC_DMA - Only set for resource buffer DMA uploads for winsys
72 * implementations that want to track the amount
73 * of such data referenced in the command stream.
75 #define SVGA_RELOC_WRITE (1 << 0)
76 #define SVGA_RELOC_READ (1 << 1)
77 #define SVGA_RELOC_INTERNAL (1 << 2)
78 #define SVGA_RELOC_DMA (1 << 3)
80 #define SVGA_FENCE_FLAG_EXEC (1 << 0)
81 #define SVGA_FENCE_FLAG_QUERY (1 << 1)
83 #define SVGA_SURFACE_USAGE_SHARED (1 << 0)
84 #define SVGA_SURFACE_USAGE_SCANOUT (1 << 1)
86 #define SVGA_QUERY_FLAG_SET (1 << 0)
87 #define SVGA_QUERY_FLAG_REF (1 << 1)
89 #define SVGA_HINT_FLAG_CAN_PRE_FLUSH (1 << 0) /* Can preemptively flush */
92 * SVGA mks statistics info
94 struct svga_winsys_stats_timeframe
{
97 uint64 adjustedStartTime
;
98 struct svga_winsys_stats_timeframe
*enclosing
;
101 enum svga_stats_count
{
102 SVGA_STATS_COUNT_BLENDSTATE
,
103 SVGA_STATS_COUNT_BLITBLITTERCOPY
,
104 SVGA_STATS_COUNT_DEPTHSTENCILSTATE
,
105 SVGA_STATS_COUNT_RASTERIZERSTATE
,
106 SVGA_STATS_COUNT_SAMPLER
,
107 SVGA_STATS_COUNT_SAMPLERVIEW
,
108 SVGA_STATS_COUNT_SURFACEWRITEFLUSH
,
109 SVGA_STATS_COUNT_TEXREADBACK
,
110 SVGA_STATS_COUNT_VERTEXELEMENT
,
114 enum svga_stats_time
{
115 SVGA_STATS_TIME_BLIT
,
116 SVGA_STATS_TIME_BLITBLITTER
,
117 SVGA_STATS_TIME_BLITFALLBACK
,
118 SVGA_STATS_TIME_BUFFERSFLUSH
,
119 SVGA_STATS_TIME_BUFFERTRANSFERMAP
,
120 SVGA_STATS_TIME_BUFFERTRANSFERUNMAP
,
121 SVGA_STATS_TIME_CONTEXTFINISH
,
122 SVGA_STATS_TIME_CONTEXTFLUSH
,
123 SVGA_STATS_TIME_COPYREGION
,
124 SVGA_STATS_TIME_COPYREGIONFALLBACK
,
125 SVGA_STATS_TIME_CREATEBACKEDSURFACEVIEW
,
126 SVGA_STATS_TIME_CREATEBUFFER
,
127 SVGA_STATS_TIME_CREATECONTEXT
,
128 SVGA_STATS_TIME_CREATEFS
,
129 SVGA_STATS_TIME_CREATEGS
,
130 SVGA_STATS_TIME_CREATESURFACE
,
131 SVGA_STATS_TIME_CREATESURFACEVIEW
,
132 SVGA_STATS_TIME_CREATETEXTURE
,
133 SVGA_STATS_TIME_CREATEVS
,
134 SVGA_STATS_TIME_DEFINESHADER
,
135 SVGA_STATS_TIME_DESTROYSURFACE
,
136 SVGA_STATS_TIME_DRAWVBO
,
137 SVGA_STATS_TIME_DRAWARRAYS
,
138 SVGA_STATS_TIME_DRAWELEMENTS
,
139 SVGA_STATS_TIME_EMITFS
,
140 SVGA_STATS_TIME_EMITGS
,
141 SVGA_STATS_TIME_EMITVS
,
142 SVGA_STATS_TIME_EMULATESURFACEVIEW
,
143 SVGA_STATS_TIME_FENCEFINISH
,
144 SVGA_STATS_TIME_GENERATEINDICES
,
145 SVGA_STATS_TIME_HWTNLDRAWARRAYS
,
146 SVGA_STATS_TIME_HWTNLDRAWELEMENTS
,
147 SVGA_STATS_TIME_HWTNLFLUSH
,
148 SVGA_STATS_TIME_HWTNLPRIM
,
149 SVGA_STATS_TIME_PROPAGATESURFACE
,
150 SVGA_STATS_TIME_SETSAMPLERVIEWS
,
151 SVGA_STATS_TIME_SURFACEFLUSH
,
152 SVGA_STATS_TIME_SWTNLDRAWVBO
,
153 SVGA_STATS_TIME_SWTNLUPDATEDRAW
,
154 SVGA_STATS_TIME_SWTNLUPDATEVDECL
,
155 SVGA_STATS_TIME_TEXTRANSFERMAP
,
156 SVGA_STATS_TIME_TEXTRANSFERUNMAP
,
157 SVGA_STATS_TIME_TGSIVGPU10TRANSLATE
,
158 SVGA_STATS_TIME_TGSIVGPU9TRANSLATE
,
159 SVGA_STATS_TIME_UPDATESTATE
,
160 SVGA_STATS_TIME_VALIDATESURFACEVIEW
,
161 SVGA_STATS_TIME_VBUFDRAWARRAYS
,
162 SVGA_STATS_TIME_VBUFDRAWELEMENTS
,
163 SVGA_STATS_TIME_VBUFRENDERALLOCVERT
,
164 SVGA_STATS_TIME_VBUFRENDERMAPVERT
,
165 SVGA_STATS_TIME_VBUFRENDERUNMAPVERT
,
166 SVGA_STATS_TIME_VBUFSUBMITSTATE
,
170 #define SVGA_STATS_PREFIX "GuestGL_"
172 #define SVGA_STATS_COUNT_NAMES \
173 SVGA_STATS_PREFIX "BlendState", \
174 SVGA_STATS_PREFIX "BlitBlitterCopy", \
175 SVGA_STATS_PREFIX "DepthStencilState", \
176 SVGA_STATS_PREFIX "RasterizerState", \
177 SVGA_STATS_PREFIX "Sampler", \
178 SVGA_STATS_PREFIX "SamplerView", \
179 SVGA_STATS_PREFIX "SurfaceWriteFlush", \
180 SVGA_STATS_PREFIX "TextureReadback", \
181 SVGA_STATS_PREFIX "VertexElement" \
183 #define SVGA_STATS_TIME_NAMES \
184 SVGA_STATS_PREFIX "Blit", \
185 SVGA_STATS_PREFIX "BlitBlitter", \
186 SVGA_STATS_PREFIX "BlitFallback", \
187 SVGA_STATS_PREFIX "BuffersFlush", \
188 SVGA_STATS_PREFIX "BufferTransferMap", \
189 SVGA_STATS_PREFIX "BufferTransferUnmap", \
190 SVGA_STATS_PREFIX "ContextFinish", \
191 SVGA_STATS_PREFIX "ContextFlush", \
192 SVGA_STATS_PREFIX "CopyRegion", \
193 SVGA_STATS_PREFIX "CopyRegionFallback", \
194 SVGA_STATS_PREFIX "CreateBackedSurfaceView", \
195 SVGA_STATS_PREFIX "CreateBuffer", \
196 SVGA_STATS_PREFIX "CreateContext", \
197 SVGA_STATS_PREFIX "CreateFS", \
198 SVGA_STATS_PREFIX "CreateGS", \
199 SVGA_STATS_PREFIX "CreateSurface", \
200 SVGA_STATS_PREFIX "CreateSurfaceView", \
201 SVGA_STATS_PREFIX "CreateTexture", \
202 SVGA_STATS_PREFIX "CreateVS", \
203 SVGA_STATS_PREFIX "DefineShader", \
204 SVGA_STATS_PREFIX "DestroySurface", \
205 SVGA_STATS_PREFIX "DrawVBO", \
206 SVGA_STATS_PREFIX "DrawArrays", \
207 SVGA_STATS_PREFIX "DrawElements", \
208 SVGA_STATS_PREFIX "EmitFS", \
209 SVGA_STATS_PREFIX "EmitGS", \
210 SVGA_STATS_PREFIX "EmitVS", \
211 SVGA_STATS_PREFIX "EmulateSurfaceView", \
212 SVGA_STATS_PREFIX "FenceFinish", \
213 SVGA_STATS_PREFIX "GenerateIndices", \
214 SVGA_STATS_PREFIX "HWtnlDrawArrays", \
215 SVGA_STATS_PREFIX "HWtnlDrawElements", \
216 SVGA_STATS_PREFIX "HWtnlFlush", \
217 SVGA_STATS_PREFIX "HWtnlPrim", \
218 SVGA_STATS_PREFIX "PropagateSurface", \
219 SVGA_STATS_PREFIX "SetSamplerViews", \
220 SVGA_STATS_PREFIX "SurfaceFlush", \
221 SVGA_STATS_PREFIX "SwtnlDrawVBO", \
222 SVGA_STATS_PREFIX "SwtnlUpdateDraw", \
223 SVGA_STATS_PREFIX "SwtnlUpdateVDecl", \
224 SVGA_STATS_PREFIX "TextureTransferMap", \
225 SVGA_STATS_PREFIX "TextureTransferUnmap", \
226 SVGA_STATS_PREFIX "TGSIVGPU10Translate", \
227 SVGA_STATS_PREFIX "TGSIVGPU9Translate", \
228 SVGA_STATS_PREFIX "UpdateState", \
229 SVGA_STATS_PREFIX "ValidateSurfaceView", \
230 SVGA_STATS_PREFIX "VbufDrawArrays", \
231 SVGA_STATS_PREFIX "VbufDrawElements", \
232 SVGA_STATS_PREFIX "VbufRenderAllocVertices", \
233 SVGA_STATS_PREFIX "VbufRenderMapVertices", \
234 SVGA_STATS_PREFIX "VbufRenderUnmapVertices", \
235 SVGA_STATS_PREFIX "VbufSubmitState"
238 /** Opaque surface handle */
239 struct svga_winsys_surface
;
241 /** Opaque guest-backed objects */
242 struct svga_winsys_gb_shader
;
243 struct svga_winsys_gb_query
;
247 * SVGA per-context winsys interface.
249 struct svga_winsys_context
252 (*destroy
)(struct svga_winsys_context
*swc
);
255 (*reserve
)(struct svga_winsys_context
*swc
,
256 uint32_t nr_bytes
, uint32_t nr_relocs
);
259 * Returns current size of command buffer, in bytes.
262 (*get_command_buffer_size
)(struct svga_winsys_context
*swc
);
265 * Emit a relocation for a host surface.
267 * @param flags bitmask of SVGA_RELOC_* flags
269 * NOTE: Order of this call does matter. It should be the same order
270 * as relocations appear in the command buffer.
273 (*surface_relocation
)(struct svga_winsys_context
*swc
,
276 struct svga_winsys_surface
*surface
,
280 * Emit a relocation for a guest memory region.
282 * @param flags bitmask of SVGA_RELOC_* flags
284 * NOTE: Order of this call does matter. It should be the same order
285 * as relocations appear in the command buffer.
288 (*region_relocation
)(struct svga_winsys_context
*swc
,
289 struct SVGAGuestPtr
*ptr
,
290 struct svga_winsys_buffer
*buffer
,
295 * Emit a relocation for a guest-backed shader object.
297 * NOTE: Order of this call does matter. It should be the same order
298 * as relocations appear in the command buffer.
301 (*shader_relocation
)(struct svga_winsys_context
*swc
,
305 struct svga_winsys_gb_shader
*shader
,
309 * Emit a relocation for a guest-backed context.
311 * NOTE: Order of this call does matter. It should be the same order
312 * as relocations appear in the command buffer.
315 (*context_relocation
)(struct svga_winsys_context
*swc
, uint32
*cid
);
318 * Emit a relocation for a guest Memory OBject.
320 * @param flags bitmask of SVGA_RELOC_* flags
321 * @param offset_into_mob Buffer starts at this offset into the MOB.
323 * Note that not all commands accept an offset into the MOB and
324 * those commands can't use suballocated buffer pools. To trap
325 * errors from improper buffer pool usage, set the offset_into_mob
329 (*mob_relocation
)(struct svga_winsys_context
*swc
,
331 uint32
*offset_into_mob
,
332 struct svga_winsys_buffer
*buffer
,
337 * Emit a relocation for a guest-backed query object.
339 * NOTE: Order of this call does matter. It should be the same order
340 * as relocations appear in the command buffer.
343 (*query_relocation
)(struct svga_winsys_context
*swc
,
345 struct svga_winsys_gb_query
*query
);
348 * Bind queries to context.
349 * \param flags exactly one of SVGA_QUERY_FLAG_SET/REF
352 (*query_bind
)(struct svga_winsys_context
*sws
,
353 struct svga_winsys_gb_query
*query
,
357 (*commit
)(struct svga_winsys_context
*swc
);
360 (*flush
)(struct svga_winsys_context
*swc
,
361 struct pipe_fence_handle
**pfence
);
364 * Context ID used to fill in the commands
366 * Context IDs are arbitrary small non-negative integers,
367 * global to the entire SVGA device.
372 * Flags to hint the current context state
377 ** BEGIN new functions for guest-backed surfaces.
380 boolean have_gb_objects
;
383 * Map a guest-backed surface.
384 * \param flags bitmaks of PIPE_TRANSFER_x flags
386 * The surface_map() member is allowed to fail due to a
387 * shortage of command buffer space, if the
388 * PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE bit is set in flags.
389 * In that case, the caller must flush the current command
390 * buffer and reissue the map.
393 (*surface_map
)(struct svga_winsys_context
*swc
,
394 struct svga_winsys_surface
*surface
,
395 unsigned flags
, boolean
*retry
);
398 * Unmap a guest-backed surface.
399 * \param rebind returns a flag indicating whether the caller should
400 * issue a SVGA3D_BindGBSurface() call.
403 (*surface_unmap
)(struct svga_winsys_context
*swc
,
404 struct svga_winsys_surface
*surface
,
408 * Invalidate the content of this surface
411 (*surface_invalidate
)(struct svga_winsys_context
*swc
,
412 struct svga_winsys_surface
*surface
);
415 * Create and define a DX GB shader that resides in the device COTable.
416 * Caller of this function will issue the DXDefineShader command.
418 struct svga_winsys_gb_shader
*
419 (*shader_create
)(struct svga_winsys_context
*swc
,
421 SVGA3dShaderType shaderType
,
422 const uint32
*bytecode
,
426 * Destroy a DX GB shader.
427 * This function will issue the DXDestroyShader command.
430 (*shader_destroy
)(struct svga_winsys_context
*swc
,
431 struct svga_winsys_gb_shader
*shader
);
434 * Rebind a DX GB resource to a context.
435 * This is called to reference a DX GB resource in the command stream in
436 * order to page in the associated resource in case the memory has been
437 * paged out, and to fence it if necessary after command submission.
440 (*resource_rebind
)(struct svga_winsys_context
*swc
,
441 struct svga_winsys_surface
*surface
,
442 struct svga_winsys_gb_shader
*shader
,
445 /** To report perf/conformance/etc issues to the state tracker */
446 struct pipe_debug_callback
*debug_callback
;
448 /** The more recent command issued to command buffer */
449 SVGAFifo3dCmdId last_command
;
454 * SVGA per-screen winsys interface.
456 struct svga_winsys_screen
459 (*destroy
)(struct svga_winsys_screen
*sws
);
461 SVGA3dHardwareVersion
462 (*get_hw_version
)(struct svga_winsys_screen
*sws
);
465 (*get_cap
)(struct svga_winsys_screen
*sws
,
466 SVGA3dDevCapIndex index
,
467 SVGA3dDevCapResult
*result
);
470 * Create a new context.
472 * Context objects encapsulate all render state, and shader
473 * objects are per-context.
475 * Surfaces are not per-context. The same surface can be shared
476 * between multiple contexts, and surface operations can occur
479 struct svga_winsys_context
*
480 (*context_create
)(struct svga_winsys_screen
*sws
);
484 * This creates a "surface" object in the SVGA3D device.
486 * \param sws Pointer to an svga_winsys_context
487 * \param flags Device surface create flags
488 * \param format Format Device surface format
489 * \param usage Winsys usage: bitmask of SVGA_SURFACE_USAGE_x flags
490 * \param size Surface size given in device format
491 * \param numLayers Number of layers of the surface (or cube faces)
492 * \param numMipLevels Number of mipmap levels for each face
494 * Returns the surface ID (sid). Surfaces are generic
495 * containers for host VRAM objects like textures, vertex
496 * buffers, and depth/stencil buffers.
498 * Surfaces are hierarchial:
500 * - Surface may have multiple faces (for cube maps)
502 * - Each face has a list of mipmap levels
504 * - Each mipmap image may have multiple volume
505 * slices for 3D image, or multiple 2D slices for texture array.
507 * - Each slice is a 2D array of 'blocks'
509 * - Each block may be one or more pixels.
510 * (Usually 1, more for DXT or YUV formats.)
512 * Surfaces are generic host VRAM objects. The SVGA3D device
513 * may optimize surfaces according to the format they were
514 * created with, but this format does not limit the ways in
515 * which the surface may be used. For example, a depth surface
516 * can be used as a texture, or a floating point image may
517 * be used as a vertex buffer. Some surface usages may be
518 * lower performance, due to software emulation, but any
519 * usage should work with any surface.
521 struct svga_winsys_surface
*
522 (*surface_create
)(struct svga_winsys_screen
*sws
,
523 SVGA3dSurfaceFlags flags
,
524 SVGA3dSurfaceFormat format
,
529 unsigned sampleCount
);
532 * Creates a surface from a winsys handle.
533 * Used to implement pipe_screen::resource_from_handle.
535 struct svga_winsys_surface
*
536 (*surface_from_handle
)(struct svga_winsys_screen
*sws
,
537 struct winsys_handle
*whandle
,
538 SVGA3dSurfaceFormat
*format
);
541 * Get a winsys_handle from a surface.
542 * Used to implement pipe_screen::resource_get_handle.
545 (*surface_get_handle
)(struct svga_winsys_screen
*sws
,
546 struct svga_winsys_surface
*surface
,
548 struct winsys_handle
*whandle
);
551 * Whether this surface is sitting in a validate list
554 (*surface_is_flushed
)(struct svga_winsys_screen
*sws
,
555 struct svga_winsys_surface
*surface
);
558 * Reference a SVGA3D surface object. This allows sharing of a
559 * surface between different objects.
562 (*surface_reference
)(struct svga_winsys_screen
*sws
,
563 struct svga_winsys_surface
**pdst
,
564 struct svga_winsys_surface
*src
);
567 * Check if a resource (texture, buffer) of the given size
568 * and format can be created.
569 * \Return TRUE if OK, FALSE if too large.
572 (*surface_can_create
)(struct svga_winsys_screen
*sws
,
573 SVGA3dSurfaceFormat format
,
576 uint32 numMipLevels
);
579 * Buffer management. Buffer attributes are mostly fixed over its lifetime.
581 * @param usage bitmask of SVGA_BUFFER_USAGE_* flags.
583 * alignment indicates the client's alignment requirements, eg for
586 struct svga_winsys_buffer
*
587 (*buffer_create
)( struct svga_winsys_screen
*sws
,
593 * Map the entire data store of a buffer object into the client's address.
594 * usage is a bitmask of PIPE_TRANSFER_*
597 (*buffer_map
)( struct svga_winsys_screen
*sws
,
598 struct svga_winsys_buffer
*buf
,
602 (*buffer_unmap
)( struct svga_winsys_screen
*sws
,
603 struct svga_winsys_buffer
*buf
);
606 (*buffer_destroy
)( struct svga_winsys_screen
*sws
,
607 struct svga_winsys_buffer
*buf
);
611 * Reference a fence object.
614 (*fence_reference
)( struct svga_winsys_screen
*sws
,
615 struct pipe_fence_handle
**pdst
,
616 struct pipe_fence_handle
*src
);
619 * Checks whether the fence has been signalled.
620 * \param flags driver-specific meaning
621 * \return zero on success.
623 int (*fence_signalled
)( struct svga_winsys_screen
*sws
,
624 struct pipe_fence_handle
*fence
,
628 * Wait for the fence to finish.
629 * \param flags driver-specific meaning
630 * \return zero on success.
632 int (*fence_finish
)( struct svga_winsys_screen
*sws
,
633 struct pipe_fence_handle
*fence
,
638 ** BEGIN new functions for guest-backed surfaces.
641 /** Are guest-backed objects enabled? */
642 bool have_gb_objects
;
644 /** Can we do DMA with guest-backed objects enabled? */
648 * Create and define a GB shader.
650 struct svga_winsys_gb_shader
*
651 (*shader_create
)(struct svga_winsys_screen
*sws
,
652 SVGA3dShaderType shaderType
,
653 const uint32
*bytecode
,
657 * Destroy a GB shader. It's safe to call this function even
658 * if the shader is referenced in a context's command stream.
661 (*shader_destroy
)(struct svga_winsys_screen
*sws
,
662 struct svga_winsys_gb_shader
*shader
);
665 * Create and define a GB query.
667 struct svga_winsys_gb_query
*
668 (*query_create
)(struct svga_winsys_screen
*sws
, uint32 len
);
671 * Destroy a GB query.
674 (*query_destroy
)(struct svga_winsys_screen
*sws
,
675 struct svga_winsys_gb_query
*query
);
678 * Initialize the query state of the query that resides in the slot
679 * specified in offset
680 * \return zero on success.
683 (*query_init
)(struct svga_winsys_screen
*sws
,
684 struct svga_winsys_gb_query
*query
,
686 SVGA3dQueryState queryState
);
689 * Inquire for the query state and result of the query that resides
690 * in the slot specified in offset
693 (*query_get_result
)(struct svga_winsys_screen
*sws
,
694 struct svga_winsys_gb_query
*query
,
696 SVGA3dQueryState
*queryState
,
697 void *result
, uint32 resultLen
);
700 * Increment a statistic counter
703 (*stats_inc
)(enum svga_stats_count
);
706 * Push a time frame onto the stack
709 (*stats_time_push
)(enum svga_stats_time
, struct svga_winsys_stats_timeframe
*);
718 /** Have VGPU v10 hardware? */
721 /** To rebind resources at the beginnning of a new command buffer */
722 boolean need_to_rebind_resources
;
724 boolean have_generate_mipmap_cmd
;
725 boolean have_set_predication_cmd
;
726 boolean have_transfer_from_buffer_cmd
;
730 struct svga_winsys_screen
*
731 svga_winsys_screen(struct pipe_screen
*screen
);
733 struct svga_winsys_context
*
734 svga_winsys_context(struct pipe_context
*context
);
736 struct pipe_resource
*
737 svga_screen_buffer_wrap_surface(struct pipe_screen
*screen
,
738 enum SVGA3dSurfaceFormat format
,
739 struct svga_winsys_surface
*srf
);
741 struct svga_winsys_surface
*
742 svga_screen_buffer_get_winsys_surface(struct pipe_resource
*buffer
);
744 #endif /* SVGA_WINSYS_H_ */