summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h45
1 files changed, 26 insertions, 19 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 086633f732..30b80fa9db 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -23,21 +23,10 @@
#ifndef R300_CONTEXT_H
#define R300_CONTEXT_H
-#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"
-#include "r300_screen.h"
-#include "r300_winsys.h"
-
struct r300_fragment_shader;
struct r300_vertex_shader;
@@ -62,7 +51,6 @@ struct r300_dsa_state {
uint32_t z_buffer_control; /* R300_ZB_CNTL: 0x4f00 */
uint32_t z_stencil_control; /* R300_ZB_ZSTENCILCNTL: 0x4f04 */
uint32_t stencil_ref_mask; /* R300_ZB_STENCILREFMASK: 0x4f08 */
- uint32_t z_buffer_top; /* R300_ZB_ZTOP: 0x4f14 */
uint32_t stencil_ref_bf; /* R500_ZB_STENCILREFMASK_BF: 0x4fd4 */
};
@@ -124,6 +112,10 @@ struct r300_viewport_state {
uint32_t vte_control; /* R300_VAP_VTE_CNTL: 0x20b0 */
};
+struct r300_ztop_state {
+ uint32_t z_buffer_top; /* R300_ZB_ZTOP: 0x4f14 */
+};
+
#define R300_NEW_BLEND 0x00000001
#define R300_NEW_BLEND_COLOR 0x00000002
#define R300_NEW_CLIP 0x00000004
@@ -141,7 +133,8 @@ struct r300_viewport_state {
#define R300_NEW_VERTEX_FORMAT 0x04000000
#define R300_NEW_VERTEX_SHADER 0x08000000
#define R300_NEW_VIEWPORT 0x10000000
-#define R300_NEW_KITCHEN_SINK 0x1fffffff
+#define R300_NEW_QUERY 0x20000000
+#define R300_NEW_KITCHEN_SINK 0x3fffffff
/* The next several objects are not pure Radeon state; they inherit from
* various Gallium classes. */
@@ -172,6 +165,10 @@ struct r300_query {
unsigned int count;
/* The offset of this query into the query buffer, in bytes. */
unsigned offset;
+ /* if we've flushed the query */
+ boolean flushed;
+ /* if begin has been emitted */
+ boolean begin_emitted;
/* Linked list members. */
struct r300_query* prev;
struct r300_query* next;
@@ -237,7 +234,14 @@ struct r300_context {
/* Occlusion query buffer. */
struct pipe_buffer* oqbo;
/* Query list. */
- struct r300_query* query_list;
+ struct r300_query *query_current;
+ struct r300_query query_list;
+
+ /* Shader hash table. Used to store vertex formatting information, which
+ * depends on the combination of both currently loaded shaders. */
+ struct util_hash_table* shader_hash_table;
+ /* Vertex formatting information. */
+ struct r300_vertex_format* vertex_info;
/* Various CSO state objects. */
/* Blend state. */
@@ -269,12 +273,16 @@ struct r300_context {
/* Vertex buffers for Gallium. */
struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
int vertex_buffer_count;
- /* Vertex information. */
- struct r300_vertex_format vertex_info;
+ /* Vertex elements for Gallium. */
+ struct pipe_vertex_element vertex_elements[PIPE_MAX_ATTRIBS];
+ int vertex_element_count;
/* Vertex shader. */
struct r300_vertex_shader* vs;
/* Viewport state. */
struct r300_viewport_state* viewport_state;
+ /* ZTOP state. */
+ struct r300_ztop_state ztop_state;
+
/* Bitmask of dirty state objects. */
uint32_t dirty_state;
/* Flag indicating whether or not the HW is dirty. */
@@ -312,9 +320,8 @@ void r300_init_surface_functions(struct r300_context* r300);
#define DBG_VP 0x0000004
#define DBG_CS 0x0000008
#define DBG_DRAW 0x0000010
-#define DBG_SURF 0x0000020
-#define DBG_TEX 0x0000040
-#define DBG_FALL 0x0000080
+#define DBG_TEX 0x0000020
+#define DBG_FALL 0x0000040
/*@}*/
static INLINE boolean DBG_ON(struct r300_context * ctx, unsigned flags)