[Mesa-dev] [PATCH 5/9] i965: Add support for emitting the LRP instruction.

Matt Turner mattst88 at gmail.com
Tue Feb 19 17:03:10 PST 2013


From: Kenneth Graunke <kenneth at whitecape.org>

Like MAD, this is another three-source instruction.

Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
 src/mesa/drivers/dri/i965/brw_defines.h |    1 +
 src/mesa/drivers/dri/i965/brw_disasm.c  |    1 +
 src/mesa/drivers/dri/i965/brw_eu.h      |    1 +
 src/mesa/drivers/dri/i965/brw_eu_emit.c |    1 +
 4 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 79cc12f..d0794c8 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -685,6 +685,7 @@ enum opcode {
    BRW_OPCODE_LINE =	89,
    BRW_OPCODE_PLN =	90,
    BRW_OPCODE_MAD =	91,
+   BRW_OPCODE_LRP =	92,
    BRW_OPCODE_NOP =	126,
 
    /* These are compiler backend opcodes that get translated into other
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 50551f4..8736764 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -50,6 +50,7 @@ const struct opcode_desc opcode_descs[128] = {
     [BRW_OPCODE_LINE] = { .name = "line", .nsrc = 2, .ndst = 1 },
     [BRW_OPCODE_PLN] = { .name = "pln", .nsrc = 2, .ndst = 1 },
     [BRW_OPCODE_MAD] = { .name = "mad", .nsrc = 3, .ndst = 1 },
+    [BRW_OPCODE_LRP] = { .name = "lrp", .nsrc = 3, .ndst = 1 },
     [BRW_OPCODE_SAD2] = { .name = "sad2", .nsrc = 2, .ndst = 1 },
     [BRW_OPCODE_SADA2] = { .name = "sada2", .nsrc = 2, .ndst = 1 },
     [BRW_OPCODE_DP4] = { .name = "dp4", .nsrc = 2, .ndst = 1 },
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index adb3c4d..b6e2bee 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -174,6 +174,7 @@ ALU2(DP3)
 ALU2(DP2)
 ALU2(LINE)
 ALU2(PLN)
+ALU3(LRP)
 ALU3(MAD)
 
 ROUND(RNDZ)
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index f2dcbeb..8cdbb21 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -924,6 +924,7 @@ ALU2(DP2)
 ALU2(LINE)
 ALU2(PLN)
 ALU3(MAD)
+ALU3(LRP)
 
 ROUND(RNDZ)
 ROUND(RNDE)
-- 
1.7.8.6



More information about the mesa-dev mailing list