From 533bf171d4c926e4ab6fcd0d51396b195b9e024f Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sat, 5 Mar 2011 14:41:08 +0100 Subject: nv50: support the InstanceID system value --- src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium/drivers/nv50/nv50_tgsi_to_nc.c') diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c index 54b78e850ed..1449cb04c69 100644 --- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c +++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c @@ -1159,6 +1159,13 @@ emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn, case TGSI_FILE_PREDICATE: res = bld_fetch_global(bld, &bld->pvs[idx][swz]); break; + case TGSI_FILE_SYSTEM_VALUE: + res = new_value(bld->pc, bld->ti->input_file, NV_TYPE_U32); + res->reg.id = bld->ti->sysval_map[idx]; + res = bld_insn_1(bld, NV_OP_LDA, res); + res = bld_insn_1(bld, NV_OP_CVT, res); + res->reg.type = NV_TYPE_F32; + break; default: NOUVEAU_ERR("illegal/unhandled src reg file: %d\n", src->Register.File); abort(); -- cgit v1.2.3