nv50: hack of a TEX opcode
authorBen Skeggs <skeggsb@gmail.com>
Mon, 16 Jun 2008 08:56:39 +0000 (18:56 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Sun, 29 Jun 2008 05:46:18 +0000 (15:46 +1000)
src/gallium/drivers/nv50/nv50_program.c
src/gallium/drivers/nv50/nv50_screen.c

index fa5e24d3e901662ce2fc3e927779b236656c16f3..21945410b172f6e5861d8f44c4501a285b808030 100644 (file)
@@ -1134,6 +1134,25 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
                }
                break;
        case TGSI_OPCODE_TEX:
+               {
+                       struct nv50_reg *t0, *t1;
+                       struct nv50_program_exec *e;
+
+                       t0 = alloc_temp(pc, NULL);
+                       t0 = alloc_temp(pc, NULL);
+                       t1 = alloc_temp(pc, NULL);
+                       emit_mov(pc, t0, src[0][0]);
+                       emit_mov(pc, t1, src[0][1]);
+
+                       e = exec(pc);
+                       e->inst[0] = 0xf0400000;
+                       set_long(pc, e);
+                       e->inst[1] |= 0x0000c004;
+                       set_dst(pc, t0, e);
+                       emit(pc, e);
+                       free_temp(pc, t0);
+                       free_temp(pc, t1);
+               }
                break;
        case TGSI_OPCODE_XPD:
                temp = alloc_temp(pc, NULL);
index b9cecb77f1fa81457a04ce111f986b46f768c29f..8affb0f073f5b1c41fe92fe923111aa3009aa23a 100644 (file)
@@ -289,6 +289,11 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
        so_data  (so, fui(0.0));
        so_data  (so, fui(1.0));
 
+       so_method(so, screen->tesla, 0x1234, 1);
+       so_data  (so, 1);
+       so_method(so, screen->tesla, 0x1458, 1);
+       so_data  (so, 1);
+
        so_emit(nvws, so);
        so_ref(NULL, &so);
        nvws->push_flush(nvws, 0, NULL);