Mesa (master): radeonsi: add llvm_type_is_64bit() helper

Timothy Arceri tarceri at kemper.freedesktop.org
Mon Dec 4 01:54:05 UTC 2017


Module: Mesa
Branch: master
Commit: 650126f3e02ede482fbb11b9dc069eae200378ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=650126f3e02ede482fbb11b9dc069eae200378ae

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Tue Nov  7 21:41:27 2017 +1100

radeonsi: add llvm_type_is_64bit() helper

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_shader.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index c3b5f58cd2..58cba2c5a4 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -103,6 +103,15 @@ enum {
 	LOCAL_ADDR_SPACE = 3,
 };
 
+static bool llvm_type_is_64bit(struct si_shader_context *ctx,
+			       LLVMTypeRef type)
+{
+	if (type == ctx->ac.i64 || type == ctx->ac.f64)
+		return true;
+
+	return false;
+}
+
 static bool is_merged_shader(struct si_shader *shader)
 {
 	if (shader->selector->screen->info.chip_class <= VI)




More information about the mesa-commit mailing list