summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_context.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-02-05 15:33:57 -0500
committerRob Clark <[email protected]>2019-02-16 16:27:59 -0500
commit2e0ea3f09c79c657116cbc9cbc68377e364dfe28 (patch)
tree5d6f4a3793b79332d6de26140fd1b3d21703b131 /src/freedreno/ir3/ir3_context.c
parent75f3a5245e54d1be5b75db66ba50d7c2f5dee4fc (diff)
freedreno/ir3: add image/ssbo <-> ibo/tex mapping
Images and SSBOs don't map directly to the hw. They end up being part texture and part something else. Starting with a6xx, the hack used for a5xx to smash the image tex state into hw texture state starting from MAX counting down won't work, because we start using tex state also for SSBO read. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_context.c')
-rw-r--r--src/freedreno/ir3/ir3_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_context.c b/src/freedreno/ir3/ir3_context.c
index d121559833b..94264043886 100644
--- a/src/freedreno/ir3/ir3_context.c
+++ b/src/freedreno/ir3/ir3_context.c
@@ -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.
*