ir3_nir_post_finalize(compiler, nir);
- ir3_finalize_nir(compiler, nir);
-
shader->nir = nir;
if (ir3_shader_debug & IR3_DBG_DISASM) {
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
+ ir3_finalize_nir(dev->compiler, nir);
+
shader->ir3_shader =
ir3_shader_from_nir(dev->compiler, nir,
align(shader->push_consts.count, 4),
pscreen->context_create = fd3_context_create;
pscreen->is_format_supported = fd3_screen_is_format_supported;
fd3_emit_init_screen(pscreen);
+ ir3_screen_init(pscreen);
screen->setup_slices = fd3_setup_slices;
if (fd_mesa_debug & FD_DBG_TTILE)
pscreen->context_create = fd4_context_create;
pscreen->is_format_supported = fd4_screen_is_format_supported;
fd4_emit_init_screen(pscreen);
+ ir3_screen_init(pscreen);
}
screen->tile_mode = fd5_tile_mode;
fd5_emit_init_screen(pscreen);
+ ir3_screen_init(pscreen);
}
fd6_resource_screen_init(pscreen);
fd6_emit_init_screen(pscreen);
+ ir3_screen_init(pscreen);
}
ir3_shader_destroy(so);
}
+static void
+ir3_screen_finalize_nir(struct pipe_screen *pscreen, void *nir, bool optimize)
+{
+ struct fd_screen *screen = fd_screen(pscreen);
+
+ ir3_finalize_nir(screen->compiler, nir);
+}
+
void
ir3_prog_init(struct pipe_context *pctx)
{
pctx->create_fs_state = ir3_shader_state_create;
pctx->delete_fs_state = ir3_shader_state_delete;
}
+
+void
+ir3_screen_init(struct pipe_screen *pscreen)
+{
+ pscreen->finalize_nir = ir3_screen_finalize_nir;
+}
void ir3_shader_state_delete(struct pipe_context *pctx, void *hwcso);
void ir3_prog_init(struct pipe_context *pctx);
+void ir3_screen_init(struct pipe_screen *pscreen);
/**
* A helper to determine if a fs input 'i' is point/sprite coord, given