When we move const_state to the variant, this will need to stay in the
shader, as it applies to all variants (and we need to store it somewhere
before we have any variants)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5508>
const uint32_t max_upload = (shader->compiler->max_const -
worst_case_const_state.offsets.immediate) * 16;
- uint32_t offset = shader->const_state.num_reserved_user_consts * 16;
+ uint32_t offset = shader->num_reserved_user_consts * 16;
state->num_enabled = ARRAY_SIZE(state->range);
for (uint32_t i = 0; i < ARRAY_SIZE(state->range); i++) {
if (state->range[i].start >= state->range[i].end) {
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;
+ shader->num_reserved_user_consts = reserved_user_consts;
if (nir->info.stage == MESA_SHADER_GEOMETRY)
NIR_PASS_V(nir, ir3_nir_lower_gs);
*/
struct ir3_const_state {
unsigned num_ubos;
- unsigned num_reserved_user_consts;
unsigned num_driver_params; /* scalar */
struct {
struct ir3_compiler *compiler;
struct ir3_const_state const_state;
+ unsigned num_reserved_user_consts;
struct nir_shader *nir;
struct ir3_stream_output_info stream_output;