1bf215546Sopenharmony_ci/**********************************************************
2bf215546Sopenharmony_ci * Copyright 2008-2009 VMware, Inc.  All rights reserved.
3bf215546Sopenharmony_ci *
4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person
5bf215546Sopenharmony_ci * obtaining a copy of this software and associated documentation
6bf215546Sopenharmony_ci * files (the "Software"), to deal in the Software without
7bf215546Sopenharmony_ci * restriction, including without limitation the rights to use, copy,
8bf215546Sopenharmony_ci * modify, merge, publish, distribute, sublicense, and/or sell copies
9bf215546Sopenharmony_ci * of the Software, and to permit persons to whom the Software is
10bf215546Sopenharmony_ci * furnished to do so, subject to the following conditions:
11bf215546Sopenharmony_ci *
12bf215546Sopenharmony_ci * The above copyright notice and this permission notice shall be
13bf215546Sopenharmony_ci * included in all copies or substantial portions of the Software.
14bf215546Sopenharmony_ci *
15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16bf215546Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17bf215546Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18bf215546Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19bf215546Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20bf215546Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21bf215546Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22bf215546Sopenharmony_ci * SOFTWARE.
23bf215546Sopenharmony_ci *
24bf215546Sopenharmony_ci **********************************************************/
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_ci/*
27bf215546Sopenharmony_ci * svga_cmd.h --
28bf215546Sopenharmony_ci *
29bf215546Sopenharmony_ci *      Command construction utility for the SVGA3D protocol used by
30bf215546Sopenharmony_ci *      the VMware SVGA device, based on the svgautil library.
31bf215546Sopenharmony_ci */
32bf215546Sopenharmony_ci
33bf215546Sopenharmony_ci#ifndef __SVGA3D_H__
34bf215546Sopenharmony_ci#define __SVGA3D_H__
35bf215546Sopenharmony_ci
36bf215546Sopenharmony_ci
37bf215546Sopenharmony_ci#include "svga_types.h"
38bf215546Sopenharmony_ci#include "svga_winsys.h"
39bf215546Sopenharmony_ci#include "svga_reg.h"
40bf215546Sopenharmony_ci#include "svga3d_reg.h"
41bf215546Sopenharmony_ci
42bf215546Sopenharmony_ci#include "pipe/p_defines.h"
43bf215546Sopenharmony_ci
44bf215546Sopenharmony_ci
45bf215546Sopenharmony_cistruct pipe_surface;
46bf215546Sopenharmony_cistruct svga_transfer;
47bf215546Sopenharmony_cistruct svga_winsys_context;
48bf215546Sopenharmony_cistruct svga_winsys_buffer;
49bf215546Sopenharmony_cistruct svga_winsys_surface;
50bf215546Sopenharmony_cistruct svga_winsys_gb_shader;
51bf215546Sopenharmony_cistruct svga_winsys_gb_query;
52bf215546Sopenharmony_ci
53bf215546Sopenharmony_ci
54bf215546Sopenharmony_ci/*
55bf215546Sopenharmony_ci * SVGA Device Interoperability
56bf215546Sopenharmony_ci */
57bf215546Sopenharmony_ci
58bf215546Sopenharmony_civoid *
59bf215546Sopenharmony_ciSVGA3D_FIFOReserve(struct svga_winsys_context *swc, uint32 cmd, uint32 cmdSize, uint32 nr_relocs);
60bf215546Sopenharmony_ci
61bf215546Sopenharmony_civoid
62bf215546Sopenharmony_ciSVGA_FIFOCommitAll(struct svga_winsys_context *swc);
63bf215546Sopenharmony_ci
64bf215546Sopenharmony_ci/**
65bf215546Sopenharmony_ci * Return the last command id put in the command buffer.
66bf215546Sopenharmony_ci */
67bf215546Sopenharmony_cistatic inline SVGAFifo3dCmdId
68bf215546Sopenharmony_ciSVGA3D_GetLastCommand(const struct svga_winsys_context *swc)
69bf215546Sopenharmony_ci{
70bf215546Sopenharmony_ci   return swc->last_command;
71bf215546Sopenharmony_ci}
72bf215546Sopenharmony_ci
73bf215546Sopenharmony_ci/**
74bf215546Sopenharmony_ci * Reset/clear the last command put in the command buffer.
75bf215546Sopenharmony_ci * To be called when buffer is flushed.
76bf215546Sopenharmony_ci */
77bf215546Sopenharmony_cistatic inline void
78bf215546Sopenharmony_ciSVGA3D_ResetLastCommand(struct svga_winsys_context *swc)
79bf215546Sopenharmony_ci{
80bf215546Sopenharmony_ci   swc->last_command = 0;
81bf215546Sopenharmony_ci}
82bf215546Sopenharmony_ci
83bf215546Sopenharmony_ci
84bf215546Sopenharmony_ci/*
85bf215546Sopenharmony_ci * Context Management
86bf215546Sopenharmony_ci */
87bf215546Sopenharmony_ci
88bf215546Sopenharmony_cienum pipe_error
89bf215546Sopenharmony_ciSVGA3D_DefineContext(struct svga_winsys_context *swc);
90bf215546Sopenharmony_ci
91bf215546Sopenharmony_cienum pipe_error
92bf215546Sopenharmony_ciSVGA3D_DestroyContext(struct svga_winsys_context *swc);
93bf215546Sopenharmony_ci
94bf215546Sopenharmony_ci
95bf215546Sopenharmony_ci/*
96bf215546Sopenharmony_ci * Surface Management
97bf215546Sopenharmony_ci */
98bf215546Sopenharmony_ci
99bf215546Sopenharmony_cienum pipe_error
100bf215546Sopenharmony_ciSVGA3D_BeginDefineSurface(struct svga_winsys_context *swc,
101bf215546Sopenharmony_ci                          struct svga_winsys_surface *sid,
102bf215546Sopenharmony_ci                          SVGA3dSurface1Flags flags,
103bf215546Sopenharmony_ci                          SVGA3dSurfaceFormat format,
104bf215546Sopenharmony_ci                          SVGA3dSurfaceFace **faces,
105bf215546Sopenharmony_ci                          SVGA3dSize **mipSizes,
106bf215546Sopenharmony_ci                          uint32 numMipSizes);
107bf215546Sopenharmony_cienum pipe_error
108bf215546Sopenharmony_ciSVGA3D_DefineSurface2D(struct svga_winsys_context *swc,
109bf215546Sopenharmony_ci                       struct svga_winsys_surface *sid,
110bf215546Sopenharmony_ci                       uint32 width,
111bf215546Sopenharmony_ci                       uint32 height,
112bf215546Sopenharmony_ci                       SVGA3dSurfaceFormat format);
113bf215546Sopenharmony_cienum pipe_error
114bf215546Sopenharmony_ciSVGA3D_DestroySurface(struct svga_winsys_context *swc,
115bf215546Sopenharmony_ci                      struct svga_winsys_surface *sid);
116bf215546Sopenharmony_ci
117bf215546Sopenharmony_ci
118bf215546Sopenharmony_ci/*
119bf215546Sopenharmony_ci * Surface Operations
120bf215546Sopenharmony_ci */
121bf215546Sopenharmony_ci
122bf215546Sopenharmony_cienum pipe_error
123bf215546Sopenharmony_ciSVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
124bf215546Sopenharmony_ci                  struct svga_transfer *st,
125bf215546Sopenharmony_ci                  SVGA3dTransferType transfer,
126bf215546Sopenharmony_ci                  const SVGA3dCopyBox *boxes,
127bf215546Sopenharmony_ci                  uint32 numBoxes,
128bf215546Sopenharmony_ci                  SVGA3dSurfaceDMAFlags flags);
129bf215546Sopenharmony_ci
130bf215546Sopenharmony_cienum pipe_error
131bf215546Sopenharmony_ciSVGA3D_BufferDMA(struct svga_winsys_context *swc,
132bf215546Sopenharmony_ci                 struct svga_winsys_buffer *guest,
133bf215546Sopenharmony_ci                 struct svga_winsys_surface *host,
134bf215546Sopenharmony_ci                 SVGA3dTransferType transfer,
135bf215546Sopenharmony_ci                 uint32 size,
136bf215546Sopenharmony_ci                 uint32 guest_offset,
137bf215546Sopenharmony_ci                 uint32 host_offset,
138bf215546Sopenharmony_ci                 SVGA3dSurfaceDMAFlags flags);
139bf215546Sopenharmony_ci
140bf215546Sopenharmony_ci/*
141bf215546Sopenharmony_ci * Drawing Operations
142bf215546Sopenharmony_ci */
143bf215546Sopenharmony_ci
144bf215546Sopenharmony_ci
145bf215546Sopenharmony_cienum pipe_error
146bf215546Sopenharmony_ciSVGA3D_BeginClear(struct svga_winsys_context *swc,
147bf215546Sopenharmony_ci                  SVGA3dClearFlag flags,
148bf215546Sopenharmony_ci                  uint32 color, float depth, uint32 stencil,
149bf215546Sopenharmony_ci                  SVGA3dRect **rects, uint32 numRects);
150bf215546Sopenharmony_ci
151bf215546Sopenharmony_cienum pipe_error
152bf215546Sopenharmony_ciSVGA3D_ClearRect(struct svga_winsys_context *swc,
153bf215546Sopenharmony_ci                 SVGA3dClearFlag flags, uint32 color, float depth,
154bf215546Sopenharmony_ci                 uint32 stencil, uint32 x, uint32 y, uint32 w, uint32 h);
155bf215546Sopenharmony_ci
156bf215546Sopenharmony_cienum pipe_error
157bf215546Sopenharmony_ciSVGA3D_BeginDrawPrimitives(struct svga_winsys_context *swc,
158bf215546Sopenharmony_ci                           SVGA3dVertexDecl **decls,
159bf215546Sopenharmony_ci                           uint32 numVertexDecls,
160bf215546Sopenharmony_ci                           SVGA3dPrimitiveRange **ranges,
161bf215546Sopenharmony_ci                           uint32 numRanges);
162bf215546Sopenharmony_ci
163bf215546Sopenharmony_ci/*
164bf215546Sopenharmony_ci * Blits
165bf215546Sopenharmony_ci */
166bf215546Sopenharmony_ci
167bf215546Sopenharmony_cienum pipe_error
168bf215546Sopenharmony_ciSVGA3D_BeginSurfaceCopy(struct svga_winsys_context *swc,
169bf215546Sopenharmony_ci                        struct pipe_surface *src,
170bf215546Sopenharmony_ci                        struct pipe_surface *dest,
171bf215546Sopenharmony_ci                        SVGA3dCopyBox **boxes, uint32 numBoxes);
172bf215546Sopenharmony_ci
173bf215546Sopenharmony_ci
174bf215546Sopenharmony_cienum pipe_error
175bf215546Sopenharmony_ciSVGA3D_SurfaceStretchBlt(struct svga_winsys_context *swc,
176bf215546Sopenharmony_ci                         struct pipe_surface *src,
177bf215546Sopenharmony_ci                         struct pipe_surface *dest,
178bf215546Sopenharmony_ci                         SVGA3dBox *boxSrc, SVGA3dBox *boxDest,
179bf215546Sopenharmony_ci                         SVGA3dStretchBltMode mode);
180bf215546Sopenharmony_ci
181bf215546Sopenharmony_ci/*
182bf215546Sopenharmony_ci * Shared FFP/Shader Render State
183bf215546Sopenharmony_ci */
184bf215546Sopenharmony_ci
185bf215546Sopenharmony_cienum pipe_error
186bf215546Sopenharmony_ciSVGA3D_SetRenderTarget(struct svga_winsys_context *swc,
187bf215546Sopenharmony_ci                       SVGA3dRenderTargetType type,
188bf215546Sopenharmony_ci                       struct pipe_surface *surface);
189bf215546Sopenharmony_ci
190bf215546Sopenharmony_cienum pipe_error
191bf215546Sopenharmony_ciSVGA3D_SetZRange(struct svga_winsys_context *swc,
192bf215546Sopenharmony_ci                 float zMin, float zMax);
193bf215546Sopenharmony_ci
194bf215546Sopenharmony_cienum pipe_error
195bf215546Sopenharmony_ciSVGA3D_SetViewport(struct svga_winsys_context *swc,
196bf215546Sopenharmony_ci                   SVGA3dRect *rect);
197bf215546Sopenharmony_ci
198bf215546Sopenharmony_cienum pipe_error
199bf215546Sopenharmony_ciSVGA3D_SetScissorRect(struct svga_winsys_context *swc,
200bf215546Sopenharmony_ci                      SVGA3dRect *rect);
201bf215546Sopenharmony_ci
202bf215546Sopenharmony_cienum pipe_error
203bf215546Sopenharmony_ciSVGA3D_SetClipPlane(struct svga_winsys_context *swc,
204bf215546Sopenharmony_ci                    uint32 index, const float *plane);
205bf215546Sopenharmony_ci
206bf215546Sopenharmony_cienum pipe_error
207bf215546Sopenharmony_ciSVGA3D_BeginSetTextureState(struct svga_winsys_context *swc,
208bf215546Sopenharmony_ci                            SVGA3dTextureState **states,
209bf215546Sopenharmony_ci                            uint32 numStates);
210bf215546Sopenharmony_ci
211bf215546Sopenharmony_cienum pipe_error
212bf215546Sopenharmony_ciSVGA3D_BeginSetRenderState(struct svga_winsys_context *swc,
213bf215546Sopenharmony_ci                           SVGA3dRenderState **states,
214bf215546Sopenharmony_ci                           uint32 numStates);
215bf215546Sopenharmony_ci
216bf215546Sopenharmony_ci
217bf215546Sopenharmony_ci/*
218bf215546Sopenharmony_ci * Shaders
219bf215546Sopenharmony_ci */
220bf215546Sopenharmony_ci
221bf215546Sopenharmony_cienum pipe_error
222bf215546Sopenharmony_ciSVGA3D_DefineShader(struct svga_winsys_context *swc,
223bf215546Sopenharmony_ci                    uint32 shid, SVGA3dShaderType type,
224bf215546Sopenharmony_ci                    const uint32 *bytecode, uint32 bytecodeLen);
225bf215546Sopenharmony_ci
226bf215546Sopenharmony_cienum pipe_error
227bf215546Sopenharmony_ciSVGA3D_DestroyShader(struct svga_winsys_context *swc,
228bf215546Sopenharmony_ci                     uint32 shid, SVGA3dShaderType type);
229bf215546Sopenharmony_ci
230bf215546Sopenharmony_cienum pipe_error
231bf215546Sopenharmony_ciSVGA3D_SetShaderConst(struct svga_winsys_context *swc,
232bf215546Sopenharmony_ci                      uint32 reg, SVGA3dShaderType type,
233bf215546Sopenharmony_ci                      SVGA3dShaderConstType ctype, const void *value);
234bf215546Sopenharmony_ci
235bf215546Sopenharmony_cienum pipe_error
236bf215546Sopenharmony_ciSVGA3D_SetShaderConsts(struct svga_winsys_context *swc,
237bf215546Sopenharmony_ci                       uint32 reg,
238bf215546Sopenharmony_ci                       uint32 numRegs,
239bf215546Sopenharmony_ci                       SVGA3dShaderType type,
240bf215546Sopenharmony_ci                       SVGA3dShaderConstType ctype,
241bf215546Sopenharmony_ci                       const void *values);
242bf215546Sopenharmony_ci
243bf215546Sopenharmony_cienum pipe_error
244bf215546Sopenharmony_ciSVGA3D_SetShader(struct svga_winsys_context *swc,
245bf215546Sopenharmony_ci                 SVGA3dShaderType type, uint32 shid);
246bf215546Sopenharmony_ci
247bf215546Sopenharmony_ci
248bf215546Sopenharmony_ci/*
249bf215546Sopenharmony_ci * Guest-backed surface functions
250bf215546Sopenharmony_ci */
251bf215546Sopenharmony_ci
252bf215546Sopenharmony_cienum pipe_error
253bf215546Sopenharmony_ciSVGA3D_BindGBShader(struct svga_winsys_context *swc,
254bf215546Sopenharmony_ci                    struct svga_winsys_gb_shader *gbshader);
255bf215546Sopenharmony_ci
256bf215546Sopenharmony_cienum pipe_error
257bf215546Sopenharmony_ciSVGA3D_SetGBShader(struct svga_winsys_context *swc,
258bf215546Sopenharmony_ci                   SVGA3dShaderType type,
259bf215546Sopenharmony_ci                   struct svga_winsys_gb_shader *gbshader);
260bf215546Sopenharmony_ci
261bf215546Sopenharmony_cienum pipe_error
262bf215546Sopenharmony_ciSVGA3D_BindGBSurface(struct svga_winsys_context *swc,
263bf215546Sopenharmony_ci                     struct svga_winsys_surface *surface);
264bf215546Sopenharmony_ci
265bf215546Sopenharmony_cienum pipe_error
266bf215546Sopenharmony_ciSVGA3D_UpdateGBImage(struct svga_winsys_context *swc,
267bf215546Sopenharmony_ci                     struct svga_winsys_surface *surface,
268bf215546Sopenharmony_ci                     const SVGA3dBox *box,
269bf215546Sopenharmony_ci                     unsigned face, unsigned mipLevel);
270bf215546Sopenharmony_ci
271bf215546Sopenharmony_cienum pipe_error
272bf215546Sopenharmony_ciSVGA3D_UpdateGBSurface(struct svga_winsys_context *swc,
273bf215546Sopenharmony_ci                       struct svga_winsys_surface *surface);
274bf215546Sopenharmony_ci
275bf215546Sopenharmony_ci
276bf215546Sopenharmony_cienum pipe_error
277bf215546Sopenharmony_ciSVGA3D_ReadbackGBImage(struct svga_winsys_context *swc,
278bf215546Sopenharmony_ci                       struct svga_winsys_surface *surface,
279bf215546Sopenharmony_ci                       unsigned face, unsigned mipLevel);
280bf215546Sopenharmony_ci
281bf215546Sopenharmony_ci
282bf215546Sopenharmony_cienum pipe_error
283bf215546Sopenharmony_ciSVGA3D_ReadbackGBSurface(struct svga_winsys_context *swc,
284bf215546Sopenharmony_ci                         struct svga_winsys_surface *surface);
285bf215546Sopenharmony_ci
286bf215546Sopenharmony_ci
287bf215546Sopenharmony_cienum pipe_error
288bf215546Sopenharmony_ciSVGA3D_ReadbackGBImagePartial(struct svga_winsys_context *swc,
289bf215546Sopenharmony_ci                              struct svga_winsys_surface *surface,
290bf215546Sopenharmony_ci                              unsigned face, unsigned mipLevel,
291bf215546Sopenharmony_ci                              const SVGA3dBox *box,
292bf215546Sopenharmony_ci                              bool invertBox);
293bf215546Sopenharmony_ci
294bf215546Sopenharmony_ci
295bf215546Sopenharmony_cienum pipe_error
296bf215546Sopenharmony_ciSVGA3D_InvalidateGBImagePartial(struct svga_winsys_context *swc,
297bf215546Sopenharmony_ci                                struct svga_winsys_surface *surface,
298bf215546Sopenharmony_ci                                unsigned face, unsigned mipLevel,
299bf215546Sopenharmony_ci                                const SVGA3dBox *box,
300bf215546Sopenharmony_ci                                bool invertBox);
301bf215546Sopenharmony_ci
302bf215546Sopenharmony_cienum pipe_error
303bf215546Sopenharmony_ciSVGA3D_InvalidateGBSurface(struct svga_winsys_context *swc,
304bf215546Sopenharmony_ci                           struct svga_winsys_surface *surface);
305bf215546Sopenharmony_ci
306bf215546Sopenharmony_ci
307bf215546Sopenharmony_cienum pipe_error
308bf215546Sopenharmony_ciSVGA3D_SetGBShaderConstsInline(struct svga_winsys_context *swc,
309bf215546Sopenharmony_ci                               unsigned regStart,
310bf215546Sopenharmony_ci                               unsigned numRegs,
311bf215546Sopenharmony_ci                               SVGA3dShaderType shaderType,
312bf215546Sopenharmony_ci                               SVGA3dShaderConstType constType,
313bf215546Sopenharmony_ci                               const void *values);
314bf215546Sopenharmony_ci
315bf215546Sopenharmony_ci/*
316bf215546Sopenharmony_ci * Queries
317bf215546Sopenharmony_ci */
318bf215546Sopenharmony_ci
319bf215546Sopenharmony_cienum pipe_error
320bf215546Sopenharmony_ciSVGA3D_BeginQuery(struct svga_winsys_context *swc,
321bf215546Sopenharmony_ci                  SVGA3dQueryType type);
322bf215546Sopenharmony_ci
323bf215546Sopenharmony_cienum pipe_error
324bf215546Sopenharmony_ciSVGA3D_EndQuery(struct svga_winsys_context *swc,
325bf215546Sopenharmony_ci                SVGA3dQueryType type,
326bf215546Sopenharmony_ci                struct svga_winsys_buffer *buffer);
327bf215546Sopenharmony_ci
328bf215546Sopenharmony_cienum pipe_error
329bf215546Sopenharmony_ciSVGA3D_WaitForQuery(struct svga_winsys_context *swc,
330bf215546Sopenharmony_ci                    SVGA3dQueryType type,
331bf215546Sopenharmony_ci                    struct svga_winsys_buffer *buffer);
332bf215546Sopenharmony_ci
333bf215546Sopenharmony_ci
334bf215546Sopenharmony_ci
335bf215546Sopenharmony_ci/*
336bf215546Sopenharmony_ci * VGPU10 commands
337bf215546Sopenharmony_ci */
338bf215546Sopenharmony_ci
339bf215546Sopenharmony_cienum pipe_error
340bf215546Sopenharmony_ciSVGA3D_vgpu10_PredCopyRegion(struct svga_winsys_context *swc,
341bf215546Sopenharmony_ci                             struct svga_winsys_surface *dstSurf,
342bf215546Sopenharmony_ci                             uint32 dstSubResource,
343bf215546Sopenharmony_ci                             struct svga_winsys_surface *srcSurf,
344bf215546Sopenharmony_ci                             uint32 srcSubResource,
345bf215546Sopenharmony_ci                             const SVGA3dCopyBox *box);
346bf215546Sopenharmony_ci
347bf215546Sopenharmony_cienum pipe_error
348bf215546Sopenharmony_ciSVGA3D_vgpu10_PredCopy(struct svga_winsys_context *swc,
349bf215546Sopenharmony_ci                       struct svga_winsys_surface *dstSurf,
350bf215546Sopenharmony_ci                       struct svga_winsys_surface *srcSurf);
351bf215546Sopenharmony_ci
352bf215546Sopenharmony_cienum pipe_error
353bf215546Sopenharmony_ciSVGA3D_vgpu10_SetViewports(struct svga_winsys_context *swc,
354bf215546Sopenharmony_ci                           unsigned count, const SVGA3dViewport *viewports);
355bf215546Sopenharmony_ci
356bf215546Sopenharmony_cienum pipe_error
357bf215546Sopenharmony_ciSVGA3D_vgpu10_SetShader(struct svga_winsys_context *swc,
358bf215546Sopenharmony_ci                        SVGA3dShaderType type,
359bf215546Sopenharmony_ci                        struct svga_winsys_gb_shader *gbshader,
360bf215546Sopenharmony_ci                        SVGA3dShaderId shaderId);
361bf215546Sopenharmony_ci
362bf215546Sopenharmony_cienum pipe_error
363bf215546Sopenharmony_ciSVGA3D_vgpu10_SetShaderResources(struct svga_winsys_context *swc,
364bf215546Sopenharmony_ci                                 SVGA3dShaderType type,
365bf215546Sopenharmony_ci                                 uint32 startView,
366bf215546Sopenharmony_ci                                 unsigned count,
367bf215546Sopenharmony_ci                                 const SVGA3dShaderResourceViewId ids[],
368bf215546Sopenharmony_ci                                 struct svga_winsys_surface **views);
369bf215546Sopenharmony_ci
370bf215546Sopenharmony_cienum pipe_error
371bf215546Sopenharmony_ciSVGA3D_vgpu10_SetSamplers(struct svga_winsys_context *swc,
372bf215546Sopenharmony_ci                          unsigned count,
373bf215546Sopenharmony_ci                          uint32 startSampler,
374bf215546Sopenharmony_ci                          SVGA3dShaderType type,
375bf215546Sopenharmony_ci                          const SVGA3dSamplerId *samplerIds);
376bf215546Sopenharmony_ci
377bf215546Sopenharmony_cienum pipe_error
378bf215546Sopenharmony_ciSVGA3D_vgpu10_SetRenderTargets(struct svga_winsys_context *swc,
379bf215546Sopenharmony_ci                               unsigned color_count,
380bf215546Sopenharmony_ci                               struct pipe_surface **color_surfs,
381bf215546Sopenharmony_ci                               struct pipe_surface *depth_stencil_surf);
382bf215546Sopenharmony_ci
383bf215546Sopenharmony_cienum pipe_error
384bf215546Sopenharmony_ciSVGA3D_vgpu10_SetBlendState(struct svga_winsys_context *swc,
385bf215546Sopenharmony_ci                            SVGA3dBlendStateId blendId,
386bf215546Sopenharmony_ci                            const float *blendFactor, uint32 sampleMask);
387bf215546Sopenharmony_ci
388bf215546Sopenharmony_cienum pipe_error
389bf215546Sopenharmony_ciSVGA3D_vgpu10_SetDepthStencilState(struct svga_winsys_context *swc,
390bf215546Sopenharmony_ci                                   SVGA3dDepthStencilStateId depthStencilId,
391bf215546Sopenharmony_ci                                   uint32 stencilRef);
392bf215546Sopenharmony_ci
393bf215546Sopenharmony_cienum pipe_error
394bf215546Sopenharmony_ciSVGA3D_vgpu10_SetRasterizerState(struct svga_winsys_context *swc,
395bf215546Sopenharmony_ci                                 SVGA3dRasterizerStateId rasterizerId);
396bf215546Sopenharmony_ci
397bf215546Sopenharmony_cienum pipe_error
398bf215546Sopenharmony_ciSVGA3D_vgpu10_SetPredication(struct svga_winsys_context *swc,
399bf215546Sopenharmony_ci                             SVGA3dQueryId queryId,
400bf215546Sopenharmony_ci                             uint32 predicateValue);
401bf215546Sopenharmony_ci
402bf215546Sopenharmony_cienum pipe_error
403bf215546Sopenharmony_ciSVGA3D_vgpu10_SetSOTargets(struct svga_winsys_context *swc,
404bf215546Sopenharmony_ci                           unsigned count, const SVGA3dSoTarget *targets,
405bf215546Sopenharmony_ci                           struct svga_winsys_surface **surfaces);
406bf215546Sopenharmony_ci
407bf215546Sopenharmony_cienum pipe_error
408bf215546Sopenharmony_ciSVGA3D_vgpu10_SetScissorRects(struct svga_winsys_context *swc,
409bf215546Sopenharmony_ci                              unsigned count,
410bf215546Sopenharmony_ci                              const SVGASignedRect *rects);
411bf215546Sopenharmony_ci
412bf215546Sopenharmony_cienum pipe_error
413bf215546Sopenharmony_ciSVGA3D_vgpu10_SetStreamOutput(struct svga_winsys_context *swc,
414bf215546Sopenharmony_ci                              SVGA3dStreamOutputId soid);
415bf215546Sopenharmony_ci
416bf215546Sopenharmony_cienum pipe_error
417bf215546Sopenharmony_ciSVGA3D_vgpu10_Draw(struct svga_winsys_context *swc,
418bf215546Sopenharmony_ci                   uint32 vertexCount, uint32 startVertexLocation);
419bf215546Sopenharmony_ci
420bf215546Sopenharmony_cienum pipe_error
421bf215546Sopenharmony_ciSVGA3D_vgpu10_DrawIndexed(struct svga_winsys_context *swc,
422bf215546Sopenharmony_ci                          uint32 indexCount, uint32 startIndexLocation,
423bf215546Sopenharmony_ci                          int32 baseVertexLocation);
424bf215546Sopenharmony_ci
425bf215546Sopenharmony_cienum pipe_error
426bf215546Sopenharmony_ciSVGA3D_vgpu10_DrawInstanced(struct svga_winsys_context *swc,
427bf215546Sopenharmony_ci                            uint32 vertexCountPerInstance,
428bf215546Sopenharmony_ci                            uint32 instanceCount,
429bf215546Sopenharmony_ci                            uint32 startVertexLocation,
430bf215546Sopenharmony_ci                            uint32 startInstanceLocation);
431bf215546Sopenharmony_ci
432bf215546Sopenharmony_cienum pipe_error
433bf215546Sopenharmony_ciSVGA3D_vgpu10_DrawIndexedInstanced(struct svga_winsys_context *swc,
434bf215546Sopenharmony_ci                                   uint32 indexCountPerInstance,
435bf215546Sopenharmony_ci                                   uint32 instanceCount,
436bf215546Sopenharmony_ci                                   uint32 startIndexLocation,
437bf215546Sopenharmony_ci                                   int32  baseVertexLocation,
438bf215546Sopenharmony_ci                                   uint32 startInstanceLocation);
439bf215546Sopenharmony_ci
440bf215546Sopenharmony_cienum pipe_error
441bf215546Sopenharmony_ciSVGA3D_vgpu10_DrawAuto(struct svga_winsys_context *swc);
442bf215546Sopenharmony_ci
443bf215546Sopenharmony_cienum pipe_error
444bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineQuery(struct svga_winsys_context *swc,
445bf215546Sopenharmony_ci                          SVGA3dQueryId queryId,
446bf215546Sopenharmony_ci                          SVGA3dQueryType type,
447bf215546Sopenharmony_ci                          SVGA3dDXQueryFlags flags);
448bf215546Sopenharmony_ci
449bf215546Sopenharmony_cienum pipe_error
450bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyQuery(struct svga_winsys_context *swc,
451bf215546Sopenharmony_ci                           SVGA3dQueryId queryId);
452bf215546Sopenharmony_ci
453bf215546Sopenharmony_cienum pipe_error
454bf215546Sopenharmony_ciSVGA3D_vgpu10_BindQuery(struct svga_winsys_context *swc,
455bf215546Sopenharmony_ci                        struct svga_winsys_gb_query *gbQuery,
456bf215546Sopenharmony_ci                        SVGA3dQueryId queryId);
457bf215546Sopenharmony_ci
458bf215546Sopenharmony_cienum pipe_error
459bf215546Sopenharmony_ciSVGA3D_vgpu10_SetQueryOffset(struct svga_winsys_context *swc,
460bf215546Sopenharmony_ci                             SVGA3dQueryId queryId,
461bf215546Sopenharmony_ci                             uint32 mobOffset);
462bf215546Sopenharmony_ci
463bf215546Sopenharmony_cienum pipe_error
464bf215546Sopenharmony_ciSVGA3D_vgpu10_BeginQuery(struct svga_winsys_context *swc,
465bf215546Sopenharmony_ci                         SVGA3dQueryId queryId);
466bf215546Sopenharmony_ci
467bf215546Sopenharmony_cienum pipe_error
468bf215546Sopenharmony_ciSVGA3D_vgpu10_EndQuery(struct svga_winsys_context *swc,
469bf215546Sopenharmony_ci                       SVGA3dQueryId queryId);
470bf215546Sopenharmony_ci
471bf215546Sopenharmony_cienum pipe_error
472bf215546Sopenharmony_ciSVGA3D_vgpu10_ClearRenderTargetView(struct svga_winsys_context *swc,
473bf215546Sopenharmony_ci                                    struct pipe_surface *color_surf,
474bf215546Sopenharmony_ci                                    const float *rgba);
475bf215546Sopenharmony_ci
476bf215546Sopenharmony_cienum pipe_error
477bf215546Sopenharmony_ciSVGA3D_vgpu10_ClearDepthStencilView(struct svga_winsys_context *swc,
478bf215546Sopenharmony_ci                                    struct pipe_surface *ds_surf,
479bf215546Sopenharmony_ci                                    uint16 flags, uint16 stencil, float depth);
480bf215546Sopenharmony_ci
481bf215546Sopenharmony_cienum pipe_error
482bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineShaderResourceView(struct svga_winsys_context *swc,
483bf215546Sopenharmony_ci                             SVGA3dShaderResourceViewId shaderResourceViewId,
484bf215546Sopenharmony_ci                             struct svga_winsys_surface *surf,
485bf215546Sopenharmony_ci                             SVGA3dSurfaceFormat format,
486bf215546Sopenharmony_ci                             SVGA3dResourceType resourceDimension,
487bf215546Sopenharmony_ci                             const SVGA3dShaderResourceViewDesc *desc);
488bf215546Sopenharmony_ci
489bf215546Sopenharmony_cienum pipe_error
490bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyShaderResourceView(struct svga_winsys_context *swc,
491bf215546Sopenharmony_ci                            SVGA3dShaderResourceViewId shaderResourceViewId);
492bf215546Sopenharmony_ci
493bf215546Sopenharmony_cienum pipe_error
494bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineRenderTargetView(struct svga_winsys_context *swc,
495bf215546Sopenharmony_ci                                  SVGA3dRenderTargetViewId renderTargetViewId,
496bf215546Sopenharmony_ci                                  struct svga_winsys_surface *surface,
497bf215546Sopenharmony_ci                                  SVGA3dSurfaceFormat format,
498bf215546Sopenharmony_ci                                  SVGA3dResourceType resourceDimension,
499bf215546Sopenharmony_ci                                  const SVGA3dRenderTargetViewDesc *desc);
500bf215546Sopenharmony_ci
501bf215546Sopenharmony_cienum pipe_error
502bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyRenderTargetView(struct svga_winsys_context *swc,
503bf215546Sopenharmony_ci                                SVGA3dRenderTargetViewId renderTargetViewId);
504bf215546Sopenharmony_ci
505bf215546Sopenharmony_cienum pipe_error
506bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineDepthStencilView(struct svga_winsys_context *swc,
507bf215546Sopenharmony_ci                                  SVGA3dDepthStencilViewId depthStencilViewId,
508bf215546Sopenharmony_ci                                  struct svga_winsys_surface *surface,
509bf215546Sopenharmony_ci                                  SVGA3dSurfaceFormat format,
510bf215546Sopenharmony_ci                                  SVGA3dResourceType resourceDimension,
511bf215546Sopenharmony_ci                                  const SVGA3dRenderTargetViewDesc *desc);
512bf215546Sopenharmony_ci
513bf215546Sopenharmony_ci
514bf215546Sopenharmony_cienum pipe_error
515bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyDepthStencilView(struct svga_winsys_context *swc,
516bf215546Sopenharmony_ci                                SVGA3dDepthStencilViewId depthStencilViewId);
517bf215546Sopenharmony_ci
518bf215546Sopenharmony_cienum pipe_error
519bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineElementLayout(struct svga_winsys_context *swc,
520bf215546Sopenharmony_ci                               unsigned count,
521bf215546Sopenharmony_ci                               SVGA3dElementLayoutId elementLayoutId,
522bf215546Sopenharmony_ci                               const SVGA3dInputElementDesc *elements);
523bf215546Sopenharmony_ci
524bf215546Sopenharmony_cienum pipe_error
525bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyElementLayout(struct svga_winsys_context *swc,
526bf215546Sopenharmony_ci                                   SVGA3dElementLayoutId elementLayoutId);
527bf215546Sopenharmony_ci
528bf215546Sopenharmony_cienum pipe_error
529bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineBlendState(struct svga_winsys_context *swc,
530bf215546Sopenharmony_ci                               SVGA3dBlendStateId blendId,
531bf215546Sopenharmony_ci                               uint8 alphaToCoverageEnable,
532bf215546Sopenharmony_ci                               uint8 independentBlendEnable,
533bf215546Sopenharmony_ci                               const SVGA3dDXBlendStatePerRT *perRT);
534bf215546Sopenharmony_ci
535bf215546Sopenharmony_cienum pipe_error
536bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyBlendState(struct svga_winsys_context *swc,
537bf215546Sopenharmony_ci                                SVGA3dBlendStateId blendId);
538bf215546Sopenharmony_ci
539bf215546Sopenharmony_cienum pipe_error
540bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineDepthStencilState(struct svga_winsys_context *swc,
541bf215546Sopenharmony_ci                                      SVGA3dDepthStencilStateId depthStencilId,
542bf215546Sopenharmony_ci                                      uint8 depthEnable,
543bf215546Sopenharmony_ci                                      SVGA3dDepthWriteMask depthWriteMask,
544bf215546Sopenharmony_ci                                      SVGA3dComparisonFunc depthFunc,
545bf215546Sopenharmony_ci                                      uint8 stencilEnable,
546bf215546Sopenharmony_ci                                      uint8 frontEnable,
547bf215546Sopenharmony_ci                                      uint8 backEnable,
548bf215546Sopenharmony_ci                                      uint8 stencilReadMask,
549bf215546Sopenharmony_ci                                      uint8 stencilWriteMask,
550bf215546Sopenharmony_ci                                      uint8 frontStencilFailOp,
551bf215546Sopenharmony_ci                                      uint8 frontStencilDepthFailOp,
552bf215546Sopenharmony_ci                                      uint8 frontStencilPassOp,
553bf215546Sopenharmony_ci                                      SVGA3dComparisonFunc frontStencilFunc,
554bf215546Sopenharmony_ci                                      uint8 backStencilFailOp,
555bf215546Sopenharmony_ci                                      uint8 backStencilDepthFailOp,
556bf215546Sopenharmony_ci                                      uint8 backStencilPassOp,
557bf215546Sopenharmony_ci                                      SVGA3dComparisonFunc backStencilFunc);
558bf215546Sopenharmony_ci
559bf215546Sopenharmony_cienum pipe_error
560bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyDepthStencilState(struct svga_winsys_context *swc,
561bf215546Sopenharmony_ci                                       SVGA3dDepthStencilStateId depthStencilId);
562bf215546Sopenharmony_ci
563bf215546Sopenharmony_cienum pipe_error
564bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineRasterizerState(struct svga_winsys_context *swc,
565bf215546Sopenharmony_ci                                    SVGA3dRasterizerStateId rasterizerId,
566bf215546Sopenharmony_ci                                    uint8 fillMode,
567bf215546Sopenharmony_ci                                    SVGA3dCullMode cullMode,
568bf215546Sopenharmony_ci                                    uint8 frontCounterClockwise,
569bf215546Sopenharmony_ci                                    int32 depthBias,
570bf215546Sopenharmony_ci                                    float depthBiasClamp,
571bf215546Sopenharmony_ci                                    float slopeScaledDepthBias,
572bf215546Sopenharmony_ci                                    uint8 depthClipEnable,
573bf215546Sopenharmony_ci                                    uint8 scissorEnable,
574bf215546Sopenharmony_ci                                    uint8 multisampleEnable,
575bf215546Sopenharmony_ci                                    uint8 antialiasedLineEnable,
576bf215546Sopenharmony_ci                                    float lineWidth,
577bf215546Sopenharmony_ci                                    uint8 lineStippleEnable,
578bf215546Sopenharmony_ci                                    uint8 lineStippleFactor,
579bf215546Sopenharmony_ci                                    uint16 lineStipplePattern,
580bf215546Sopenharmony_ci                                    uint8 provokingVertexLast);
581bf215546Sopenharmony_ci
582bf215546Sopenharmony_cienum pipe_error
583bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyRasterizerState(struct svga_winsys_context *swc,
584bf215546Sopenharmony_ci                                     SVGA3dRasterizerStateId rasterizerId);
585bf215546Sopenharmony_ci
586bf215546Sopenharmony_cienum pipe_error
587bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineSamplerState(struct svga_winsys_context *swc,
588bf215546Sopenharmony_ci                                 SVGA3dSamplerId samplerId,
589bf215546Sopenharmony_ci                                 SVGA3dFilter filter,
590bf215546Sopenharmony_ci                                 uint8 addressU,
591bf215546Sopenharmony_ci                                 uint8 addressV,
592bf215546Sopenharmony_ci                                 uint8 addressW,
593bf215546Sopenharmony_ci                                 float mipLODBias,
594bf215546Sopenharmony_ci                                 uint8 maxAnisotropy,
595bf215546Sopenharmony_ci                                 uint8 comparisonFunc,
596bf215546Sopenharmony_ci                                 SVGA3dRGBAFloat borderColor,
597bf215546Sopenharmony_ci                                 float minLOD,
598bf215546Sopenharmony_ci                                 float maxLOD);
599bf215546Sopenharmony_ci
600bf215546Sopenharmony_cienum pipe_error
601bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroySamplerState(struct svga_winsys_context *swc,
602bf215546Sopenharmony_ci                                  SVGA3dSamplerId samplerId);
603bf215546Sopenharmony_ci
604bf215546Sopenharmony_cienum pipe_error
605bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyShader(struct svga_winsys_context *swc,
606bf215546Sopenharmony_ci                            SVGA3dShaderId shaderId);
607bf215546Sopenharmony_ci
608bf215546Sopenharmony_cienum pipe_error
609bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineAndBindShader(struct svga_winsys_context *swc,
610bf215546Sopenharmony_ci                                  struct svga_winsys_gb_shader *gbshader,
611bf215546Sopenharmony_ci                                  SVGA3dShaderId shaderId,
612bf215546Sopenharmony_ci                                  SVGA3dShaderType type,
613bf215546Sopenharmony_ci                                  uint32 sizeInBytes);
614bf215546Sopenharmony_ci
615bf215546Sopenharmony_cienum pipe_error
616bf215546Sopenharmony_ciSVGA3D_vgpu10_DefineStreamOutput(struct svga_winsys_context *swc,
617bf215546Sopenharmony_ci      SVGA3dStreamOutputId soid,
618bf215546Sopenharmony_ci      uint32 numOutputStreamEntries,
619bf215546Sopenharmony_ci      uint32 streamOutputStrideInBytes[SVGA3D_DX_MAX_SOTARGETS],
620bf215546Sopenharmony_ci      const SVGA3dStreamOutputDeclarationEntry decl[SVGA3D_MAX_STREAMOUT_DECLS]);
621bf215546Sopenharmony_ci
622bf215546Sopenharmony_cienum pipe_error
623bf215546Sopenharmony_ciSVGA3D_vgpu10_DestroyStreamOutput(struct svga_winsys_context *swc,
624bf215546Sopenharmony_ci                                  SVGA3dStreamOutputId soid);
625bf215546Sopenharmony_ci
626bf215546Sopenharmony_cienum pipe_error
627bf215546Sopenharmony_ciSVGA3D_vgpu10_ReadbackSubResource(struct svga_winsys_context *swc,
628bf215546Sopenharmony_ci                                  struct svga_winsys_surface *surface,
629bf215546Sopenharmony_ci                                  unsigned subResource);
630bf215546Sopenharmony_ci
631bf215546Sopenharmony_cienum pipe_error
632bf215546Sopenharmony_ciSVGA3D_vgpu10_SetInputLayout(struct svga_winsys_context *swc,
633bf215546Sopenharmony_ci                             SVGA3dElementLayoutId elementLayoutId);
634bf215546Sopenharmony_ci
635bf215546Sopenharmony_cienum pipe_error
636bf215546Sopenharmony_ciSVGA3D_vgpu10_SetVertexBuffers(struct svga_winsys_context *swc,
637bf215546Sopenharmony_ci                               unsigned count,
638bf215546Sopenharmony_ci                               uint32 startBuffer,
639bf215546Sopenharmony_ci                               const SVGA3dVertexBuffer_v2 *bufferInfo,
640bf215546Sopenharmony_ci                               struct svga_winsys_surface **surfaces);
641bf215546Sopenharmony_ci
642bf215546Sopenharmony_cienum pipe_error
643bf215546Sopenharmony_ciSVGA3D_vgpu10_SetVertexBuffers_v2(struct svga_winsys_context *swc,
644bf215546Sopenharmony_ci                               unsigned count,
645bf215546Sopenharmony_ci                               uint32 startBuffer,
646bf215546Sopenharmony_ci                               const SVGA3dVertexBuffer_v2 *bufferInfo,
647bf215546Sopenharmony_ci                               struct svga_winsys_surface **surfaces);
648bf215546Sopenharmony_ci
649bf215546Sopenharmony_cienum pipe_error
650bf215546Sopenharmony_ciSVGA3D_vgpu10_SetVertexBuffersOffsetAndSize(struct svga_winsys_context *swc,
651bf215546Sopenharmony_ci                               unsigned count,
652bf215546Sopenharmony_ci                               uint32 startBuffer,
653bf215546Sopenharmony_ci                               const SVGA3dVertexBuffer_v2 *bufferInfo);
654bf215546Sopenharmony_ci
655bf215546Sopenharmony_cienum pipe_error
656bf215546Sopenharmony_ciSVGA3D_vgpu10_SetTopology(struct svga_winsys_context *swc,
657bf215546Sopenharmony_ci                          SVGA3dPrimitiveType topology);
658bf215546Sopenharmony_ci
659bf215546Sopenharmony_cienum pipe_error
660bf215546Sopenharmony_ciSVGA3D_vgpu10_SetIndexBuffer(struct svga_winsys_context *swc,
661bf215546Sopenharmony_ci                             struct svga_winsys_surface *indexes,
662bf215546Sopenharmony_ci                             SVGA3dSurfaceFormat format, uint32 offset);
663bf215546Sopenharmony_ci
664bf215546Sopenharmony_cienum pipe_error
665bf215546Sopenharmony_ciSVGA3D_vgpu10_SetIndexBuffer_v2(struct svga_winsys_context *swc,
666bf215546Sopenharmony_ci                                struct svga_winsys_surface *indexes,
667bf215546Sopenharmony_ci                                SVGA3dSurfaceFormat format, uint32 offset,
668bf215546Sopenharmony_ci                                uint32 sizeInBytes);
669bf215546Sopenharmony_ci
670bf215546Sopenharmony_cienum pipe_error
671bf215546Sopenharmony_ciSVGA3D_vgpu10_SetIndexBufferOffsetAndSize(struct svga_winsys_context *swc,
672bf215546Sopenharmony_ci                             SVGA3dSurfaceFormat format, uint32 offset,
673bf215546Sopenharmony_ci                             uint32 sizeInBytes);
674bf215546Sopenharmony_ci
675bf215546Sopenharmony_cienum pipe_error
676bf215546Sopenharmony_ciSVGA3D_vgpu10_SetSingleConstantBuffer(struct svga_winsys_context *swc,
677bf215546Sopenharmony_ci                                      unsigned slot,
678bf215546Sopenharmony_ci                                      SVGA3dShaderType type,
679bf215546Sopenharmony_ci                                      struct svga_winsys_surface *surface,
680bf215546Sopenharmony_ci                                      uint32 offsetInBytes,
681bf215546Sopenharmony_ci                                      uint32 sizeInBytes);
682bf215546Sopenharmony_ci
683bf215546Sopenharmony_cienum pipe_error
684bf215546Sopenharmony_ciSVGA3D_vgpu10_SetConstantBufferOffset(struct svga_winsys_context *swc,
685bf215546Sopenharmony_ci                                      unsigned command,
686bf215546Sopenharmony_ci                                      unsigned slot,
687bf215546Sopenharmony_ci                                      uint32 offsetInBytes);
688bf215546Sopenharmony_ci
689bf215546Sopenharmony_cienum pipe_error
690bf215546Sopenharmony_ciSVGA3D_vgpu10_UpdateSubResource(struct svga_winsys_context *swc,
691bf215546Sopenharmony_ci                                struct svga_winsys_surface *surface,
692bf215546Sopenharmony_ci                                const SVGA3dBox *box,
693bf215546Sopenharmony_ci                                unsigned subResource);
694bf215546Sopenharmony_ci
695bf215546Sopenharmony_cienum pipe_error
696bf215546Sopenharmony_ciSVGA3D_vgpu10_GenMips(struct svga_winsys_context *swc,
697bf215546Sopenharmony_ci                      SVGA3dShaderResourceViewId shaderResourceViewId,
698bf215546Sopenharmony_ci                      struct svga_winsys_surface *view);
699bf215546Sopenharmony_ci
700bf215546Sopenharmony_cienum pipe_error
701bf215546Sopenharmony_ciSVGA3D_vgpu10_BufferCopy(struct svga_winsys_context *swc,
702bf215546Sopenharmony_ci                         struct svga_winsys_surface *src,
703bf215546Sopenharmony_ci                         struct svga_winsys_surface *dst,
704bf215546Sopenharmony_ci                         unsigned srcx, unsigned dstx, unsigned width);
705bf215546Sopenharmony_ci
706bf215546Sopenharmony_cienum pipe_error
707bf215546Sopenharmony_ciSVGA3D_vgpu10_TransferFromBuffer(struct svga_winsys_context *swc,
708bf215546Sopenharmony_ci                                 struct svga_winsys_surface *src,
709bf215546Sopenharmony_ci                                 unsigned srcOffset, unsigned srcPitch,
710bf215546Sopenharmony_ci                                 unsigned srcSlicePitch,
711bf215546Sopenharmony_ci                                 struct svga_winsys_surface *dst,
712bf215546Sopenharmony_ci                                 unsigned dstSubResource,
713bf215546Sopenharmony_ci                                 SVGA3dBox *dstBox);
714bf215546Sopenharmony_ci
715bf215546Sopenharmony_ci/*Cap2 commands*/
716bf215546Sopenharmony_cienum pipe_error
717bf215546Sopenharmony_ciSVGA3D_vgpu10_IntraSurfaceCopy(struct svga_winsys_context *swc,
718bf215546Sopenharmony_ci                               struct svga_winsys_surface *src,
719bf215546Sopenharmony_ci                               unsigned level, unsigned face,
720bf215546Sopenharmony_ci                               const SVGA3dCopyBox *box);
721bf215546Sopenharmony_ci
722bf215546Sopenharmony_cienum pipe_error
723bf215546Sopenharmony_ciSVGA3D_vgpu10_ResolveCopy(struct svga_winsys_context *swc,
724bf215546Sopenharmony_ci                          unsigned dstSubResource,
725bf215546Sopenharmony_ci                          struct svga_winsys_surface *dst,
726bf215546Sopenharmony_ci                          unsigned srcSubResource,
727bf215546Sopenharmony_ci                          struct svga_winsys_surface *src,
728bf215546Sopenharmony_ci                          const SVGA3dSurfaceFormat copyFormat);
729bf215546Sopenharmony_ci
730bf215546Sopenharmony_cienum pipe_error
731bf215546Sopenharmony_ciSVGA3D_sm5_DrawIndexedInstancedIndirect(struct svga_winsys_context *swc,
732bf215546Sopenharmony_ci                                        struct svga_winsys_surface *argBuffer,
733bf215546Sopenharmony_ci                                        unsigned argOffset);
734bf215546Sopenharmony_ci
735bf215546Sopenharmony_cienum pipe_error
736bf215546Sopenharmony_ciSVGA3D_sm5_DrawInstancedIndirect(struct svga_winsys_context *swc,
737bf215546Sopenharmony_ci                                 struct svga_winsys_surface *argBuffer,
738bf215546Sopenharmony_ci                                 unsigned argOffset);
739bf215546Sopenharmony_ci
740bf215546Sopenharmony_cienum pipe_error
741bf215546Sopenharmony_ciSVGA3D_sm5_DefineUAView(struct svga_winsys_context *swc,
742bf215546Sopenharmony_ci                        SVGA3dUAViewId uaViewId,
743bf215546Sopenharmony_ci                        struct svga_winsys_surface *surface,
744bf215546Sopenharmony_ci                        SVGA3dSurfaceFormat format,
745bf215546Sopenharmony_ci                        SVGA3dResourceType resourceDimension,
746bf215546Sopenharmony_ci                        const SVGA3dUAViewDesc *desc);
747bf215546Sopenharmony_ci
748bf215546Sopenharmony_cienum pipe_error
749bf215546Sopenharmony_ciSVGA3D_sm5_DestroyUAView(struct svga_winsys_context *swc,
750bf215546Sopenharmony_ci                         SVGA3dUAViewId uaViewId);
751bf215546Sopenharmony_ci
752bf215546Sopenharmony_cienum pipe_error
753bf215546Sopenharmony_ciSVGA3D_sm5_SetUAViews(struct svga_winsys_context *swc,
754bf215546Sopenharmony_ci                      uint32 uavSpliceIndex,
755bf215546Sopenharmony_ci                      unsigned count,
756bf215546Sopenharmony_ci                      const SVGA3dUAViewId ids[],
757bf215546Sopenharmony_ci                      struct svga_winsys_surface **uaViews);
758bf215546Sopenharmony_ci
759bf215546Sopenharmony_cienum pipe_error
760bf215546Sopenharmony_ciSVGA3D_sm5_SetCSUAViews(struct svga_winsys_context *swc,
761bf215546Sopenharmony_ci                        unsigned count,
762bf215546Sopenharmony_ci                        const SVGA3dUAViewId ids[],
763bf215546Sopenharmony_ci                        struct svga_winsys_surface **uaViews);
764bf215546Sopenharmony_ci
765bf215546Sopenharmony_cienum pipe_error
766bf215546Sopenharmony_ciSVGA3D_sm5_Dispatch(struct svga_winsys_context *swc,
767bf215546Sopenharmony_ci                    const uint32 threadGroupCount[3]);
768bf215546Sopenharmony_ci
769bf215546Sopenharmony_cienum pipe_error
770bf215546Sopenharmony_ciSVGA3D_sm5_DispatchIndirect(struct svga_winsys_context *swc,
771bf215546Sopenharmony_ci                            struct svga_winsys_surface *argBuffer,
772bf215546Sopenharmony_ci                            uint32 argOffset);
773bf215546Sopenharmony_ci
774bf215546Sopenharmony_cienum pipe_error
775bf215546Sopenharmony_ciSVGA3D_sm5_DefineAndBindStreamOutput(struct svga_winsys_context *swc,
776bf215546Sopenharmony_ci       SVGA3dStreamOutputId soid,
777bf215546Sopenharmony_ci       uint32 numOutputStreamEntries,
778bf215546Sopenharmony_ci       uint32 numOutputStreamStrides,
779bf215546Sopenharmony_ci       uint32 streamOutputStrideInBytes[SVGA3D_DX_MAX_SOTARGETS],
780bf215546Sopenharmony_ci       struct svga_winsys_buffer *declBuf,
781bf215546Sopenharmony_ci       uint32 rasterizedStream,
782bf215546Sopenharmony_ci       uint32 sizeInBytes);
783bf215546Sopenharmony_ci
784bf215546Sopenharmony_cienum pipe_error
785bf215546Sopenharmony_ciSVGA3D_sm5_DefineRasterizerState_v2(struct svga_winsys_context *swc,
786bf215546Sopenharmony_ci                                    SVGA3dRasterizerStateId rasterizerId,
787bf215546Sopenharmony_ci                                    uint8 fillMode,
788bf215546Sopenharmony_ci                                    SVGA3dCullMode cullMode,
789bf215546Sopenharmony_ci                                    uint8 frontCounterClockwise,
790bf215546Sopenharmony_ci                                    int32 depthBias,
791bf215546Sopenharmony_ci                                    float depthBiasClamp,
792bf215546Sopenharmony_ci                                    float slopeScaledDepthBias,
793bf215546Sopenharmony_ci                                    uint8 depthClipEnable,
794bf215546Sopenharmony_ci                                    uint8 scissorEnable,
795bf215546Sopenharmony_ci                                    uint8 multisampleEnable,
796bf215546Sopenharmony_ci                                    uint8 antialiasedLineEnable,
797bf215546Sopenharmony_ci                                    float lineWidth,
798bf215546Sopenharmony_ci                                    uint8 lineStippleEnable,
799bf215546Sopenharmony_ci                                    uint8 lineStippleFactor,
800bf215546Sopenharmony_ci                                    uint16 lineStipplePattern,
801bf215546Sopenharmony_ci                                    uint8 provokingVertexLast,
802bf215546Sopenharmony_ci                                    uint32 forcedSampleCount);
803bf215546Sopenharmony_ci#endif /* __SVGA3D_H__ */
804