diff options
author | Corbin Simpson <[email protected]> | 2009-08-18 17:52:03 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-08-18 21:25:53 -0700 |
commit | a381ee82663f10ff3cdcfad331258d03d4188894 (patch) | |
tree | df3e675f8441e3ba5373d59ff471856a1b7cdfc5 /src/gallium/drivers/r300/r300_context.h | |
parent | 4092f318db440532f78a39c0444b987039c8f7f7 (diff) |
r300g: Massively cleanup OQ.
Still broken, but compiles cleaner, behaves better, etc.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index fc8a4498933..f78492d4aa9 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -25,9 +25,13 @@ #include "draw/draw_context.h" #include "draw/draw_vertex.h" + #include "pipe/p_context.h" + #include "tgsi/tgsi_scan.h" + #include "util/u_memory.h" +#include "util/u_simple_list.h" #include "r300_clear.h" #include "r300_query.h" @@ -150,6 +154,29 @@ struct r300_constant_buffer { unsigned count; }; +/* Query object. + * + * This is not a subclass of pipe_query because pipe_query is never + * actually fully defined. So, rather than have it as a member, and do + * subclass-style casting, we treat pipe_query as an opaque, and just + * trust that our state tracker does not ever mess up query objects. + */ +struct r300_query { + /* The kind of query. Currently only OQ is supported. */ + unsigned type; + /* Whether this query is currently active. Only active queries will + * get emitted into the command stream, and only active queries get + * tallied. */ + boolean active; + /* The current count of this query. Required to be at least 32 bits. */ + unsigned int count; + /* The offset of this query into the query buffer, in bytes. */ + unsigned offset; + /* Linked list members. */ + struct r300_query* prev; + struct r300_query* next; +}; + struct r300_texture { /* Parent class */ struct pipe_texture tex; @@ -203,6 +230,11 @@ struct r300_context { /* Offset into the VBO. */ size_t vbo_offset; + /* Occlusion query buffer. */ + struct pipe_buffer* oqbo; + /* Query list. */ + struct r300_query* query_list; + /* Various CSO state objects. */ /* Blend state. */ struct r300_blend_state* blend_state; |