dst[0] = ir3_DSX(b, src[0], 0);
dst[0]->cat5.type = TYPE_F32;
break;
+ case nir_op_fddx_fine:
+ dst[0] = ir3_DSXPP_1(b, src[0], 0);
+ dst[0]->cat5.type = TYPE_F32;
+ break;
case nir_op_fddy:
case nir_op_fddy_coarse:
dst[0] = ir3_DSY(b, src[0], 0);
dst[0]->cat5.type = TYPE_F32;
break;
break;
+ case nir_op_fddy_fine:
+ dst[0] = ir3_DSYPP_1(b, src[0], 0);
+ dst[0]->cat5.type = TYPE_F32;
+ break;
case nir_op_flt16:
case nir_op_flt32:
dst[0] = ir3_CMPS_F(b, src[0], 0, src[1], 0);
list_addtail(&n->node, &block->instr_list);
}
+ if (n->opc == OPC_DSXPP_1 || n->opc == OPC_DSYPP_1) {
+ struct ir3_instruction *op_p = ir3_instr_clone(n);
+ op_p->flags = IR3_INSTR_P;
+
+ ctx->so->need_fine_derivatives = true;
+ }
+
if (is_sfu(n))
regmask_set(&state->needs_ss, n->regs[0]);
A6XX_SP_VS_CTRL_REG0_BRANCHSTACK(vs->branchstack);
if (vs->need_pixlod)
sp_vs_ctrl |= A6XX_SP_VS_CTRL_REG0_PIXLODENABLE;
+ if (vs->need_fine_derivatives)
+ sp_vs_ctrl |= A6XX_SP_VS_CTRL_REG0_DIFF_FINE;
uint32_t sp_vs_config = A6XX_SP_VS_CONFIG_NTEX(shader->texture_map.num_desc) |
A6XX_SP_VS_CONFIG_NSAMP(shader->sampler_map.num_desc);
sp_fs_ctrl |= A6XX_SP_FS_CTRL_REG0_VARYING;
if (fs->need_pixlod)
sp_fs_ctrl |= A6XX_SP_FS_CTRL_REG0_PIXLODENABLE;
+ if (fs->need_fine_derivatives)
+ sp_fs_ctrl |= A6XX_SP_FS_CTRL_REG0_DIFF_FINE;
uint32_t sp_fs_config = A6XX_SP_FS_CONFIG_NTEX(shader->texture_map.num_desc) |
A6XX_SP_FS_CONFIG_NSAMP(shader->sampler_map.num_desc) |
A6XX_SP_CS_CTRL_REG0_FULLREGFOOTPRINT(v->info.max_reg + 1) |
A6XX_SP_CS_CTRL_REG0_MERGEDREGS |
A6XX_SP_CS_CTRL_REG0_BRANCHSTACK(v->branchstack) |
- COND(v->need_pixlod, A6XX_SP_CS_CTRL_REG0_PIXLODENABLE));
+ COND(v->need_pixlod, A6XX_SP_CS_CTRL_REG0_PIXLODENABLE) |
+ COND(v->need_fine_derivatives, A6XX_SP_CS_CTRL_REG0_DIFF_FINE));
tu_cs_emit_pkt4(cs, REG_A6XX_SP_CS_UNKNOWN_A9B1, 1);
tu_cs_emit(cs, 0x41);