diff options
author | Rob Clark <[email protected]> | 2016-06-02 11:13:26 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-06-02 15:44:07 -0400 |
commit | 374ad2e2bd14b4fd0c161d41e3627793ffabe468 (patch) | |
tree | 76509a282eef4cf7d23fc92b74dec130ed949e38 /src/gallium/drivers/freedreno | |
parent | df64cd68144c52476a2fc2dce4e18e30ce098213 (diff) |
freedreno/ir3: use nir_shader_get_entrypoint() helper
Should also fix coverity warning: CID 1362454
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 11 |
1 files changed, 1 insertions, 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 aa2d6882a76..04c99d1db02 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; |