radeonsi: always reserve output space for tess factors
authorMarek Olšák <marek.olsak@amd.com>
Fri, 27 May 2016 10:39:30 +0000 (12:39 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 27 May 2016 19:40:43 +0000 (21:40 +0200)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index c6f51ea84d52d153e542bb1fc2342b096c865b63..8ec0470889c47404112c0c590371eb90a7e0602d 100644 (file)
@@ -1104,8 +1104,13 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
                        u_vertices_per_prim(sel->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM]);
                break;
 
-       case PIPE_SHADER_VERTEX:
        case PIPE_SHADER_TESS_CTRL:
+               /* Always reserve space for these. */
+               sel->patch_outputs_written |=
+                       (1llu << si_shader_io_get_unique_index(TGSI_SEMANTIC_TESSINNER, 0)) |
+                       (1llu << si_shader_io_get_unique_index(TGSI_SEMANTIC_TESSOUTER, 0));
+               /* fall through */
+       case PIPE_SHADER_VERTEX:
        case PIPE_SHADER_TESS_EVAL:
                for (i = 0; i < sel->info.num_outputs; i++) {
                        unsigned name = sel->info.output_semantic_name[i];