diff options
author | Marek Olšák <[email protected]> | 2010-06-25 02:37:06 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-06-27 15:13:08 +0200 |
commit | 8959f48bce61dd92d23e91a2ca747f37dafd1301 (patch) | |
tree | 55d41f89a2677fd828e0513feaeac3ed43c7aed6 /src/gallium/drivers/r300/r300_context.c | |
parent | fcacc6a076ee5bc894eb7f5a7943715ff1ddf9ee (diff) |
r300g: initialize some crucial state in the first CS
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index dcd24021bc6..ff25f3b88ae 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -186,6 +186,14 @@ static void r300_setup_atoms(struct r300_context* r300) r300->pvs_flush.allow_null_state = TRUE; r300->query_start.allow_null_state = TRUE; r300->texture_cache_inval.allow_null_state = TRUE; + + /* Some states must be marked dirty here to properly set up + * hardware in the first command stream. */ + r300->invariant_state.dirty = TRUE; + r300->pvs_flush.dirty = TRUE; + r300->vap_invariant_state.dirty = TRUE; + r300->texture_cache_inval.dirty = TRUE; + r300->textures_state.dirty = TRUE; } /* Not every state tracker calls every driver function before the first draw @@ -291,8 +299,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300_init_state_functions(r300); r300_init_resource_functions(r300); - r300->invariant_state.dirty = TRUE; - rws->set_flush_cb(r300->rws, r300_flush_cb, r300); r300->dirty_hw++; @@ -337,11 +343,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->context.create_sampler_view(&r300->context, tex, &vtempl); pipe_resource_reference(&tex, NULL); - - /* This will make sure that the dummy texture is set up - * from the beginning even if an application does not use - * textures. */ - r300->textures_state.dirty = TRUE; } return &r300->context; |