Mesa (master): nv50: support TGSI_OPCODE_CONT

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Thu Dec 24 04:37:16 PST 2009


Module: Mesa
Branch: master
Commit: b7b2226a75f1955da9bd4a28754b7eaebb01fed5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b7b2226a75f1955da9bd4a28754b7eaebb01fed5

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Thu Dec 24 13:35:55 2009 +0100

nv50: support TGSI_OPCODE_CONT

---

 src/gallium/drivers/nv50/nv50_program.c |    5 +++++
 src/gallium/drivers/nv50/nv50_screen.c  |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index ce3fa5f..a101ac0 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -2241,6 +2241,11 @@ nv50_program_tx_insn(struct nv50_pc *pc,
 			set_pred(pc, 0x6, 1, pc->p->exec_tail); /* @NSF */
 		}
 		break;
+	case TGSI_OPCODE_CONT:
+		assert(pc->loop_lvl > 0);
+		emit_branch(pc, -1, 0)->param.index =
+			pc->loop_pos[pc->loop_lvl - 1];
+		break;
 	case TGSI_OPCODE_COS:
 		if (mask & 8) {
 			emit_precossin(pc, temp, src[0][3]);
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 2435f65..5a1efd3 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -128,7 +128,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param)
 	case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
 		return 1;
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
-		return 0;
+		return 1;
 	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
 		return 1;
 	case NOUVEAU_CAP_HW_VTXBUF:



More information about the mesa-commit mailing list