radeonsi: rename num_memory_instructions -> num_memory_stores
[mesa.git] / src / gallium / drivers / radeonsi / si_shader.c
index f10195febd47c7eabb5c4ee9a4810d2a3a8fea2c..7b3c015e90181c5695af45c65707728f0d7799bf 100644 (file)
@@ -229,8 +229,8 @@ static void declare_const_and_shader_buffers(struct si_shader_context *ctx, bool
 {
    enum ac_arg_type const_shader_buf_type;
 
-   if (ctx->shader->selector->info.const_buffers_declared == 1 &&
-       ctx->shader->selector->info.shader_buffers_declared == 0)
+   if (ctx->shader->selector->info.base.num_ubos == 1 &&
+       ctx->shader->selector->info.base.num_ssbos == 0)
       const_shader_buf_type = AC_ARG_CONST_FLOAT_PTR;
    else
       const_shader_buf_type = AC_ARG_CONST_DESC_PTR;
@@ -715,7 +715,7 @@ void si_create_function(struct si_shader_context *ctx, bool ngg_cull_shader)
       }
       /* Images in user SGPRs. */
       for (unsigned i = 0; i < shader->selector->cs_num_images_in_user_sgprs; i++) {
-         unsigned num_sgprs = shader->selector->info.image_buffers & (1 << i) ? 4 : 8;
+         unsigned num_sgprs = shader->selector->info.base.image_buffers & (1 << i) ? 4 : 8;
 
          while (ctx->args.num_sgprs_used % num_sgprs != 0)
             ac_add_arg(&ctx->args, AC_ARG_SGPR, 1, AC_ARG_INT, NULL);
@@ -1342,11 +1342,11 @@ static bool si_build_main_function(struct si_shader_context *ctx, struct si_shad
    ctx->shader = shader;
    ctx->stage = sel->info.stage;
 
-   ctx->num_const_buffers = util_last_bit(info->const_buffers_declared);
-   ctx->num_shader_buffers = util_last_bit(info->shader_buffers_declared);
+   ctx->num_const_buffers = info->base.num_ubos;
+   ctx->num_shader_buffers = info->base.num_ssbos;
 
-   ctx->num_samplers = util_last_bit(info->samplers_declared);
-   ctx->num_images = util_last_bit(info->images_declared);
+   ctx->num_samplers = util_last_bit(info->base.textures_used);
+   ctx->num_images = info->base.num_images;
 
    si_llvm_init_resource_callbacks(ctx);
 
@@ -1600,7 +1600,7 @@ static bool si_should_optimize_less(struct ac_llvm_compiler *compiler,
 
    /* For a crazy dEQP test containing 2597 memory opcodes, mostly
     * buffer stores. */
-   return sel->info.stage == MESA_SHADER_COMPUTE && sel->info.num_memory_instructions > 1000;
+   return sel->info.stage == MESA_SHADER_COMPUTE && sel->info.num_memory_stores > 1000;
 }
 
 static struct nir_shader *get_nir_shader(struct si_shader_selector *sel, bool *free_nir)
@@ -2142,7 +2142,7 @@ void si_get_ps_prolog_key(struct si_shader *shader, union si_shader_part_key *ke
    key->ps_prolog.ancillary_vgpr_index = shader->info.ancillary_vgpr_index;
 
    if (info->colors_read) {
-      unsigned *color = shader->selector->color_attr_index;
+      ubyte *color = shader->selector->color_attr_index;
 
       if (shader->key.part.ps.prolog.color_two_side) {
          /* BCOLORs are stored after the last input. */