Ilia Mirkin
2014-Jun-06  19:43 UTC
[Nouveau] [PATCH 1/3] gk110/ir: emit texbar the same way that the blob does
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedestkop.org>
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
index b8d0d3e..d566c99 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -967,7 +967,7 @@ void CodeEmitterGK110::emitSELP(const Instruction *i)
 
 void CodeEmitterGK110::emitTEXBAR(const Instruction *i)
 {
-   code[0] = 0x00000002 | (i->subOp << 23);
+   code[0] = 0x0000003e | (i->subOp << 23);
    code[1] = 0x77000000;
 
    emitPredicate(i);
-- 
1.8.5.5
Ilia Mirkin
2014-Jun-06  19:43 UTC
[Nouveau] [PATCH 2/3] gk110: add in forgotten code for gk110 isa
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
Pretty sure this was the cause of all the "invalid opcode" errors on
like 20%
of the piglit tests. Any time the 3d blit path was used, this would trigger.
 src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index ef40f87..c28ec6d 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -683,6 +683,15 @@ nvc0_blitter_make_vp(struct nvc0_blitter *blit)
       0x03f01c46, 0x0a7e0080, /* export b96 o[0x80] $r0:$r1:$r2 */
       0x00001de7, 0x80000000, /* exit */
    };
+   static const uint32_t code_gk110[] +   {
+      0x00000000, 0x08000000, /* sched */
+      0x401ffc12, 0x7ec7fc00, /* ld b64 $r4d a[0x80] 0x0 0x0 */
+      0x481ffc02, 0x7ecbfc00, /* ld b96 $r0t a[0x90] 0x0 0x0 */
+      0x381ffc12, 0x7f07fc00, /* st b64 a[0x70] $r4d 0x0 0x0 */
+      0x401ffc02, 0x7f0bfc00, /* st b96 a[0x80] $r0t 0x0 0x0 */
+      0x001c003c, 0x18000000, /* exit */
+   };
    static const uint32_t code_gm107[]     {
       0xfc0007e0, 0x001f8000, /* sched 0x7e0 0x7e0 0x7e0 */
@@ -700,6 +709,10 @@ nvc0_blitter_make_vp(struct nvc0_blitter *blit)
       blit->vp.code = (uint32_t *)code_gm107; /* const_cast */
       blit->vp.code_size = sizeof(code_gm107);
    } else
+   if (blit->screen->base.class_3d >= NVF0_3D_CLASS) {
+      blit->vp.code = (uint32_t *)code_gk110; /* const_cast */
+      blit->vp.code_size = sizeof(code_gk110);
+   } else
    if (blit->screen->base.class_3d >= NVE4_3D_CLASS) {
       blit->vp.code = (uint32_t *)code_nve4; /* const_cast */
       blit->vp.code_size = sizeof(code_nve4);
-- 
1.8.5.5
Ilia Mirkin
2014-Jun-06  19:43 UTC
[Nouveau] [PATCH 3/3] nvc0: don't bother trying to set up compute for gk110+
The nouveau fw currently prints a bunch of errors. No point in seeing
those all the time, esp since compute doesn't really work in the first
place.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 0537542..3e6b011 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -171,7 +171,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum
pipe_cap param)
    case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
       return 0;
    case PIPE_CAP_COMPUTE:
-      return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
+      return (class_3d == NVE4_3D_CLASS) ? 1 : 0;
    case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
       return 1;
    case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
@@ -214,7 +214,7 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen,
unsigned shader,
    case PIPE_SHADER_FRAGMENT:
       break;
    case PIPE_SHADER_COMPUTE:
-      if (class_3d < NVE4_3D_CLASS)
+      if (class_3d != NVE4_3D_CLASS)
          return 0;
       break;
    default:
@@ -528,9 +528,9 @@ nvc0_screen_init_compute(struct nvc0_screen *screen)
          return nvc0_screen_compute_setup(screen, screen->base.pushbuf);
       return 0;
    case 0xe0:
+      return nve4_screen_compute_setup(screen, screen->base.pushbuf);
    case 0xf0:
    case 0x100:
-      return nve4_screen_compute_setup(screen, screen->base.pushbuf);
    case 0x110:
       return 0;
    default:
-- 
1.8.5.5
Ben Skeggs
2014-Jun-06  22:20 UTC
[Nouveau] [PATCH 1/3] gk110/ir: emit texbar the same way that the blob does
On Sat, Jun 7, 2014 at 5:43 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> > Cc: "10.2" <mesa-stable at lists.freedestkop.org>For the series: Reviewed-by: Ben Skeggs <bskeggs at redhat.com>> --- > src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp > index b8d0d3e..d566c99 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp > @@ -967,7 +967,7 @@ void CodeEmitterGK110::emitSELP(const Instruction *i) > > void CodeEmitterGK110::emitTEXBAR(const Instruction *i) > { > - code[0] = 0x00000002 | (i->subOp << 23); > + code[0] = 0x0000003e | (i->subOp << 23); > code[1] = 0x77000000; > > emitPredicate(i); > -- > 1.8.5.5 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau
Maybe Matching Threads
- [PATCH] nv50/ir/gk110: fix set with f32 dest
- [PATCH] nv50/ir/gk110: fix some instruction emission
- [PATCH mesa 3/6] nouveau: codegen: gk110: Make emitSTORE offset handling identical to emitLOAD
- [PATCH] nv50/ir/gk110: fix some instruction emission
- [PATCH 1/4] nvc0/ir: avoid jumping to a sched instruction