| 1 |
/* |
| 2 |
* Copyright (c) 2015-2024 Broadcom. All Rights Reserved. |
| 3 |
* The term “Broadcom” refers to Broadcom Inc. |
| 4 |
* and/or its subsidiaries. |
| 5 |
* SPDX-License-Identifier: MIT |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef VMW_DRM_QUERY_H |
| 9 |
#define VMW_DRM_QUERY_H |
| 10 |
|
| 11 |
#include "svga3d_reg.h" |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
/** Guest-backed query */ |
| 16 |
struct svga_winsys_gb_query |
| 17 |
{ |
| 18 |
struct svga_winsys_buffer *buf; |
| 19 |
}; |
| 20 |
|
| 21 |
|
| 22 |
struct svga_winsys_gb_query * |
| 23 |
vmw_svga_winsys_query_create(struct svga_winsys_screen *sws, |
| 24 |
uint32 queryResultLen); |
| 25 |
|
| 26 |
void |
| 27 |
vmw_svga_winsys_query_destroy(struct svga_winsys_screen *sws, |
| 28 |
struct svga_winsys_gb_query *query); |
| 29 |
|
| 30 |
int |
| 31 |
vmw_svga_winsys_query_init(struct svga_winsys_screen *sws, |
| 32 |
struct svga_winsys_gb_query *query, |
| 33 |
unsigned offset, |
| 34 |
SVGA3dQueryState queryState); |
| 35 |
|
| 36 |
void |
| 37 |
vmw_svga_winsys_query_get_result(struct svga_winsys_screen *sws, |
| 38 |
struct svga_winsys_gb_query *query, |
| 39 |
unsigned offset, |
| 40 |
SVGA3dQueryState *queryState, |
| 41 |
void *result, uint32 resultLen); |
| 42 |
|
| 43 |
enum pipe_error |
| 44 |
vmw_swc_query_bind(struct svga_winsys_context *swc, |
| 45 |
struct svga_winsys_gb_query *query, |
| 46 |
unsigned flags); |
| 47 |
|
| 48 |
#endif /* VMW_DRM_QUERY_H */ |
| 49 |
|