diff options
author | Brian Paul <[email protected]> | 2012-08-09 20:59:44 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-08-16 09:01:31 -0600 |
commit | bef196c7929606bb8c7e9c06fe83a90fc0d95f09 (patch) | |
tree | 39df5082e2c4e0e5e8a3df0561d4f271c690c297 /src/gallium/auxiliary/draw/draw_gs.c | |
parent | df87fb59136eb302d72eac4b58fd8ffb25989ed5 (diff) |
draw: move tgsi-related state into a tgsi sub-struct
To better organize things a bit.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_gs.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 50a03ac95a5..b2b40871af7 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -45,15 +45,15 @@ boolean draw_gs_init( struct draw_context *draw ) { - draw->gs.machine = tgsi_exec_machine_create(); - if (!draw->gs.machine) + draw->gs.tgsi.machine = tgsi_exec_machine_create(); + if (!draw->gs.tgsi.machine) return FALSE; - draw->gs.machine->Primitives = align_malloc( + draw->gs.tgsi.machine->Primitives = align_malloc( MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16); - if (!draw->gs.machine->Primitives) + if (!draw->gs.tgsi.machine->Primitives) return FALSE; - memset(draw->gs.machine->Primitives, 0, + memset(draw->gs.tgsi.machine->Primitives, 0, MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector)); return TRUE; @@ -61,12 +61,12 @@ draw_gs_init( struct draw_context *draw ) void draw_gs_destroy( struct draw_context *draw ) { - if (!draw->gs.machine) + if (!draw->gs.tgsi.machine) return; - align_free(draw->gs.machine->Primitives); + align_free(draw->gs.tgsi.machine->Primitives); - tgsi_exec_machine_destroy(draw->gs.machine); + tgsi_exec_machine_destroy(draw->gs.tgsi.machine); } void @@ -121,7 +121,7 @@ draw_create_geometry_shader(struct draw_context *draw, gs->max_output_vertices = gs->info.properties[i].data[0]; } - gs->machine = draw->gs.machine; + gs->machine = draw->gs.tgsi.machine; if (gs) { @@ -483,7 +483,7 @@ void draw_geometry_shader_prepare(struct draw_geometry_shader *shader, if (shader && shader->machine->Tokens != shader->state.tokens) { tgsi_exec_machine_bind_shader(shader->machine, shader->state.tokens, - draw->gs.num_samplers, - draw->gs.samplers); + draw->gs.tgsi.num_samplers, + draw->gs.tgsi.samplers); } } |