populate_consumer_input_sets(void *mem_ctx, exec_list *ir,
hash_table *consumer_inputs,
hash_table *consumer_interface_inputs,
- ir_variable *consumer_inputs_with_locations[MAX_VARYING])
+ ir_variable *consumer_inputs_with_locations[VARYING_SLOT_MAX])
{
memset(consumer_inputs_with_locations,
0,
- sizeof(consumer_inputs_with_locations[0]) * MAX_VARYING);
+ sizeof(consumer_inputs_with_locations[0]) * VARYING_SLOT_MAX);
foreach_list(node, ir) {
ir_variable *const input_var = ((ir_instruction *) node)->as_variable();
const ir_variable *output_var,
hash_table *consumer_inputs,
hash_table *consumer_interface_inputs,
- ir_variable *consumer_inputs_with_locations[MAX_VARYING])
+ ir_variable *consumer_inputs_with_locations[VARYING_SLOT_MAX])
{
ir_variable *input_var;
= hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
hash_table *consumer_interface_inputs
= hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
- ir_variable *consumer_inputs_with_locations[MAX_VARYING] = {
+ ir_variable *consumer_inputs_with_locations[VARYING_SLOT_MAX] = {
NULL,
};
populate_consumer_input_sets(void *mem_ctx, exec_list *ir,
hash_table *consumer_inputs,
hash_table *consumer_interface_inputs,
- ir_variable *consumer_inputs_with_locations[MAX_VARYING]);
+ ir_variable *consumer_inputs_with_locations[VARYING_SLOT_MAX]);
ir_variable *
get_matching_input(void *mem_ctx,
const ir_variable *output_var,
hash_table *consumer_inputs,
hash_table *consumer_interface_inputs,
- ir_variable *consumer_inputs_with_locations[MAX_VARYING]);
+ ir_variable *consumer_inputs_with_locations[VARYING_SLOT_MAX]);
}
class link_varyings : public ::testing::Test {
hash_table *consumer_interface_inputs;
const glsl_type *simple_interface;
- ir_variable *junk[MAX_VARYING];
+ ir_variable *junk[VARYING_SLOT_MAX];
};
link_varyings::link_varyings()
consumer_interface_inputs,
junk));
- EXPECT_EQ((void *) clipdistance,
- hash_table_find(consumer_inputs, "gl_ClipDistance"));
- EXPECT_EQ(1u, num_elements(consumer_inputs));
+ EXPECT_EQ(clipdistance, junk[VARYING_SLOT_CLIP_DIST0]);
+ EXPECT_TRUE(is_empty(consumer_inputs));
EXPECT_TRUE(is_empty(consumer_interface_inputs));
}