r600g: fix CAYMAN geometry shader support
authorDave Airlie <airlied@redhat.com>
Fri, 31 Jan 2014 03:35:51 +0000 (03:35 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 5 Feb 2014 00:49:42 +0000 (10:49 +1000)
cayman has a different end of program bit, so do that properly.

fixes hangs with geom shader tests on cayman.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_shader.c

index 3535a134715b28ef4294cf669cf1b469cfdef58d..8fa70542ea1ee3600b35197d46afbab1d48a3c0d 100644 (file)
@@ -1357,8 +1357,12 @@ static int generate_gs_copy_shader(struct r600_context *rctx,
        cf_pop->cf_addr = cf_pop->id + 2;
        cf_pop->pop_count = 1;
 
-       r600_bytecode_add_cfinst(ctx.bc, CF_OP_NOP);
-       ctx.bc->cf_last->end_of_program = 1;
+       if (ctx.bc->chip_class == CAYMAN)
+               cm_bytecode_add_cf_end(ctx.bc);
+       else {
+               r600_bytecode_add_cfinst(ctx.bc, CF_OP_NOP);
+               ctx.bc->cf_last->end_of_program = 1;
+       }
 
        gs->gs_copy_shader = cshader;