diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-02-16 03:33:56 -0800 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-02-16 04:12:41 -0800 |
commit | 1bb2fb498ee65ba29aa4098983116be3d81cc2da (patch) | |
tree | 6ddcfba4ee9caa1c6c80bf9622fe348eed1e867d /src | |
parent | cfae542d1f34d95ce6a740311d8331a74307d31f (diff) |
r300-gallium: Set up draw rasterizer.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 53e41bf76d..a3727c8fb4 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -59,6 +59,9 @@ struct r300_dsa_state { }; struct r300_rs_state { + /* XXX icky as fucking hell */ + struct pipe_rasterizer_state rs; + uint32_t vap_control_status; /* R300_VAP_CNTL_STATUS: 0x2140 */ uint32_t point_size; /* R300_GA_POINT_SIZE: 0x421c */ uint32_t line_control; /* R300_GA_LINE_CNTL: 0x4234 */ diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 559844f9b4..eae1a5698d 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -222,7 +222,7 @@ static void PIPE_BUFFER_USAGE_CPU_READ); memcpy(r300->shader_constants[shader].constants, map, buffer->buffer->size); - pipe->winsys->buffer_unmap(pipe->winsys, map); + pipe->winsys->buffer_unmap(pipe->winsys, buffer->buffer); r300->shader_constants[shader].user_count = buffer->buffer->size / (sizeof(float) * 4); @@ -542,6 +542,8 @@ static void* r300_create_rs_state(struct pipe_context* pipe, rs->line_stipple_value = state->line_stipple_pattern; } + rs->rs = *state; + return (void*)rs; } @@ -549,8 +551,11 @@ static void* r300_create_rs_state(struct pipe_context* pipe, static void r300_bind_rs_state(struct pipe_context* pipe, void* state) { struct r300_context* r300 = r300_context(pipe); + struct r300_rs_state* rs = (struct r300_rs_state*)state; + + draw_set_rasterizer_state(r300->draw, &rs->rs); - r300->rs_state = (struct r300_rs_state*)state; + r300->rs_state = rs; r300->dirty_state |= R300_NEW_RASTERIZER; } |