mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
draw: Implement TGSI_OPCODE_TRUNC.
This commit is contained in:
parent
502974b345
commit
5a0299875c
1 changed files with 14 additions and 0 deletions
|
|
@ -1632,6 +1632,17 @@ static boolean emit_SUB( struct aos_compilation *cp, const struct tgsi_full_inst
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean emit_TRUNC( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
|
||||
{
|
||||
struct x86_reg arg0 = fetch_src(cp, &op->FullSrcRegisters[0]);
|
||||
struct x86_reg tmp0 = aos_get_xmm_reg(cp);
|
||||
|
||||
sse2_cvttps2dq(cp->func, tmp0, arg0);
|
||||
sse2_cvtdq2ps(cp->func, tmp0, tmp0);
|
||||
|
||||
store_dest(cp, &op->FullDstRegisters[0], tmp0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean emit_XPD( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
|
||||
{
|
||||
|
|
@ -1770,6 +1781,9 @@ emit_instruction( struct aos_compilation *cp,
|
|||
case TGSI_OPCODE_SIN:
|
||||
return emit_SIN(cp, inst);
|
||||
|
||||
case TGSI_OPCODE_TRUNC:
|
||||
return emit_TRUNC(cp, inst);
|
||||
|
||||
case TGSI_OPCODE_END:
|
||||
return TRUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue