• Home
  • Raw
  • Download

Lines Matching refs:tg

589 generic_run_one(struct translate_generic *tg,  in generic_run_one()  argument
595 unsigned nr_attrs = tg->nr_attrib; in generic_run_one()
600 uint8_t *dst = (uint8_t *)vert + tg->attrib[attr].output_offset; in generic_run_one()
602 if (tg->attrib[attr].type == TRANSLATE_ELEMENT_NORMAL) { in generic_run_one()
607 if (tg->attrib[attr].instance_divisor) { in generic_run_one()
609 index += (instance_id / tg->attrib[attr].instance_divisor); in generic_run_one()
618 index = MIN2(index, tg->attrib[attr].max_index); in generic_run_one()
621 src = tg->attrib[attr].input_ptr + in generic_run_one()
622 (ptrdiff_t)tg->attrib[attr].input_stride * index; in generic_run_one()
624 copy_size = tg->attrib[attr].copy_size; in generic_run_one()
628 tg->attrib[attr].fetch(data, 0, src, 0, 1, 1); in generic_run_one()
634 tg->attrib[attr].input_ptr, in generic_run_one()
635 tg->attrib[attr].input_stride, in generic_run_one()
639 tg->attrib[attr].emit(data, dst); in generic_run_one()
642 if (likely(tg->attrib[attr].copy_size >= 0)) { in generic_run_one()
646 tg->attrib[attr].emit(data, dst); in generic_run_one()
663 struct translate_generic *tg = translate_generic(translate); in generic_run_elts() local
668 generic_run_one(tg, *elts++, start_instance, instance_id, vert); in generic_run_elts()
669 vert += tg->translate.key.output_stride; in generic_run_elts()
681 struct translate_generic *tg = translate_generic(translate); in generic_run_elts16() local
686 generic_run_one(tg, *elts++, start_instance, instance_id, vert); in generic_run_elts16()
687 vert += tg->translate.key.output_stride; in generic_run_elts16()
699 struct translate_generic *tg = translate_generic(translate); in generic_run_elts8() local
704 generic_run_one(tg, *elts++, start_instance, instance_id, vert); in generic_run_elts8()
705 vert += tg->translate.key.output_stride; in generic_run_elts8()
717 struct translate_generic *tg = translate_generic(translate); in generic_run() local
722 generic_run_one(tg, start + i, start_instance, instance_id, vert); in generic_run()
723 vert += tg->translate.key.output_stride; in generic_run()
736 struct translate_generic *tg = translate_generic(translate); in generic_set_buffer() local
739 for (i = 0; i < tg->nr_attrib; i++) { in generic_set_buffer()
740 if (tg->attrib[i].buffer == buf) { in generic_set_buffer()
741 tg->attrib[i].input_ptr = ((const uint8_t *)ptr + in generic_set_buffer()
742 tg->attrib[i].input_offset); in generic_set_buffer()
743 tg->attrib[i].input_stride = stride; in generic_set_buffer()
744 tg->attrib[i].max_index = max_index; in generic_set_buffer()
782 struct translate_generic *tg = CALLOC_STRUCT(translate_generic); in translate_generic_create() local
785 if (!tg) in translate_generic_create()
790 tg->translate.key = *key; in translate_generic_create()
791 tg->translate.release = generic_release; in translate_generic_create()
792 tg->translate.set_buffer = generic_set_buffer; in translate_generic_create()
793 tg->translate.run_elts = generic_run_elts; in translate_generic_create()
794 tg->translate.run_elts16 = generic_run_elts16; in translate_generic_create()
795 tg->translate.run_elts8 = generic_run_elts8; in translate_generic_create()
796 tg->translate.run = generic_run; in translate_generic_create()
806 tg->attrib[i].type = key->element[i].type; in translate_generic_create()
813 FREE(tg); in translate_generic_create()
818 tg->attrib[i].fetch = unpack->unpack_rgba; in translate_generic_create()
819 tg->attrib[i].buffer = key->element[i].input_buffer; in translate_generic_create()
820 tg->attrib[i].input_offset = key->element[i].input_offset; in translate_generic_create()
821 tg->attrib[i].instance_divisor = key->element[i].instance_divisor; in translate_generic_create()
823 tg->attrib[i].output_offset = key->element[i].output_offset; in translate_generic_create()
825 tg->attrib[i].copy_size = -1; in translate_generic_create()
826 if (tg->attrib[i].type == TRANSLATE_ELEMENT_INSTANCE_ID) { in translate_generic_create()
829 tg->attrib[i].copy_size = 4; in translate_generic_create()
835 tg->attrib[i].copy_size = format_desc->block.bits >> 3; in translate_generic_create()
838 if (tg->attrib[i].copy_size < 0) in translate_generic_create()
839 tg->attrib[i].emit = get_emit_func(key->element[i].output_format); in translate_generic_create()
841 tg->attrib[i].emit = NULL; in translate_generic_create()
844 tg->nr_attrib = key->nr_elements; in translate_generic_create()
846 return &tg->translate; in translate_generic_create()