diff options
author | Michel Dänzer <[email protected]> | 2014-01-09 16:10:49 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2014-01-29 11:07:35 +0900 |
commit | 8afde9fa23db6ac1802f7a2c74123f10db96f552 (patch) | |
tree | fcdc2b0435bb9d28fd030acd533cf19e40bf1690 /src/gallium/drivers/radeonsi/si_shader.h | |
parent | 28630713b2773a362f06be91818593e310215288 (diff) |
radeonsi: Take GS into account for VS state in more places
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index d11d34646ac..63c19ecaeef 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -183,6 +183,14 @@ struct si_pipe_shader { union si_shader_key key; }; +static inline struct si_shader* si_get_vs_state(struct si_context *sctx) +{ + if (sctx->gs_shader) + return &sctx->gs_shader->current->gs_copy_shader->shader; + else + return &sctx->vs_shader->current->shader; +} + /* radeonsi_shader.c */ int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader); int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader); |