freedreno/ir3: add image/ssbo <-> ibo/tex mapping
[mesa.git] / src / freedreno / ir3 / ir3_context.c
index d121559833b7f5cfb615886c32bf70aea5c539c9..942640438861e903b46a82df8bf2c82150add171 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "ir3_compiler.h"
 #include "ir3_context.h"
+#include "ir3_image.h"
 #include "ir3_shader.h"
 #include "ir3_nir.h"
 
@@ -103,6 +104,8 @@ ir3_context_init(struct ir3_compiler *compiler,
        so->num_uniforms = ctx->s->num_uniforms;
        so->num_ubos = ctx->s->info.num_ubos;
 
+       ir3_ibo_mapping_init(&so->image_mapping, ctx->s->info.num_textures);
+
        /* Layout of constant registers, each section aligned to vec4.  Note
         * that pointer size (ubo, etc) changes depending on generation.
         *