[v2,10/12] ac: use new LLVM 8 intrinsics in ac_build_buffer_load()

Submitted by Samuel Pitoiset on March 13, 2019, 10:50 a.m.

Details

Message ID 20190313105020.17683-11-samuel.pitoiset@gmail.com
State New
Headers show
Series "ac: use LLVM 8 buffer intrinsics everywhere" ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset March 13, 2019, 10:50 a.m.
v2: - do not force enable IDXEN when unecessary

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/common/ac_llvm_build.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 5d52d93d25a..8d5682f6f7a 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -1412,6 +1412,16 @@  ac_build_buffer_load(struct ac_llvm_context *ctx,
 		return ac_build_gather_values(ctx, result, num_channels);
 	}
 
+	if (HAVE_LLVM >= 0x0800) {
+		bool structurized = vindex && vindex != ctx->i32_0;
+
+		return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex,
+							 offset, ctx->i32_0,
+							 num_channels, glc, slc,
+							 can_speculate, false,
+							 structurized);
+	}
+
 	return ac_build_buffer_load_common(ctx, rsrc, vindex, offset,
 					   num_channels, glc, slc,
 					   can_speculate, false);