i965/fs: Get rid of the early return in brw_compile_cs

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2017-11-06 16:29:42 -08:00
parent 80ddfab2f5
commit 16ada419d7

View File

@@ -6925,14 +6925,12 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
}
}
const unsigned *ret = NULL;
if (unlikely(cfg == NULL)) {
assert(fail_msg);
if (error_str)
*error_str = ralloc_strdup(mem_ctx, fail_msg);
return NULL;
}
} else {
fs_generator g(compiler, log_data, mem_ctx, (void*) key, &prog_data->base,
v8.promoted_constants, false, MESA_SHADER_COMPUTE);
if (INTEL_DEBUG & DEBUG_CS) {
@@ -6945,7 +6943,10 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
g.generate_code(cfg, prog_data->simd_size);
return g.get_assembly(&prog_data->base.program_size);
ret = g.get_assembly(&prog_data->base.program_size);
}
return ret;
}
/**