diff options
author | Brian Paul <[email protected]> | 2014-01-18 03:45:41 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-01-23 08:22:58 -0700 |
commit | 2a30379dcdb9f643d97ba48811fddf90484a84f2 (patch) | |
tree | 2aec1bd9e1d978554483fc279db54f96a7eaf2fe /src/gallium/drivers/svga/svga_tgsi.h | |
parent | 35ddd2cc5d1b25d9ca7f2473f4523791e37ed385 (diff) |
svga: rename shader_result -> variant
To be more consisten with other parts of gallium. Plus, update/add
various comments.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi.h')
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h index 591dd6a3917..b32b7081e9a 100644 --- a/src/gallium/drivers/svga/svga_tgsi.h +++ b/src/gallium/drivers/svga/svga_tgsi.h @@ -74,6 +74,9 @@ struct svga_fs_compile_key } tex[PIPE_MAX_SAMPLERS]; }; +/** + * Key/index for identifying shader variants. + */ struct svga_compile_key { struct svga_vs_compile_key vkey; struct svga_fs_compile_key fkey; @@ -84,14 +87,13 @@ struct svga_compile_key { /** * A single TGSI shader may be compiled into different variants of * SVGA3D shaders depending on the compile key. Each user shader - * will have a linked list of these results. + * will have a linked list of these variants. */ -struct svga_shader_result +struct svga_shader_variant { const struct svga_shader *shader; - /* Parameters used to generate this compilation result: - */ + /** Parameters used to generate this variant */ struct svga_compile_key key; /* Compiled shader tokens: @@ -104,9 +106,8 @@ struct svga_shader_result */ unsigned id; - /* Next compilation result: - */ - struct svga_shader_result *next; + /** Next variant */ + struct svga_shader_variant *next; }; @@ -144,16 +145,17 @@ static INLINE unsigned svga_fs_key_size( const struct svga_fs_compile_key *key ) return (const char *)&key->tex[key->num_textures] - (const char *)key; } -struct svga_shader_result * +struct svga_shader_variant * svga_translate_fragment_program( const struct svga_fragment_shader *fs, const struct svga_fs_compile_key *fkey ); -struct svga_shader_result * +struct svga_shader_variant * svga_translate_vertex_program( const struct svga_vertex_shader *fs, const struct svga_vs_compile_key *vkey ); -void svga_destroy_shader_result( struct svga_shader_result *result ); +void +svga_destroy_shader_variant(struct svga_shader_variant *variant); unsigned svga_get_generic_inputs_mask(const struct tgsi_shader_info *info); |