Lines Matching defs:texture
282 unreachable("Invalid texture register");
1714 midgard_texture_word *texture = (midgard_texture_word *) word;
1715 ctx->midg_stats.helper_invocations |= midgard_op_has_helpers(texture->op);
1716 validate_sampler_type(texture->op, texture->sampler_type);
1718 /* Broad category of texture operation in question */
1719 print_texture_op(fp, texture->op);
1722 if (texture->op == midgard_tex_op_barrier) {
1725 } else if (texture->type == TAG_TEXTURE_4_BARRIER)
1727 else if (texture->type == TAG_TEXTURE_4_VTX)
1730 if (texture->op == midgard_tex_op_derivative)
1731 fprintf(fp, "%s", derivative_mode(texture->mode));
1733 fprintf(fp, "%s", texture_mode(texture->mode));
1736 print_texture_format(fp, texture->format);
1739 fputs(partial_exection_mode(texture->exec), fp);
1741 if (texture->out_of_order)
1742 fprintf(fp, ".ooo%u", texture->out_of_order);
1745 print_tex_reg(fp, out_reg_base + texture->out_reg_select, true);
1746 print_tex_mask(fp, texture->mask, texture->out_upper);
1747 fprintf(fp, ".%c%d", texture->sampler_type == MALI_SAMPLER_FLOAT ? 'f' : 'i',
1748 texture->out_full ? 32 : 16);
1749 assert(!(texture->out_full && texture->out_upper));
1751 /* Output modifiers are only valid for float texture operations */
1752 if (texture->sampler_type == MALI_SAMPLER_FLOAT)
1753 mir_print_outmod(fp, texture->outmod, false);
1760 if (texture->texture_register) {
1761 fprintf(fp, "texture[");
1762 print_texture_reg_select(fp, texture->texture_handle, in_reg_base);
1768 fprintf(fp, "texture%u, ", texture->texture_handle);
1769 update_stats(&ctx->midg_stats.texture_count, texture->texture_handle);
1773 fprintf(fp, "%csampler", sampler_type_name(texture->sampler_type));
1775 if (texture->sampler_register) {
1777 print_texture_reg_select(fp, texture->sampler_handle, in_reg_base);
1782 fprintf(fp, "%u", texture->sampler_handle);
1783 update_stats(&ctx->midg_stats.sampler_count, texture->sampler_handle);
1786 print_vec_swizzle(fp, texture->swizzle, midgard_src_passthrough, midgard_reg_mode_32, 0xFF);
1791 texture->in_reg_upper ? midgard_src_expand_high : midgard_src_passthrough;
1792 print_tex_reg(fp, in_reg_base + texture->in_reg_select, false);
1793 print_vec_swizzle(fp, texture->in_reg_swizzle, exp, midgard_reg_mode_32, 0xFF);
1794 fprintf(fp, ".%d", texture->in_reg_full ? 32 : 16);
1795 assert(!(texture->in_reg_full && texture->in_reg_upper));
1807 if (texture->offset_register) {
1810 bool full = texture->offset & 1;
1811 bool select = texture->offset & 2;
1812 bool upper = texture->offset & 4;
1813 unsigned swizzle = texture->offset >> 3;
1820 assert(!(texture->out_full && texture->out_upper));
1823 } else if (texture->offset) {
1826 signed offset_x = (texture->offset & 0xF);
1827 signed offset_y = ((texture->offset >> 4) & 0xF);
1828 signed offset_z = ((texture->offset >> 8) & 0xF);
1835 if (any_neg && texture->op != midgard_tex_op_fetch)
1845 char lod_operand = texture_op_takes_bias(texture->op) ? '+' : '=';
1847 if (texture->lod_register) {
1849 print_texture_reg_select(fp, texture->bias, in_reg_base);
1852 if (texture->bias_int)
1853 fprintf(fp, " /* bias_int = 0x%X */", texture->bias_int);
1854 } else if (texture->op == midgard_tex_op_fetch) {
1859 if (texture->bias_int)
1860 fprintf(fp, " /* bias_int = 0x%X */ ", texture->bias_int);
1862 fprintf(fp, "lod = %u, ", texture->bias);
1863 } else if (texture->bias || texture->bias_int) {
1864 signed bias_int = texture->bias_int;
1865 float bias_frac = texture->bias / 256.0f;
1868 bool is_bias = texture_op_takes_bias(texture->op);
1880 if (texture->unknown4 ||
1881 texture->unknown8) {
1882 fprintf(fp, "// unknown4 = 0x%x\n", texture->unknown4);
1883 fprintf(fp, "// unknown8 = 0x%x\n", texture->unknown8);