diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-01-10 10:36:57 -0800 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-01-10 11:17:34 -0800 |
commit | 249374b85346663417fc09e4c1ad3c6fb908067b (patch) | |
tree | 503e582337fc17512550cce40eab71e2c383b898 | |
parent | 9d3db601c782805113e60ee7f6976184f2786427 (diff) |
r300g: Atomize UCP.
Meh.
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 4 |
5 files changed, 9 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index d16889de34..489f701e46 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -71,6 +71,7 @@ static void r300_destroy_context(struct pipe_context* context) } FREE(r300->blend_color_state.state); + FREE(r300->clip_state.state); FREE(r300->rs_block); FREE(r300->scissor_state); FREE(r300->vertex_info); @@ -119,6 +120,7 @@ static void r300_setup_atoms(struct r300_context* r300) make_empty_list(&r300->atom_list); R300_INIT_ATOM(blend); R300_INIT_ATOM(blend_color); + R300_INIT_ATOM(clip); } struct pipe_context* r300_create_context(struct pipe_screen* screen, @@ -170,6 +172,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300_shader_key_compare); r300->blend_color_state.state = CALLOC_STRUCT(r300_blend_color_state); + r300->clip_state.state = CALLOC_STRUCT(pipe_clip_state); r300->rs_block = CALLOC_STRUCT(r300_rs_block); r300->scissor_state = CALLOC_STRUCT(r300_scissor_state); r300->vertex_info = CALLOC_STRUCT(r300_vertex_info); diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index c916a860f6..3a54659df4 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -144,7 +144,6 @@ struct r300_ztop_state { uint32_t z_buffer_top; /* R300_ZB_ZTOP: 0x4f14 */ }; -#define R300_NEW_CLIP 0x00000004 #define R300_NEW_DSA 0x00000008 #define R300_NEW_FRAMEBUFFERS 0x00000010 #define R300_NEW_FRAGMENT_SHADER 0x00000020 @@ -287,7 +286,7 @@ struct r300_context { /* Blend color state. */ struct r300_atom blend_color_state; /* User clip planes. */ - struct pipe_clip_state clip_state; + struct r300_atom clip_state; /* Shader constants. */ struct r300_constant_buffer shader_constants[PIPE_SHADER_TYPES]; /* Depth, stencil, and alpha state. */ diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 5ae9c2a9bd..1517eed923 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -77,9 +77,9 @@ void r300_emit_blend_color_state(struct r300_context* r300, void* state) } } -void r300_emit_clip_state(struct r300_context* r300, - struct pipe_clip_state* clip) +void r300_emit_clip_state(struct r300_context* r300, void* state) { + struct pipe_clip_state* clip = (struct pipe_clip_state*)state; int i; struct r300_screen* r300screen = r300_screen(r300->context.screen); CS_LOCALS(r300); @@ -1069,11 +1069,6 @@ validate: } } - if (r300->dirty_state & R300_NEW_CLIP) { - r300_emit_clip_state(r300, &r300->clip_state); - r300->dirty_state &= ~R300_NEW_CLIP; - } - if (r300->dirty_state & R300_NEW_DSA) { r300_emit_dsa_state(r300, r300->dsa_state); r300->dirty_state &= ~R300_NEW_DSA; diff --git a/src/gallium/drivers/r300/r300_emit.h b/src/gallium/drivers/r300/r300_emit.h index 005a9d50b0..81b5f735ef 100644 --- a/src/gallium/drivers/r300/r300_emit.h +++ b/src/gallium/drivers/r300/r300_emit.h @@ -35,8 +35,7 @@ void r300_emit_blend_state(struct r300_context* r300, void* state); void r300_emit_blend_color_state(struct r300_context* r300, void* state); -void r300_emit_clip_state(struct r300_context* r300, - struct pipe_clip_state* clip); +void r300_emit_clip_state(struct r300_context* r300, void* state); void r300_emit_dsa_state(struct r300_context* r300, struct r300_dsa_state* dsa); diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 35d698b820..732292fdaf 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -364,8 +364,8 @@ static void r300_set_clip_state(struct pipe_context* pipe, struct r300_context* r300 = r300_context(pipe); if (r300_screen(pipe->screen)->caps->has_tcl) { - r300->clip_state = *state; - r300->dirty_state |= R300_NEW_CLIP; + memcpy(r300->clip_state.state, state, sizeof(struct pipe_clip_state)); + r300->clip_state.dirty = TRUE; } else { draw_flush(r300->draw); draw_set_clip_state(r300->draw, state); |