}
struct iris_uncompiled_shader {
- struct pipe_shader_state base;
+ nir_shader *nir;
+
+ struct pipe_stream_output_info stream_output;
+
unsigned program_id;
/** Bitfield of (1 << IRIS_NOS_*) flags. */
nir = brw_preprocess_nir(screen->compiler, nir);
ish->program_id = get_new_program_id(screen);
- ish->base.type = PIPE_SHADER_IR_NIR;
- ish->base.ir.nir = nir;
- memcpy(&ish->base.stream_output, &state->stream_output,
+ ish->nir = nir;
+ memcpy(&ish->stream_output, &state->stream_output,
sizeof(struct pipe_stream_output_info));
switch (nir->info.stage) {
{
struct iris_uncompiled_shader *ish = state;
- ralloc_free(ish->base.ir.nir);
+ ralloc_free(ish->nir);
free(ish);
}
struct brw_vue_prog_data *vue_prog_data = &vs_prog_data->base;
struct brw_stage_prog_data *prog_data = &vue_prog_data->base;
- assert(ish->base.type == PIPE_SHADER_IR_NIR);
-
- nir_shader *nir = ish->base.ir.nir;
+ nir_shader *nir = ish->nir;
// XXX: alt mode
assign_common_binding_table_offsets(devinfo, nir, prog_data, 0);
iris_setup_push_uniform_range(compiler, prog_data);
uint32_t *so_decls =
- ice->vtbl.create_so_decl_list(&ish->base.stream_output,
+ ice->vtbl.create_so_decl_list(&ish->stream_output,
&vue_prog_data->vue_map);
iris_upload_and_bind_shader(ice, IRIS_CACHE_VS, key, program, prog_data,
if (!ish)
return NULL;
- const nir_shader *nir = ish->base.ir.nir;
+ const nir_shader *nir = ish->nir;
return &nir->info;
}
struct brw_vue_prog_data *vue_prog_data = &tcs_prog_data->base;
struct brw_stage_prog_data *prog_data = &vue_prog_data->base;
- assert(ish->base.type == PIPE_SHADER_IR_NIR);
-
- nir_shader *nir = ish->base.ir.nir;
+ nir_shader *nir = ish->nir;
assign_common_binding_table_offsets(devinfo, nir, prog_data, 0);
struct brw_vue_prog_data *vue_prog_data = &tes_prog_data->base;
struct brw_stage_prog_data *prog_data = &vue_prog_data->base;
- assert(ish->base.type == PIPE_SHADER_IR_NIR);
-
- nir_shader *nir = ish->base.ir.nir;
+ nir_shader *nir = ish->nir;
assign_common_binding_table_offsets(devinfo, nir, prog_data, 0);
iris_setup_push_uniform_range(compiler, prog_data);
uint32_t *so_decls =
- ice->vtbl.create_so_decl_list(&ish->base.stream_output,
+ ice->vtbl.create_so_decl_list(&ish->stream_output,
&vue_prog_data->vue_map);
iris_upload_and_bind_shader(ice, IRIS_CACHE_TES, key, program, prog_data,
struct brw_vue_prog_data *vue_prog_data = &gs_prog_data->base;
struct brw_stage_prog_data *prog_data = &vue_prog_data->base;
- assert(ish->base.type == PIPE_SHADER_IR_NIR);
-
- nir_shader *nir = ish->base.ir.nir;
+ nir_shader *nir = ish->nir;
assign_common_binding_table_offsets(devinfo, nir, prog_data, 0);
iris_setup_push_uniform_range(compiler, prog_data);
uint32_t *so_decls =
- ice->vtbl.create_so_decl_list(&ish->base.stream_output,
+ ice->vtbl.create_so_decl_list(&ish->stream_output,
&vue_prog_data->vue_map);
iris_upload_and_bind_shader(ice, IRIS_CACHE_GS, key, program, prog_data,
rzalloc(mem_ctx, struct brw_wm_prog_data);
struct brw_stage_prog_data *prog_data = &fs_prog_data->base;
- assert(ish->base.type == PIPE_SHADER_IR_NIR);
-
- nir_shader *nir = ish->base.ir.nir;
+ nir_shader *nir = ish->nir;
// XXX: alt mode
assign_common_binding_table_offsets(devinfo, nir, prog_data,
const struct iris_rasterizer_state *cso_rast = ice->state.cso_rast;
const struct brw_wm_prog_data *wm_prog_data = (void *)
ice->shaders.prog[MESA_SHADER_FRAGMENT]->prog_data;
- struct pipe_shader_state *p_fs =
- (void *) ice->shaders.uncompiled[MESA_SHADER_FRAGMENT];
- assert(p_fs->type == PIPE_SHADER_IR_NIR);
- nir_shader *fs_nir = p_fs->ir.nir;
+ const struct shader_info *fs_info =
+ iris_get_shader_info(ice, MESA_SHADER_FRAGMENT);
unsigned urb_read_offset, urb_read_length;
- iris_compute_sbe_urb_read_interval(fs_nir->info.inputs_read,
+ iris_compute_sbe_urb_read_interval(fs_info->inputs_read,
ice->shaders.last_vue_map,
cso_rast->light_twoside,
&urb_read_offset, &urb_read_length);