Module: Mesa Branch: master Commit: 374ad2e2bd14b4fd0c161d41e3627793ffabe468 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=374ad2e2bd14b4fd0c161d41e3627793ffabe468
Author: Rob Clark <[email protected]> Date: Thu Jun 2 11:13:26 2016 -0400 freedreno/ir3: use nir_shader_get_entrypoint() helper Should also fix coverity warning: CID 1362454 Signed-off-by: Rob Clark <[email protected]> --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index aa2d688..04c99d1 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -2188,16 +2188,7 @@ static void emit_instructions(struct ir3_compile *ctx) { unsigned ninputs, noutputs; - nir_function_impl *fxn = NULL; - - /* Find the main function: */ - nir_foreach_function(function, ctx->s) { - compile_assert(ctx, strcmp(function->name, "main") == 0); - compile_assert(ctx, function->impl); - fxn = function->impl; - break; - } - + nir_function_impl *fxn = nir_shader_get_entrypoint(ctx->s)->impl; ninputs = (max_drvloc(&ctx->s->inputs) + 1) * 4; noutputs = (max_drvloc(&ctx->s->outputs) + 1) * 4; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
