struct {
enum translate_element_type type;
- util_format_fetch_rgba_func_ptr fetch;
+ void (*fetch)(void *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
unsigned buffer;
unsigned input_offset;
unsigned instance_divisor;
if (likely(copy_size >= 0)) {
memcpy(dst, src, copy_size);
} else {
- tg->attrib[attr].fetch(data, src, 0, 0);
+ tg->attrib[attr].fetch(data, 0, src, 0, 1, 1);
if (0)
debug_printf("Fetch linear attr %d from %p stride %d index %d: "
for (i = 0; i < key->nr_elements; i++) {
const struct util_format_description *format_desc =
util_format_description(key->element[i].input_format);
+ const struct util_format_unpack_description *unpack =
+ util_format_unpack_description(key->element[i].input_format);
assert(format_desc);
}
}
- tg->attrib[i].fetch =
- util_format_fetch_rgba_func(key->element[i].input_format);
+ tg->attrib[i].fetch = unpack->unpack_rgba;
tg->attrib[i].buffer = key->element[i].input_buffer;
tg->attrib[i].input_offset = key->element[i].input_offset;
tg->attrib[i].instance_divisor = key->element[i].instance_divisor;