ac: fix build error in si_shader
authorMauro Rossi <issor.oruam@gmail.com>
Fri, 12 Jan 2018 14:47:34 +0000 (15:47 +0100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sat, 13 Jan 2018 07:13:07 +0000 (18:13 +1100)
assert() is replaced by unreachable(), to avoid following building error:

external/mesa/src/gallium/drivers/radeonsi/si_shader.c:1967:1:
error: control may reach end of non-void function [-Werror,-Wreturn-type]
}
^
1 error generated.

Fixes: c797cd6 ("ac: add load_patch_vertices_in() to the abi")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeonsi/si_shader.c

index dd635ae203593f6e5e1c9fbb5dd90eedca381b1d..35f82d8d634d1fe564e06a2ef9990f312c79c8bc 100644 (file)
@@ -1963,7 +1963,7 @@ static LLVMValueRef si_load_patch_vertices_in(struct ac_shader_abi *abi)
        else if (ctx->type == PIPE_SHADER_TESS_EVAL)
                return get_num_tcs_out_vertices(ctx);
        else
-               assert(!"invalid shader stage for TGSI_SEMANTIC_VERTICESIN");
+               unreachable("invalid shader stage for TGSI_SEMANTIC_VERTICESIN");
 }
 
 void si_load_system_value(struct si_shader_context *ctx,