intel/compiler: Use a struct for brw_compile_gs 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 15:19:05 -07:00
committed by Marge Bot
parent acf2d3c78b
commit 58c4a95320
5 changed files with 68 additions and 43 deletions

View File

@@ -1850,12 +1850,16 @@ iris_compile_gs(struct iris_screen *screen,
struct brw_gs_prog_key brw_key = iris_to_brw_gs_key(devinfo, key);
char *error_str = NULL;
const unsigned *program =
brw_compile_gs(compiler, dbg, mem_ctx, &brw_key, gs_prog_data,
nir, NULL, &error_str);
struct brw_compile_gs_params params = {
.nir = nir,
.key = &brw_key,
.prog_data = gs_prog_data,
.log_data = dbg,
};
const unsigned *program = brw_compile_gs(compiler, mem_ctx, &params);
if (program == NULL) {
dbg_printf("Failed to compile geometry shader: %s\n", error_str);
dbg_printf("Failed to compile geometry shader: %s\n", params.error_str);
ralloc_free(mem_ctx);
shader->compilation_failed = true;