* that's handled by the output_offset field.
*/
fse->key.element[vs_output].out.format = output_format;
+ fse->key.element[vs_output].out.vs_output = vs_output;
fse->key.element[vs_output].out.offset = dst_offset;
dst_offset += emit_sz;
struct draw_context;
struct pipe_shader_state;
-struct draw_vs_input
+struct draw_varient_input
{
enum pipe_format format;
unsigned buffer;
unsigned offset;
};
-struct draw_vs_output
+struct draw_varient_output
{
- enum pipe_format format;
- unsigned offset;
+ enum pipe_format format; /* output format */
+ unsigned vs_output:8; /* which vertex shader output is this? */
+ unsigned offset:24; /* offset into output vertex */
};
-struct draw_vs_element {
- struct draw_vs_input in;
- struct draw_vs_output out;
+struct draw_varient_element {
+ struct draw_varient_input in;
+ struct draw_varient_output out;
};
struct draw_vs_varient_key {
unsigned viewport:1;
unsigned clip:1;
unsigned pad:5;
- struct draw_vs_element element[PIPE_MAX_ATTRIBS];
+ struct draw_varient_element element[PIPE_MAX_ATTRIBS];
};
struct draw_vs_varient;
static INLINE int draw_vs_varient_keysize( const struct draw_vs_varient_key *key )
{
- return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_vs_element);
+ return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_varient_element);
}
static INLINE int draw_vs_varient_key_compare( const struct draw_vs_varient_key *a,
for (i = 0; i < cp->vaos->base.key.nr_outputs; i++) {
unsigned format = cp->vaos->base.key.element[i].out.format;
unsigned offset = cp->vaos->base.key.element[i].out.offset;
+ unsigned vs_output = cp->vaos->base.key.element[i].out.vs_output;
struct x86_reg data = aos_get_shader_reg( cp,
TGSI_FILE_OUTPUT,
- i );
+ vs_output );
if (data.file != file_XMM) {
struct x86_reg tmp = aos_get_xmm_reg( cp );