ac: Fix loading a dvec3 from an SSBO
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 18 Oct 2018 13:39:13 +0000 (15:39 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 22 Oct 2018 07:44:51 +0000 (09:44 +0200)
The comment was wrong, since the loop above casts to a type with the
correct bitsize already.

Fixes: 7e7ee82698247d8f93fe37775b99f4838b0247dd ("ac: add support for 16bit buffer loads")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index 402cf2d665553c9891b78311cd7b3613d9250a54..ee75e2890dd4fd300289b572f9ada43f0f25a0c4 100644 (file)
@@ -1685,8 +1685,8 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
                };
 
                if (num_bytes > 16 && num_components == 3) {
-                       /* we end up with a v4f32 and v2f32 but shuffle fails on that */
-                       results[1] = ac_build_expand_to_vec4(&ctx->ac, results[1], 2);
+                       /* we end up with a v2i64 and i64 but shuffle fails on that */
+                       results[1] = ac_build_expand(&ctx->ac, results[1], 1, 2);
                }
 
                LLVMValueRef swizzle = LLVMConstVector(masks, num_components);