diff options
author | Jason Ekstrand <[email protected]> | 2017-11-06 16:29:42 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:37:52 -0800 |
commit | 16ada419d7c13bc96e299d3b17d756ec1af6f38a (patch) | |
tree | 863b76f2200cba9f167f3bdc788b8be1c9f98513 /src/intel/compiler/brw_fs.cpp | |
parent | 80ddfab2f54d7cd9dd4b93d2fbfa239f061a1f2b (diff) |
i965/fs: Get rid of the early return in brw_compile_cs
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index c0b6047b954..996e4c6a5f1 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -6925,27 +6925,28 @@ 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); + } 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) { + char *name = ralloc_asprintf(mem_ctx, "%s compute shader %s", + shader->info.label ? shader->info.label : + "unnamed", + shader->info.name); + g.enable_debug(name); + } - return NULL; - } + g.generate_code(cfg, prog_data->simd_size); - 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) { - char *name = ralloc_asprintf(mem_ctx, "%s compute shader %s", - shader->info.label ? shader->info.label : - "unnamed", - shader->info.name); - g.enable_debug(name); + ret = g.get_assembly(&prog_data->base.program_size); } - g.generate_code(cfg, prog_data->simd_size); - - return g.get_assembly(&prog_data->base.program_size); + return ret; } /** |