diff options
author | Kenneth Graunke <[email protected]> | 2014-11-23 23:46:39 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-11-24 15:30:09 -0800 |
commit | b55777f39d00a0c54023eba012d326ff09fa530b (patch) | |
tree | 87761f4a6a985b8c98b9832d44e10302ea41ff68 /src/mesa/drivers/dri/i965 | |
parent | 62b425448ca92f568a571e656133e6d234434b4c (diff) |
i965: Make precompile functions accessible from C.
Previously, the prototypes for brw_vs/gs/fs_precompile were scattered
between brw_vs.h (C), brw_gs.h (C), and brw_fs.h (C++ only). Also,
brw_fs_precompile had C++ linkage, while the others were C.
This patch moves all the prototypes to a central location (brw_shader.h)
and makes brw_fs_precompile have C linkage.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 18 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.h | 3 |
5 files changed, 19 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index f3f69c46c2c..0ffb07fc8cd 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3748,7 +3748,7 @@ brw_wm_fs_emit(struct brw_context *brw, return g.get_assembly(final_assembly_size); } -bool +extern "C" bool brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *shader_prog, struct gl_program *prog) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index f558662064b..ee612079f2a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -797,8 +797,5 @@ private: bool brw_do_channel_expressions(struct exec_list *instructions); bool brw_do_vector_splitting(struct exec_list *instructions); -bool brw_fs_precompile(struct gl_context *ctx, - struct gl_shader_program *shader_prog, - struct gl_program *prog); struct brw_reg brw_reg_from_fs_reg(fs_reg *reg); diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h index 85228eb5e78..5a15fa92018 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.h +++ b/src/mesa/drivers/dri/i965/brw_gs.h @@ -34,9 +34,6 @@ struct gl_context; struct gl_shader_program; struct gl_program; -bool brw_gs_precompile(struct gl_context *ctx, - struct gl_shader_program *shader_prog, - struct gl_program *prog); bool brw_gs_prog_data_compare(const void *a, const void *b); #ifdef __cplusplus diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index cdf86ff3cee..05434a7f76e 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -192,3 +192,21 @@ enum brw_reg_type brw_type_for_base_type(const struct glsl_type *type); enum brw_conditional_mod brw_conditional_for_comparison(unsigned int op); uint32_t brw_math_function(enum opcode op); const char *brw_instruction_name(enum opcode op); + +#ifdef __cplusplus +extern "C" { +#endif + +bool brw_vs_precompile(struct gl_context *ctx, + struct gl_shader_program *shader_prog, + struct gl_program *prog); +bool brw_gs_precompile(struct gl_context *ctx, + struct gl_shader_program *shader_prog, + struct gl_program *prog); +bool brw_fs_precompile(struct gl_context *ctx, + struct gl_shader_program *shader_prog, + struct gl_program *prog); + +#ifdef __cplusplus +} +#endif diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h index 77792d99b47..f6e6b31f68b 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.h +++ b/src/mesa/drivers/dri/i965/brw_vs.h @@ -89,9 +89,6 @@ const unsigned *brw_vs_emit(struct brw_context *brw, struct brw_vs_prog_data *prog_data, void *mem_ctx, unsigned *program_size); -bool brw_vs_precompile(struct gl_context *ctx, - struct gl_shader_program *shader_prog, - struct gl_program *prog); void brw_vs_debug_recompile(struct brw_context *brw, struct gl_shader_program *prog, const struct brw_vs_prog_key *key); |