From 31e9ecd461674d979ce80537ba4cb9b453a35018 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 25 Jul 2014 16:46:42 -0400 Subject: [PATCH] gallium: add some more double opcodes to avoid unnecessary lowering Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/tgsi/tgsi_info.c | 6 ++++++ src/gallium/include/pipe/p_shader_tokens.h | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index d93ce97c2f9..816646c6465 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -257,6 +257,12 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] = { 1, 1, 0, 0, 0, 0, COMP, "I2D", TGSI_OPCODE_I2D }, { 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 * diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 3600956437a..a20ef73dd7b 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -509,7 +509,13 @@ struct tgsi_property_data { #define TGSI_OPCODE_I2D 215 #define TGSI_OPCODE_D2U 216 #define TGSI_OPCODE_U2D 217 -#define TGSI_OPCODE_LAST 218 +#define TGSI_OPCODE_DRSQ 218 /* nvc0 */ +#define TGSI_OPCODE_DTRUNC 219 /* nvc0 */ +#define TGSI_OPCODE_DCEIL 220 /* nvc0 */ +#define TGSI_OPCODE_DFLR 221 /* nvc0 */ +#define TGSI_OPCODE_DROUND 222 /* nvc0 */ +#define TGSI_OPCODE_DSSG 223 +#define TGSI_OPCODE_LAST 224 #define TGSI_SAT_NONE 0 /* do not saturate */ #define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */