parent
9d3db601c7
commit
249374b853
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue