diff options
author | Marek Olšák <[email protected]> | 2014-09-16 18:40:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-09-24 14:48:02 +0200 |
commit | 8c37c16cbc4fd84bbb648cac2189b02633e3f806 (patch) | |
tree | af84f8ff6b09769c36006d6ac4b10aaa0991491a /src/gallium/drivers/radeonsi/si_shader.h | |
parent | 07c0b4d9b779dd43fcd3cfc119b1dc0150ab07d2 (diff) |
radeonsi: merge si_pipe_shader into si_shader
One is part of the other anyway.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 68 |
1 files changed, 33 insertions, 35 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 9c6b2387ac1..3cc77570c31 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -110,10 +110,10 @@ struct si_shader_output { unsigned usage; }; -struct si_pipe_shader; +struct si_shader; struct si_pipe_shader_selector { - struct si_pipe_shader *current; + struct si_shader *current; struct tgsi_token *tokens; struct pipe_stream_output_info so; @@ -129,29 +129,6 @@ struct si_pipe_shader_selector { unsigned fs_write_all; }; -struct si_shader { - unsigned ninput; - struct si_shader_input input[40]; - - unsigned noutput; - struct si_shader_output output[40]; - - /* geometry shader properties */ - unsigned gs_input_prim; - unsigned gs_output_prim; - unsigned gs_max_out_vertices; - - unsigned nparam; - bool uses_instanceid; - bool fs_write_all; - bool vs_out_misc_write; - bool vs_out_point_size; - bool vs_out_edgeflag; - bool vs_out_layer; - unsigned nr_pos_exports; - unsigned clip_dist_write; -}; - union si_shader_key { struct { unsigned export_16bpc:8; @@ -169,11 +146,11 @@ union si_shader_key { } vs; }; -struct si_pipe_shader { +struct si_shader { struct si_pipe_shader_selector *selector; - struct si_pipe_shader *next_variant; - struct si_pipe_shader *gs_copy_shader; - struct si_shader shader; + struct si_shader *next_variant; + + struct si_shader *gs_copy_shader; struct si_pm4_state *pm4; struct r600_resource *bo; struct r600_resource *scratch_bo; @@ -187,21 +164,42 @@ struct si_pipe_shader { unsigned db_shader_control; unsigned cb_shader_mask; union si_shader_key key; + + unsigned ninput; + struct si_shader_input input[40]; + + unsigned noutput; + struct si_shader_output output[40]; + + /* geometry shader properties */ + unsigned gs_input_prim; + unsigned gs_output_prim; + unsigned gs_max_out_vertices; + + unsigned nparam; + bool uses_instanceid; + bool fs_write_all; + bool vs_out_misc_write; + bool vs_out_point_size; + bool vs_out_edgeflag; + bool vs_out_layer; + unsigned nr_pos_exports; + unsigned clip_dist_write; }; 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; + return sctx->gs_shader->current->gs_copy_shader; else - return &sctx->vs_shader->current->shader; + return sctx->vs_shader->current; } /* 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); -int si_compile_llvm(struct si_context *sctx, struct si_pipe_shader *shader, +int si_pipe_shader_create(struct pipe_context *ctx, struct si_shader *shader); +int si_pipe_shader_create(struct pipe_context *ctx, struct si_shader *shader); +int si_compile_llvm(struct si_context *sctx, struct si_shader *shader, LLVMModuleRef mod); -void si_pipe_shader_destroy(struct pipe_context *ctx, struct si_pipe_shader *shader); +void si_pipe_shader_destroy(struct pipe_context *ctx, struct si_shader *shader); #endif |