llvmpipe: fix stencil only formats.
authorDave Airlie <airlied@redhat.com>
Tue, 3 Dec 2019 06:01:37 +0000 (16:01 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 16 Jul 2020 19:09:34 +0000 (05:09 +1000)
Currently the test crashes with LLVM errors
Stored value type does not match pointer operand type!
  store <8 x i32> %s_dst, <8 x i8>* %261

Change the stored type for 8-bit stencil formats.

Fixes:
GTF-GL45.gtf44.GL31Tests.texture_stencil8.texture_stencil8_gl44

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5926>

src/gallium/drivers/llvmpipe/lp_state_fs.c

index edc4dcd2a5ae871aa5357712571c4a37c63ed97e..e1c5fc095978f0251897cf753cbe2a2aba013001 100644 (file)
@@ -559,6 +559,9 @@ generate_fs_loop(struct gallivm_state *gallivm,
          struct lp_type s_type = zs_type;
          if (zs_format_desc->block.bits < type.width)
             z_type.width = type.width;
+         if (zs_format_desc->block.bits == 8)
+            s_type.width = type.width;
+
          else if (zs_format_desc->block.bits > 32) {
             z_type.width = z_type.width / 2;
             s_type.width = s_type.width / 2;