diff options
author | Jakob Bornecrantz <[email protected]> | 2010-05-12 14:38:20 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-05-12 20:15:23 +0100 |
commit | 21b668e11e3e0e84d476fea9b8d3198a610d71c8 (patch) | |
tree | 975d7201ffac33aabf0bef749ef807b408d15ff8 /src/gallium/drivers/rbug/rbug_core.c | |
parent | 2c3fb4ecce27f4c2468892241216a06fc77143c4 (diff) |
rbug: Fix shaders
Diffstat (limited to 'src/gallium/drivers/rbug/rbug_core.c')
-rw-r--r-- | src/gallium/drivers/rbug/rbug_core.c | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c index c0b1d97f460..13aa95a59b7 100644 --- a/src/gallium/drivers/rbug/rbug_core.c +++ b/src/gallium/drivers/rbug/rbug_core.c @@ -97,53 +97,71 @@ rbug_get_shader_locked(struct rbug_context *rb_context, rbug_shader_t shdr) static void * rbug_shader_create_locked(struct pipe_context *pipe, - struct rbug_shader *tr_shdr, + struct rbug_shader *rb_shader, struct tgsi_token *tokens) { void *state = NULL; struct pipe_shader_state pss = { 0 }; pss.tokens = tokens; -#if 0 - if (tr_shdr->type == TRACE_SHADER_FRAGMENT) { + switch(rb_shader->type) { + case RBUG_SHADER_FRAGMENT: state = pipe->create_fs_state(pipe, &pss); - } else if (tr_shdr->type == TRACE_SHADER_VERTEX) { + break; + case RBUG_SHADER_VERTEX: state = pipe->create_vs_state(pipe, &pss); - } else + break; + case RBUG_SHADER_GEOM: + state = pipe->create_gs_state(pipe, &pss); + break; + default: assert(0); -#endif + break; + } return state; } static void rbug_shader_bind_locked(struct pipe_context *pipe, - struct rbug_shader *tr_shdr, + struct rbug_shader *rb_shader, void *state) { -#if 0 - if (tr_shdr->type == TRACE_SHADER_FRAGMENT) { + switch(rb_shader->type) { + case RBUG_SHADER_FRAGMENT: pipe->bind_fs_state(pipe, state); - } else if (tr_shdr->type == TRACE_SHADER_VERTEX) { + break; + case RBUG_SHADER_VERTEX: pipe->bind_vs_state(pipe, state); - } else + break; + case RBUG_SHADER_GEOM: + pipe->bind_gs_state(pipe, state); + break; + default: assert(0); -#endif + break; + } } static void rbug_shader_delete_locked(struct pipe_context *pipe, - struct rbug_shader *tr_shdr, + struct rbug_shader *rb_shader, void *state) { -#if 0 - if (tr_shdr->type == TRACE_SHADER_FRAGMENT) { + switch(rb_shader->type) { + case RBUG_SHADER_FRAGMENT: pipe->delete_fs_state(pipe, state); - } else if (tr_shdr->type == TRACE_SHADER_VERTEX) { + break; + case RBUG_SHADER_VERTEX: pipe->delete_vs_state(pipe, state); - } else + break; + case RBUG_SHADER_GEOM: + pipe->delete_gs_state(pipe, state); + break; + default: assert(0); -#endif + break; + } } /************************************************ |