radeonsi: reduce type sizes in si_shader_selector
[mesa.git] / src / gallium / drivers / radeonsi / si_shader.c
index 057829599af4d94523c0f19747020a10e027410e..0bb0b3a71a38f26097f06e047277436d82291509 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;
@@ -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->base.textures_used);
-   ctx->num_images = util_last_bit(info->images_declared);
+   ctx->num_images = info->base.num_images;
 
    si_llvm_init_resource_callbacks(ctx);
 
@@ -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. */