diff options
author | Rob Clark <[email protected]> | 2019-02-04 10:22:38 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-02-16 16:27:59 -0500 |
commit | 75f3a5245e54d1be5b75db66ba50d7c2f5dee4fc (patch) | |
tree | ec828674cbf2cec32ac5815e6c11dd46bc79e2c6 | |
parent | feee3050d389697ccb56c8caa847ae8694e2251b (diff) |
freedreno/ir3: fix ncomp for _store_image() src
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/freedreno/ir3/ir3_a4xx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_a4xx.c b/src/freedreno/ir3/ir3_a4xx.c index a327a5c9f29..dfaeb5b3961 100644 --- a/src/freedreno/ir3/ir3_a4xx.c +++ b/src/freedreno/ir3/ir3_a4xx.c @@ -263,6 +263,7 @@ emit_intrinsic_store_image(struct ir3_context *ctx, nir_intrinsic_instr *intr) struct ir3_instruction * const *coords = ir3_get_src(ctx, &intr->src[1]); unsigned ncoords = ir3_get_image_coords(var, NULL); unsigned tex_idx = ir3_get_image_slot(ctx, nir_src_as_deref(intr->src[0])); + unsigned ncomp = ir3_get_num_components_for_glformat(var->data.image.format); /* src0 is value * src1 is coords @@ -277,10 +278,10 @@ emit_intrinsic_store_image(struct ir3_context *ctx, nir_intrinsic_instr *intr) */ stib = ir3_STIB(b, create_immed(b, tex_idx), 0, - ir3_create_collect(ctx, value, 4), 0, + ir3_create_collect(ctx, value, ncomp), 0, ir3_create_collect(ctx, coords, ncoords), 0, offset, 0); - stib->cat6.iim_val = 4; + stib->cat6.iim_val = ncomp; stib->cat6.d = ncoords; stib->cat6.type = ir3_get_image_type(var); stib->cat6.typed = true; |