gallium: add some more double opcodes to avoid unnecessary lowering
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
1759689d18
commit
12dedca523
|
@ -257,6 +257,11 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
|
|||
{ 1, 1, 0, 0, 0, 0, COMP, "D2U", TGSI_OPCODE_D2U },
|
||||
{ 1, 1, 0, 0, 0, 0, COMP, "U2D", TGSI_OPCODE_U2D },
|
||||
{ 1, 1, 0, 0 ,0, 0, COMP, "DRSQ", TGSI_OPCODE_DRSQ },
|
||||
{ 1, 1, 0, 0, 0, 0, COMP, "DTRUNC", TGSI_OPCODE_DTRUNC },
|
||||
{ 1, 1, 0, 0, 0, 0, COMP, "DCEIL", TGSI_OPCODE_DCEIL },
|
||||
{ 1, 1, 0, 0, 0, 0, COMP, "DFLR", TGSI_OPCODE_DFLR },
|
||||
{ 1, 1, 0, 0, 0, 0, COMP, "DROUND", TGSI_OPCODE_DROUND },
|
||||
{ 1, 1, 0, 0, 0, 0, COMP, "DSSG", TGSI_OPCODE_DSSG },
|
||||
};
|
||||
|
||||
const struct tgsi_opcode_info *
|
||||
|
|
|
@ -1861,6 +1861,45 @@ two-component vectors with doubled precision in each component.
|
|||
|
||||
dst.zw = src.zw - \lfloor src.zw\rfloor
|
||||
|
||||
.. opcode:: DTRUNC - Truncate
|
||||
|
||||
.. math::
|
||||
|
||||
dst.xy = trunc(src.xy)
|
||||
|
||||
dst.zw = trunc(src.zw)
|
||||
|
||||
.. opcode:: DCEIL - Ceiling
|
||||
|
||||
.. math::
|
||||
|
||||
dst.xy = \lceil src.xy\rceil
|
||||
|
||||
dst.zw = \lceil src.zw\rceil
|
||||
|
||||
.. opcode:: DFLR - Floor
|
||||
|
||||
.. math::
|
||||
|
||||
dst.xy = \lfloor src.xy\rfloor
|
||||
|
||||
dst.zw = \lfloor src.zw\rfloor
|
||||
|
||||
.. opcode:: DROUND - Fraction
|
||||
|
||||
.. math::
|
||||
|
||||
dst.xy = round(src.xy)
|
||||
|
||||
dst.zw = round(src.zw)
|
||||
|
||||
.. opcode:: DSSG - Set Sign
|
||||
|
||||
.. math::
|
||||
|
||||
dst.xy = (src.xy > 0) ? 1.0 : (src.xy < 0) ? -1.0 : 0.0
|
||||
|
||||
dst.zw = (src.zw > 0) ? 1.0 : (src.zw < 0) ? -1.0 : 0.0
|
||||
|
||||
.. opcode:: DFRACEXP - Convert Number to Fractional and Integral Components
|
||||
|
||||
|
|
|
@ -519,7 +519,12 @@ struct tgsi_property_data {
|
|||
#define TGSI_OPCODE_D2U 215
|
||||
#define TGSI_OPCODE_U2D 216
|
||||
#define TGSI_OPCODE_DRSQ 217 /* eg, cayman also has DRSQ */
|
||||
#define TGSI_OPCODE_LAST 218
|
||||
#define TGSI_OPCODE_DTRUNC 218 /* nvc0 */
|
||||
#define TGSI_OPCODE_DCEIL 219 /* nvc0 */
|
||||
#define TGSI_OPCODE_DFLR 220 /* nvc0 */
|
||||
#define TGSI_OPCODE_DROUND 221 /* nvc0 */
|
||||
#define TGSI_OPCODE_DSSG 222
|
||||
#define TGSI_OPCODE_LAST 223
|
||||
|
||||
#define TGSI_SAT_NONE 0 /* do not saturate */
|
||||
#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */
|
||||
|
|
Loading…
Reference in New Issue