We can get it from si_screen.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
sel.nir = program->ir.nir;
si_nir_scan_shader(sel.nir, &sel.info);
- si_lower_nir(&sel, program->compiler_ctx_state.chip_class);
+ si_lower_nir(&sel);
}
program->ir.nir = (struct nir_shader *) cso->prog;
}
- program->compiler_ctx_state.chip_class = sctx->b.chip_class;
program->compiler_ctx_state.debug = sctx->debug;
program->compiler_ctx_state.is_debug_context = sctx->is_debug;
p_atomic_inc(&sscreen->num_shaders_created);
/* State of the context creating the shader object. */
struct si_compiler_ctx_state {
- enum chip_class chip_class;
-
/* Should only be used by si_init_shader_selector_async and
* si_build_shader_variant if thread_index == -1 (non-threaded). */
LLVMTargetMachineRef tm;
void si_nir_scan_tess_ctrl(const struct nir_shader *nir,
const struct tgsi_shader_info *info,
struct tgsi_tessctrl_info *out);
-void si_lower_nir(struct si_shader_selector *sel, enum chip_class chip_class);
+void si_lower_nir(struct si_shader_selector *sel);
/* Inline helpers. */
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "si_shader.h"
#include "si_shader_internal.h"
+#include "si_pipe.h"
#include "ac_nir_to_llvm.h"
* selector is created.
*/
void
-si_lower_nir(struct si_shader_selector* sel, enum chip_class chip_class)
+si_lower_nir(struct si_shader_selector* sel)
{
/* Adjust the driver location of inputs and outputs. The state tracker
* interprets them as slots, while the ac/nir backend interprets them
};
NIR_PASS_V(sel->nir, nir_lower_subgroups, &subgroups_options);
- ac_lower_indirect_derefs(sel->nir, chip_class);
+ ac_lower_indirect_derefs(sel->nir, sel->screen->info.chip_class);
bool progress;
do {
si_nir_scan_shader(sel->nir, &sel->info);
si_nir_scan_tess_ctrl(sel->nir, &sel->info, &sel->tcs_info);
- si_lower_nir(sel, sctx->b.chip_class);
+ si_lower_nir(sel);
}
sel->type = sel->info.processor;
old_ps ? old_ps->key.part.ps.epilog.spi_shader_col_format : 0;
int r;
- compiler_state.chip_class = sctx->b.chip_class;
compiler_state.tm = sctx->tm;
compiler_state.debug = sctx->debug;
compiler_state.is_debug_context = sctx->is_debug;