diff options
author | Marek Olšák <[email protected]> | 2010-06-13 03:25:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-06-13 17:43:38 +0200 |
commit | 9dd50993c6540729fe7c7397b4a947b3068db162 (patch) | |
tree | 2555c82be49a31a4c1424300ffd839863cdd18ae /src/gallium/drivers/r300/r300_context.c | |
parent | cd891648d45189555bace1bca6b7cddef5857f02 (diff) |
r300g: turn blend color into a CB
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 43e567c4328..aac3660207f 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -164,6 +164,19 @@ static void r300_setup_atoms(struct r300_context* r300) r300->texture_cache_inval.allow_null_state = TRUE; } +/* Not every state tracker calls every driver function before the first draw + * call and we must initialize the command buffers somehow. */ +static void r300_init_states(struct pipe_context *pipe) +{ + struct pipe_blend_color bc = {{0}}; + struct pipe_clip_state cs = {{{0}}}; + struct pipe_scissor_state ss = {0}; + + pipe->set_blend_color(pipe, &bc); + pipe->set_clip_state(pipe, &cs); + pipe->set_scissor_state(pipe, &ss); +} + struct pipe_context* r300_create_context(struct pipe_screen* screen, void *priv) { @@ -231,6 +244,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->tran.translate_cache = translate_cache_create(); + r300_init_states(&r300->context); + return &r300->context; no_upload_ib: |