swr: [rasterizer core] viewport array support
[mesa.git] / src / gallium / drivers / swr / rasterizer / core / api.h
1 /****************************************************************************
2 * Copyright (C) 2014-2016 Intel Corporation. All Rights Reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 *
23 * @file api.h
24 *
25 * @brief API definitions
26 *
27 ******************************************************************************/
28
29 #ifndef __SWR_API_H__
30 #define __SWR_API_H__
31
32 #include "common/os.h"
33
34 #include <assert.h>
35 #include <vector>
36
37 #include "common/simdintrin.h"
38 #include "common/formats.h"
39 #include "core/utils.h"
40 #include "core/state.h"
41
42 ///@todo place all the API functions into the 'swr' namespace.
43
44 typedef void(SWR_API *PFN_CALLBACK_FUNC)(uint64_t data, uint64_t data2, uint64_t data3);
45
46 //////////////////////////////////////////////////////////////////////////
47 /// @brief Function signature for load hot tiles
48 /// @param hPrivateContext - handle to private data
49 /// @param dstFormat - format of the hot tile
50 /// @param renderTargetIndex - render target to store, can be color, depth or stencil
51 /// @param x - destination x coordinate
52 /// @param y - destination y coordinate
53 /// @param pDstHotTile - pointer to the hot tile surface
54 typedef void(SWR_API *PFN_LOAD_TILE)(HANDLE hPrivateContext, SWR_FORMAT dstFormat,
55 SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
56 uint32_t x, uint32_t y, uint32_t renderTargetArrayIndex, uint8_t *pDstHotTile);
57
58 //////////////////////////////////////////////////////////////////////////
59 /// @brief Function signature for store hot tiles
60 /// @param hPrivateContext - handle to private data
61 /// @param srcFormat - format of the hot tile
62 /// @param renderTargetIndex - render target to store, can be color, depth or stencil
63 /// @param x - destination x coordinate
64 /// @param y - destination y coordinate
65 /// @param pSrcHotTile - pointer to the hot tile surface
66 typedef void(SWR_API *PFN_STORE_TILE)(HANDLE hPrivateContext, SWR_FORMAT srcFormat,
67 SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
68 uint32_t x, uint32_t y, uint32_t renderTargetArrayIndex, uint8_t *pSrcHotTile);
69
70 //////////////////////////////////////////////////////////////////////////
71 /// @brief Function signature for clearing from the hot tiles clear value
72 /// @param hPrivateContext - handle to private data
73 /// @param renderTargetIndex - render target to store, can be color, depth or stencil
74 /// @param x - destination x coordinate
75 /// @param y - destination y coordinate
76 /// @param pClearColor - pointer to the hot tile's clear value
77 typedef void(SWR_API *PFN_CLEAR_TILE)(HANDLE hPrivateContext,
78 SWR_RENDERTARGET_ATTACHMENT rtIndex,
79 uint32_t x, uint32_t y, const float* pClearColor);
80
81 //////////////////////////////////////////////////////////////////////////
82 /// @brief Callback to allow driver to update their copy of streamout write offset.
83 /// This is call is made for any draw operation that has streamout enabled
84 /// and has updated the write offset.
85 /// @param hPrivateContext - handle to private data
86 /// @param soBufferSlot - buffer slot for write offset
87 /// @param soWriteOffset - update value for so write offset.
88 typedef void(SWR_API *PFN_UPDATE_SO_WRITE_OFFSET)(HANDLE hPrivateContext,
89 uint32_t soBufferSlot, uint32_t soWriteOffset);
90
91 //////////////////////////////////////////////////////////////////////////
92 /// @brief Callback to allow driver to update their copy of stats.
93 /// @param hPrivateContext - handle to private data
94 /// @param pStats - pointer to draw stats
95 typedef void(SWR_API *PFN_UPDATE_STATS)(HANDLE hPrivateContext,
96 const SWR_STATS* pStats);
97
98 class BucketManager;
99
100 //////////////////////////////////////////////////////////////////////////
101 /// SWR_THREADING_INFO
102 /////////////////////////////////////////////////////////////////////////
103 struct SWR_THREADING_INFO
104 {
105 uint32_t MAX_WORKER_THREADS;
106 uint32_t MAX_NUMA_NODES;
107 uint32_t MAX_CORES_PER_NUMA_NODE;
108 uint32_t MAX_THREADS_PER_CORE;
109 bool SINGLE_THREADED;
110 };
111
112 //////////////////////////////////////////////////////////////////////////
113 /// SWR_CREATECONTEXT_INFO
114 /////////////////////////////////////////////////////////////////////////
115 struct SWR_CREATECONTEXT_INFO
116 {
117 DRIVER_TYPE driver;
118
119 // External functions (e.g. sampler) need per draw context state.
120 // Use SwrGetPrivateContextState() to access private state.
121 uint32_t privateStateSize;
122
123 // Callback functions
124 PFN_LOAD_TILE pfnLoadTile;
125 PFN_STORE_TILE pfnStoreTile;
126 PFN_CLEAR_TILE pfnClearTile;
127 PFN_UPDATE_SO_WRITE_OFFSET pfnUpdateSoWriteOffset;
128 PFN_UPDATE_STATS pfnUpdateStats;
129
130 // Pointer to rdtsc buckets mgr returned to the caller.
131 // Only populated when KNOB_ENABLE_RDTSC is set
132 BucketManager* pBucketMgr;
133
134 // Output: size required memory passed to for SwrSaveState / SwrRestoreState
135 size_t contextSaveSize;
136
137 // Input (optional): Threading info that overrides any set KNOB values.
138 SWR_THREADING_INFO* pThreadInfo;
139 };
140
141 //////////////////////////////////////////////////////////////////////////
142 /// SWR_RECT
143 /////////////////////////////////////////////////////////////////////////
144 struct SWR_RECT
145 {
146 uint32_t left;
147 uint32_t right;
148 uint32_t top;
149 uint32_t bottom;
150 };
151
152 //////////////////////////////////////////////////////////////////////////
153 /// @brief Create SWR Context.
154 /// @param pCreateInfo - pointer to creation info.
155 HANDLE SWR_API SwrCreateContext(
156 SWR_CREATECONTEXT_INFO* pCreateInfo);
157
158 //////////////////////////////////////////////////////////////////////////
159 /// @brief Destroys SWR Context.
160 /// @param hContext - Handle passed back from SwrCreateContext
161 void SWR_API SwrDestroyContext(
162 HANDLE hContext);
163
164 //////////////////////////////////////////////////////////////////////////
165 /// @brief Saves API state associated with hContext
166 /// @param hContext - Handle passed back from SwrCreateContext
167 /// @param pOutputStateBlock - Memory block to receive API state data
168 /// @param memSize - Size of memory pointed to by pOutputStateBlock
169 void SWR_API SwrSaveState(
170 HANDLE hContext,
171 void* pOutputStateBlock,
172 size_t memSize);
173
174 //////////////////////////////////////////////////////////////////////////
175 /// @brief Restores API state to hContext previously saved with SwrSaveState
176 /// @param hContext - Handle passed back from SwrCreateContext
177 /// @param pStateBlock - Memory block to read API state data from
178 /// @param memSize - Size of memory pointed to by pStateBlock
179 void SWR_API SwrRestoreState(
180 HANDLE hContext,
181 const void* pStateBlock,
182 size_t memSize);
183
184 //////////////////////////////////////////////////////////////////////////
185 /// @brief Sync cmd. Executes the callback func when all rendering up to this sync
186 /// has been completed
187 /// @param hContext - Handle passed back from SwrCreateContext
188 /// @param pfnFunc - pointer to callback function,
189 /// @param userData - user data to pass back
190 void SWR_API SwrSync(
191 HANDLE hContext,
192 PFN_CALLBACK_FUNC pfnFunc,
193 uint64_t userData,
194 uint64_t userData2,
195 uint64_t userData3 = 0);
196
197 //////////////////////////////////////////////////////////////////////////
198 /// @brief Blocks until all rendering has been completed.
199 /// @param hContext - Handle passed back from SwrCreateContext
200 void SWR_API SwrWaitForIdle(
201 HANDLE hContext);
202
203 //////////////////////////////////////////////////////////////////////////
204 /// @brief Blocks until all FE rendering has been completed.
205 /// @param hContext - Handle passed back from SwrCreateContext
206 void SWR_API SwrWaitForIdleFE(
207 HANDLE hContext);
208
209 //////////////////////////////////////////////////////////////////////////
210 /// @brief Set vertex buffer state.
211 /// @param hContext - Handle passed back from SwrCreateContext
212 /// @param numBuffers - Number of vertex buffer state descriptors.
213 /// @param pVertexBuffers - Array of vertex buffer state descriptors.
214 void SWR_API SwrSetVertexBuffers(
215 HANDLE hContext,
216 uint32_t numBuffers,
217 const SWR_VERTEX_BUFFER_STATE* pVertexBuffers);
218
219 //////////////////////////////////////////////////////////////////////////
220 /// @brief Set index buffer
221 /// @param hContext - Handle passed back from SwrCreateContext
222 /// @param pIndexBuffer - Index buffer.
223 void SWR_API SwrSetIndexBuffer(
224 HANDLE hContext,
225 const SWR_INDEX_BUFFER_STATE* pIndexBuffer);
226
227 //////////////////////////////////////////////////////////////////////////
228 /// @brief Set fetch shader pointer.
229 /// @param hContext - Handle passed back from SwrCreateContext
230 /// @param pfnFetchFunc - Pointer to shader.
231 void SWR_API SwrSetFetchFunc(
232 HANDLE hContext,
233 PFN_FETCH_FUNC pfnFetchFunc);
234
235 //////////////////////////////////////////////////////////////////////////
236 /// @brief Set streamout shader pointer.
237 /// @param hContext - Handle passed back from SwrCreateContext
238 /// @param pfnSoFunc - Pointer to shader.
239 /// @param streamIndex - specifies stream
240 void SWR_API SwrSetSoFunc(
241 HANDLE hContext,
242 PFN_SO_FUNC pfnSoFunc,
243 uint32_t streamIndex);
244
245 //////////////////////////////////////////////////////////////////////////
246 /// @brief Set streamout state
247 /// @param hContext - Handle passed back from SwrCreateContext
248 /// @param pSoState - Pointer to streamout state.
249 void SWR_API SwrSetSoState(
250 HANDLE hContext,
251 SWR_STREAMOUT_STATE* pSoState);
252
253 //////////////////////////////////////////////////////////////////////////
254 /// @brief Set streamout buffer state
255 /// @param hContext - Handle passed back from SwrCreateContext
256 /// @param pSoBuffer - Pointer to streamout buffer.
257 /// @param slot - Slot to bind SO buffer to.
258 void SWR_API SwrSetSoBuffers(
259 HANDLE hContext,
260 SWR_STREAMOUT_BUFFER* pSoBuffer,
261 uint32_t slot);
262
263 //////////////////////////////////////////////////////////////////////////
264 /// @brief Set vertex shader pointer.
265 /// @param hContext - Handle passed back from SwrCreateContext
266 /// @param pfnVertexFunc - Pointer to shader.
267 void SWR_API SwrSetVertexFunc(
268 HANDLE hContext,
269 PFN_VERTEX_FUNC pfnVertexFunc);
270
271 //////////////////////////////////////////////////////////////////////////
272 /// @brief Set frontend state.
273 /// @param hContext - Handle passed back from SwrCreateContext
274 /// @param pState - Pointer to state
275 void SWR_API SwrSetFrontendState(
276 HANDLE hContext,
277 SWR_FRONTEND_STATE *pState);
278
279 //////////////////////////////////////////////////////////////////////////
280 /// @brief Set geometry shader state.
281 /// @param hContext - Handle passed back from SwrCreateContext
282 /// @param pState - Pointer to state
283 void SWR_API SwrSetGsState(
284 HANDLE hContext,
285 SWR_GS_STATE *pState);
286
287 //////////////////////////////////////////////////////////////////////////
288 /// @brief Set geometry shader
289 /// @param hContext - Handle passed back from SwrCreateContext
290 /// @param pState - Pointer to geometry shader function
291 void SWR_API SwrSetGsFunc(
292 HANDLE hContext,
293 PFN_GS_FUNC pfnGsFunc);
294
295 //////////////////////////////////////////////////////////////////////////
296 /// @brief Set compute shader
297 /// @param hContext - Handle passed back from SwrCreateContext
298 /// @param pfnCsFunc - Pointer to compute shader function
299 /// @param totalThreadsInGroup - product of thread group dimensions.
300 /// @param totalSpillFillSize - size in bytes needed for spill/fill.
301 void SWR_API SwrSetCsFunc(
302 HANDLE hContext,
303 PFN_CS_FUNC pfnCsFunc,
304 uint32_t totalThreadsInGroup,
305 uint32_t totalSpillFillSize);
306
307 //////////////////////////////////////////////////////////////////////////
308 /// @brief Set tessellation state.
309 /// @param hContext - Handle passed back from SwrCreateContext
310 /// @param pState - Pointer to state
311 void SWR_API SwrSetTsState(
312 HANDLE hContext,
313 SWR_TS_STATE *pState);
314
315 //////////////////////////////////////////////////////////////////////////
316 /// @brief Set hull shader
317 /// @param hContext - Handle passed back from SwrCreateContext
318 /// @param pfnFunc - Pointer to shader function
319 void SWR_API SwrSetHsFunc(
320 HANDLE hContext,
321 PFN_HS_FUNC pfnFunc);
322
323 //////////////////////////////////////////////////////////////////////////
324 /// @brief Set domain shader
325 /// @param hContext - Handle passed back from SwrCreateContext
326 /// @param pfnFunc - Pointer to shader function
327 void SWR_API SwrSetDsFunc(
328 HANDLE hContext,
329 PFN_DS_FUNC pfnFunc);
330
331 //////////////////////////////////////////////////////////////////////////
332 /// @brief Set depth stencil state
333 /// @param hContext - Handle passed back from SwrCreateContext
334 /// @param pState - Pointer to state.
335 void SWR_API SwrSetDepthStencilState(
336 HANDLE hContext,
337 SWR_DEPTH_STENCIL_STATE *pState);
338
339 //////////////////////////////////////////////////////////////////////////
340 /// @brief Set backend state
341 /// @param hContext - Handle passed back from SwrCreateContext
342 /// @param pState - Pointer to state.
343 void SWR_API SwrSetBackendState(
344 HANDLE hContext,
345 SWR_BACKEND_STATE *pState);
346
347 //////////////////////////////////////////////////////////////////////////
348 /// @brief Set pixel shader state
349 /// @param hContext - Handle passed back from SwrCreateContext
350 /// @param pState - Pointer to state.
351 void SWR_API SwrSetPixelShaderState(
352 HANDLE hContext,
353 SWR_PS_STATE *pState);
354
355 //////////////////////////////////////////////////////////////////////////
356 /// @brief Set blend state
357 /// @param hContext - Handle passed back from SwrCreateContext
358 /// @param pState - Pointer to state.
359 void SWR_API SwrSetBlendState(
360 HANDLE hContext,
361 SWR_BLEND_STATE *pState);
362
363 //////////////////////////////////////////////////////////////////////////
364 /// @brief Set blend function
365 /// @param hContext - Handle passed back from SwrCreateContext
366 /// @param renderTarget - render target index
367 /// @param pfnBlendFunc - function pointer
368 void SWR_API SwrSetBlendFunc(
369 HANDLE hContext,
370 uint32_t renderTarget,
371 PFN_BLEND_JIT_FUNC pfnBlendFunc);
372
373 //////////////////////////////////////////////////////////////////////////
374 /// @brief SwrDraw
375 /// @param hContext - Handle passed back from SwrCreateContext
376 /// @param topology - Specifies topology for draw.
377 /// @param startVertex - Specifies start vertex in vertex buffer for draw.
378 /// @param primCount - Number of vertices.
379 void SWR_API SwrDraw(
380 HANDLE hContext,
381 PRIMITIVE_TOPOLOGY topology,
382 uint32_t startVertex,
383 uint32_t primCount);
384
385 //////////////////////////////////////////////////////////////////////////
386 /// @brief SwrDrawInstanced
387 /// @param hContext - Handle passed back from SwrCreateContext
388 /// @param topology - Specifies topology for draw.
389 /// @param numVertsPerInstance - How many vertices to read sequentially from vertex data.
390 /// @param numInstances - How many instances to render.
391 /// @param startVertex - Specifies start vertex for draw. (vertex data)
392 /// @param startInstance - Which instance to start sequentially fetching from in each buffer (instanced data)
393 void SWR_API SwrDrawInstanced(
394 HANDLE hContext,
395 PRIMITIVE_TOPOLOGY topology,
396 uint32_t numVertsPerInstance,
397 uint32_t numInstances,
398 uint32_t startVertex,
399 uint32_t startInstance);
400
401 //////////////////////////////////////////////////////////////////////////
402 /// @brief DrawIndexed
403 /// @param hContext - Handle passed back from SwrCreateContext
404 /// @param topology - Specifies topology for draw.
405 /// @param numIndices - Number of indices to read sequentially from index buffer.
406 /// @param indexOffset - Starting index into index buffer.
407 /// @param baseVertex - Vertex in vertex buffer to consider as index "0". Note value is signed.
408 void SWR_API SwrDrawIndexed(
409 HANDLE hContext,
410 PRIMITIVE_TOPOLOGY topology,
411 uint32_t numIndices,
412 uint32_t indexOffset,
413 int32_t baseVertex);
414
415 //////////////////////////////////////////////////////////////////////////
416 /// @brief SwrDrawIndexedInstanced
417 /// @param hContext - Handle passed back from SwrCreateContext
418 /// @param topology - Specifies topology for draw.
419 /// @param numIndices - Number of indices to read sequentially from index buffer.
420 /// @param numInstances - Number of instances to render.
421 /// @param indexOffset - Starting index into index buffer.
422 /// @param baseVertex - Vertex in vertex buffer to consider as index "0". Note value is signed.
423 /// @param startInstance - Which instance to start sequentially fetching from in each buffer (instanced data)
424 void SWR_API SwrDrawIndexedInstanced(
425 HANDLE hContext,
426 PRIMITIVE_TOPOLOGY topology,
427 uint32_t numIndices,
428 uint32_t numInstances,
429 uint32_t indexOffset,
430 int32_t baseVertex,
431 uint32_t startInstance);
432
433 //////////////////////////////////////////////////////////////////////////
434 /// @brief SwrInvalidateTiles
435 /// @param hContext - Handle passed back from SwrCreateContext
436 /// @param attachmentMask - The mask specifies which surfaces attached to the hottiles to invalidate.
437 void SWR_API SwrInvalidateTiles(
438 HANDLE hContext,
439 uint32_t attachmentMask);
440
441 //////////////////////////////////////////////////////////////////////////
442 /// @brief SwrDiscardRect
443 /// @param hContext - Handle passed back from SwrCreateContext
444 /// @param attachmentMask - The mask specifies which surfaces attached to the hottiles to discard.
445 /// @param rect - if rect is all zeros, the entire attachment surface will be discarded
446 void SWR_API SwrDiscardRect(
447 HANDLE hContext,
448 uint32_t attachmentMask,
449 SWR_RECT rect);
450
451 //////////////////////////////////////////////////////////////////////////
452 /// @brief SwrDispatch
453 /// @param hContext - Handle passed back from SwrCreateContext
454 /// @param threadGroupCountX - Number of thread groups dispatched in X direction
455 /// @param threadGroupCountY - Number of thread groups dispatched in Y direction
456 /// @param threadGroupCountZ - Number of thread groups dispatched in Z direction
457 void SWR_API SwrDispatch(
458 HANDLE hContext,
459 uint32_t threadGroupCountX,
460 uint32_t threadGroupCountY,
461 uint32_t threadGroupCountZ);
462
463
464 enum SWR_TILE_STATE
465 {
466 SWR_TILE_INVALID = 0, // tile is in unitialized state and should be loaded with surface contents before rendering
467 SWR_TILE_DIRTY = 2, // tile contains newer data than surface it represents
468 SWR_TILE_RESOLVED = 3, // is in sync with surface it represents
469 };
470
471 /// @todo Add a good description for what attachments are and when and why you would use the different SWR_TILE_STATEs.
472 void SWR_API SwrStoreTiles(
473 HANDLE hContext,
474 SWR_RENDERTARGET_ATTACHMENT attachment,
475 SWR_TILE_STATE postStoreTileState);
476
477 void SWR_API SwrClearRenderTarget(
478 HANDLE hContext,
479 uint32_t clearMask,
480 const float clearColor[4],
481 float z,
482 uint8_t stencil);
483
484 void SWR_API SwrSetRastState(
485 HANDLE hContext,
486 const SWR_RASTSTATE *pRastState);
487
488 //////////////////////////////////////////////////////////////////////////
489 /// @brief SwrSetViewports
490 /// @param hContext - Handle passed back from SwrCreateContext
491 /// @param numViewports - number of viewports passed in
492 /// @param pViewports - Specifies extents of viewport.
493 /// @param pMatrices - If not specified then SWR computes a default one.
494 void SWR_API SwrSetViewports(
495 HANDLE hContext,
496 uint32_t numViewports,
497 const SWR_VIEWPORT* pViewports,
498 const SWR_VIEWPORT_MATRICES* pMatrices);
499
500 //////////////////////////////////////////////////////////////////////////
501 /// @brief SwrSetScissorRects
502 /// @param hContext - Handle passed back from SwrCreateContext
503 /// @param numScissors - number of scissors passed in
504 /// @param pScissors - array of scissors
505 void SWR_API SwrSetScissorRects(
506 HANDLE hContext,
507 uint32_t numScissors,
508 const BBOX* pScissors);
509
510 //////////////////////////////////////////////////////////////////////////
511 /// @brief Returns a pointer to the private context state for the current
512 /// draw operation. This is used for external componets such as the
513 /// sampler.
514 ///
515 /// @note Client needs to resend private state prior to each draw call.
516 /// Also, SWR is responsible for the private state memory.
517 /// @param hContext - Handle passed back from SwrCreateContext
518 VOID* SWR_API SwrGetPrivateContextState(
519 HANDLE hContext);
520
521 //////////////////////////////////////////////////////////////////////////
522 /// @brief Clients can use this to allocate memory for draw/dispatch
523 /// operations. The memory will automatically be freed once operation
524 /// has completed. Client can use this to allocate binding tables,
525 /// etc. needed for shader execution.
526 /// @param hContext - Handle passed back from SwrCreateContext
527 /// @param size - Size of allocation
528 /// @param align - Alignment needed for allocation.
529 VOID* SWR_API SwrAllocDrawContextMemory(
530 HANDLE hContext,
531 uint32_t size,
532 uint32_t align);
533
534 //////////////////////////////////////////////////////////////////////////
535 /// @brief Returns pointer to SWR stats.
536 /// @note The counters are incremented by multiple threads.
537 /// When calling this, you need to ensure all previous operations
538 /// have completed.
539 /// @param hContext - Handle passed back from SwrCreateContext
540 /// @param pStats - SWR will fill this out for caller.
541 void SWR_API SwrGetStats(
542 HANDLE hContext,
543 SWR_STATS* pStats);
544
545 //////////////////////////////////////////////////////////////////////////
546 /// @brief Enables stats counting
547 /// @param hContext - Handle passed back from SwrCreateContext
548 /// @param enable - If true then counts are incremented.
549 void SWR_API SwrEnableStats(
550 HANDLE hContext,
551 bool enable);
552
553 //////////////////////////////////////////////////////////////////////////
554 /// @brief Mark end of frame - used for performance profiling
555 /// @param hContext - Handle passed back from SwrCreateContext
556 void SWR_API SwrEndFrame(
557 HANDLE hContext);
558 #endif//__SWR_API_H__