diff options
author | Charmaine Lee <[email protected]> | 2016-08-30 16:40:12 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-09-17 10:09:00 -0600 |
commit | f168c886c9f0940551de23b242cb794547cfaf0c (patch) | |
tree | 56db9a7852a2a64104d40dab0c240c4cb7e67034 /src/gallium/drivers/svga | |
parent | 4f74b379aa05e133cdd19865662eceacee4f63f4 (diff) |
svga: change svga hud defines to enums
This will make it easier to add new hud types.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.h | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index db80061f425..7873e6380b1 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -46,32 +46,35 @@ /** Non-GPU queries for gallium HUD */ +enum svga_hud { /* per-frame counters */ -#define SVGA_QUERY_NUM_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0) -#define SVGA_QUERY_NUM_FALLBACKS (PIPE_QUERY_DRIVER_SPECIFIC + 1) -#define SVGA_QUERY_NUM_FLUSHES (PIPE_QUERY_DRIVER_SPECIFIC + 2) -#define SVGA_QUERY_NUM_VALIDATIONS (PIPE_QUERY_DRIVER_SPECIFIC + 3) -#define SVGA_QUERY_MAP_BUFFER_TIME (PIPE_QUERY_DRIVER_SPECIFIC + 4) -#define SVGA_QUERY_NUM_RESOURCES_MAPPED (PIPE_QUERY_DRIVER_SPECIFIC + 5) -#define SVGA_QUERY_NUM_BYTES_UPLOADED (PIPE_QUERY_DRIVER_SPECIFIC + 6) -#define SVGA_QUERY_COMMAND_BUFFER_SIZE (PIPE_QUERY_DRIVER_SPECIFIC + 7) -#define SVGA_QUERY_FLUSH_TIME (PIPE_QUERY_DRIVER_SPECIFIC + 8) -#define SVGA_QUERY_SURFACE_WRITE_FLUSHES (PIPE_QUERY_DRIVER_SPECIFIC + 9) -#define SVGA_QUERY_NUM_READBACKS (PIPE_QUERY_DRIVER_SPECIFIC + 10) -#define SVGA_QUERY_NUM_RESOURCE_UPDATES (PIPE_QUERY_DRIVER_SPECIFIC + 11) -#define SVGA_QUERY_NUM_BUFFER_UPLOADS (PIPE_QUERY_DRIVER_SPECIFIC + 12) -#define SVGA_QUERY_NUM_CONST_BUF_UPDATES (PIPE_QUERY_DRIVER_SPECIFIC + 13) -#define SVGA_QUERY_NUM_CONST_UPDATES (PIPE_QUERY_DRIVER_SPECIFIC + 14) + SVGA_QUERY_NUM_DRAW_CALLS = PIPE_QUERY_DRIVER_SPECIFIC, + SVGA_QUERY_NUM_FALLBACKS, + SVGA_QUERY_NUM_FLUSHES, + SVGA_QUERY_NUM_VALIDATIONS, + SVGA_QUERY_MAP_BUFFER_TIME, + SVGA_QUERY_NUM_RESOURCES_MAPPED, + SVGA_QUERY_NUM_BYTES_UPLOADED, + SVGA_QUERY_COMMAND_BUFFER_SIZE, + SVGA_QUERY_FLUSH_TIME, + SVGA_QUERY_SURFACE_WRITE_FLUSHES, + SVGA_QUERY_NUM_READBACKS, + SVGA_QUERY_NUM_RESOURCE_UPDATES, + SVGA_QUERY_NUM_BUFFER_UPLOADS, + SVGA_QUERY_NUM_CONST_BUF_UPDATES, + SVGA_QUERY_NUM_CONST_UPDATES, /* running total counters */ -#define SVGA_QUERY_MEMORY_USED (PIPE_QUERY_DRIVER_SPECIFIC + 15) -#define SVGA_QUERY_NUM_SHADERS (PIPE_QUERY_DRIVER_SPECIFIC + 16) -#define SVGA_QUERY_NUM_RESOURCES (PIPE_QUERY_DRIVER_SPECIFIC + 17) -#define SVGA_QUERY_NUM_STATE_OBJECTS (PIPE_QUERY_DRIVER_SPECIFIC + 18) -#define SVGA_QUERY_NUM_SURFACE_VIEWS (PIPE_QUERY_DRIVER_SPECIFIC + 19) -#define SVGA_QUERY_NUM_GENERATE_MIPMAP (PIPE_QUERY_DRIVER_SPECIFIC + 20) + SVGA_QUERY_MEMORY_USED, + SVGA_QUERY_NUM_SHADERS, + SVGA_QUERY_NUM_RESOURCES, + SVGA_QUERY_NUM_STATE_OBJECTS, + SVGA_QUERY_NUM_SURFACE_VIEWS, + SVGA_QUERY_NUM_GENERATE_MIPMAP, + /*SVGA_QUERY_MAX has to be last because it is size of an array*/ -#define SVGA_QUERY_MAX (PIPE_QUERY_DRIVER_SPECIFIC + 21) + SVGA_QUERY_MAX +}; /** * Maximum supported number of constant buffers per shader |