intel/compiler: Use a struct for brw_compile_tcs parameters

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14139>
This commit is contained in:
Caio Oliveira
2021-03-23 14:34:23 -07:00
committed by Marge Bot
parent 76da456954
commit 7372a48a4a
5 changed files with 62 additions and 38 deletions

View File

@@ -1549,12 +1549,16 @@ iris_compile_tcs(struct iris_screen *screen,
prog_data->ubo_ranges[0].length = 1;
}
char *error_str = NULL;
const unsigned *program =
brw_compile_tcs(compiler, dbg, mem_ctx, &brw_key, tcs_prog_data,
nir, NULL, &error_str);
struct brw_compile_tcs_params params = {
.nir = nir,
.key = &brw_key,
.prog_data = tcs_prog_data,
.log_data = dbg,
};
const unsigned *program = brw_compile_tcs(compiler, mem_ctx, &params);
if (program == NULL) {
dbg_printf("Failed to compile control shader: %s\n", error_str);
dbg_printf("Failed to compile control shader: %s\n", params.error_str);
ralloc_free(mem_ctx);
shader->compilation_failed = true;