summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_tgsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi.h')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h
index 214e113aaaa..01367e971da 100644
--- a/src/gallium/drivers/svga/svga_tgsi.h
+++ b/src/gallium/drivers/svga/svga_tgsi.h
@@ -30,6 +30,13 @@
#include "svga_hw_reg.h"
+
+/**
+ * We use a 32-bit mask to keep track of the generic indexes.
+ */
+#define MAX_GENERIC_VARYING 32
+
+
struct svga_fragment_shader;
struct svga_vertex_shader;
struct svga_shader;
@@ -39,6 +46,7 @@ struct tgsi_token;
struct svga_vs_compile_key
{
+ unsigned fs_generic_inputs;
unsigned zero_stride_vertex_elements;
unsigned need_prescale:1;
unsigned allow_psiz:1;
@@ -67,9 +75,10 @@ struct svga_fs_compile_key
} tex[PIPE_MAX_SAMPLERS];
};
-union svga_compile_key {
+struct svga_compile_key {
struct svga_vs_compile_key vkey;
struct svga_fs_compile_key fkey;
+ int8_t generic_remap_table[MAX_GENERIC_VARYING];
};
struct svga_shader_result
@@ -78,7 +87,7 @@ struct svga_shader_result
/* Parameters used to generate this compilation result:
*/
- union svga_compile_key key;
+ struct svga_compile_key key;
/* Compiled shader tokens:
*/
@@ -140,4 +149,18 @@ svga_translate_vertex_program( const struct svga_vertex_shader *fs,
void svga_destroy_shader_result( struct svga_shader_result *result );
+unsigned
+svga_get_generic_inputs_mask(const struct tgsi_shader_info *info);
+
+unsigned
+svga_get_generic_outputs_mask(const struct tgsi_shader_info *info);
+
+void
+svga_remap_generics(unsigned generics_mask,
+ int8_t remap_table[MAX_GENERIC_VARYING]);
+
+int
+svga_remap_generic_index(const int8_t remap_table[MAX_GENERIC_VARYING],
+ int generic_index);
+
#endif