struct ir3_shader *
ir3_shader_from_nir(struct ir3_compiler *compiler, nir_shader *nir,
- struct ir3_stream_output_info *stream_output)
+ unsigned reserved_user_consts, struct ir3_stream_output_info *stream_output)
{
struct ir3_shader *shader = CALLOC_STRUCT(ir3_shader);
shader->type = nir->info.stage;
if (stream_output)
memcpy(&shader->stream_output, stream_output, sizeof(shader->stream_output));
+ shader->const_state.num_reserved_user_consts = reserved_user_consts;
if (nir->info.stage == MESA_SHADER_GEOMETRY)
NIR_PASS_V(nir, ir3_nir_lower_gs);
struct ir3_shader_variant * ir3_shader_get_variant(struct ir3_shader *shader,
struct ir3_shader_key *key, bool binning_pass, bool *created);
struct ir3_shader * ir3_shader_from_nir(struct ir3_compiler *compiler, nir_shader *nir,
- struct ir3_stream_output_info *stream_output);
+ unsigned reserved_user_consts, struct ir3_stream_output_info *stream_output);
void ir3_shader_destroy(struct ir3_shader *shader);
void ir3_shader_disasm(struct ir3_shader_variant *so, uint32_t *bin, FILE *out);
uint64_t ir3_shader_outputs(const struct ir3_shader *so);
struct ir3_stream_output_info stream_output;
copy_stream_out(&stream_output, &cso->stream_output);
- struct ir3_shader *shader = ir3_shader_from_nir(compiler, nir, &stream_output);
+ struct ir3_shader *shader = ir3_shader_from_nir(compiler, nir, 0, &stream_output);
/* Compile standard variants immediately to try to avoid draw-time stalls
* to run the compiler.
nir = tgsi_to_nir(cso->prog, screen, false);
}
- struct ir3_shader *shader = ir3_shader_from_nir(compiler, nir, NULL);
+ struct ir3_shader *shader = ir3_shader_from_nir(compiler, nir, 0, NULL);
/* Immediately compile a standard variant. We have so few variants in our
* shaders, that doing so almost eliminates draw-time recompiles. (This