about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/intel-gpu-tools
diff options
context:
space:
mode:
authorPascal Wittmann <mail@pascal-wittmann.de>2015-05-15 22:44:51 +0200
committerPascal Wittmann <mail@pascal-wittmann.de>2015-05-15 22:46:30 +0200
commit4ec3f8e42f9c765b58dd7e088f6c6943d319ad00 (patch)
tree0fa451732fb2ea720da50722ac8c1e6f2d333392 /pkgs/development/tools/misc/intel-gpu-tools
parentbc7a4fc18bba1926413fec5e49760c57514b482e (diff)
downloadnixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.tar
nixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.tar.gz
nixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.tar.bz2
nixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.tar.lz
nixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.tar.xz
nixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.tar.zst
nixlib-4ec3f8e42f9c765b58dd7e088f6c6943d319ad00.zip
intel-gpu-tools: apply patch to fix a compile error
see https://bugs.gentoo.org/show_bug.cgi?id=548318
Diffstat (limited to 'pkgs/development/tools/misc/intel-gpu-tools')
-rw-r--r--pkgs/development/tools/misc/intel-gpu-tools/compile-fix.patch37
-rw-r--r--pkgs/development/tools/misc/intel-gpu-tools/default.nix2
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/intel-gpu-tools/compile-fix.patch b/pkgs/development/tools/misc/intel-gpu-tools/compile-fix.patch
new file mode 100644
index 000000000000..8285867d8eda
--- /dev/null
+++ b/pkgs/development/tools/misc/intel-gpu-tools/compile-fix.patch
@@ -0,0 +1,37 @@
+From 233808a58db1f62d773b03f9dad599924170aca6 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 18 Mar 2015 08:36:37 +0000
+Subject: lib/batch: Trivial compile fix for 32-bit builds
+
+intel_batchbuffer.c: In function 'fill_object':
+intel_batchbuffer.c:589:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
+  obj->relocs_ptr = (uint64_t)relocs;
+                    ^
+intel_batchbuffer.c: In function 'exec_blit':
+intel_batchbuffer.c:598:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
+  exec.buffers_ptr = (uint64_t)objs;
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
+index 666c323..c1c27a6 100644
+--- a/lib/intel_batchbuffer.c
++++ b/lib/intel_batchbuffer.c
+@@ -548,7 +548,7 @@ fill_object(struct drm_i915_gem_exec_object2 *obj, uint32_t gem_handle,
+	memset(obj, 0, sizeof(*obj));
+	obj->handle = gem_handle;
+	obj->relocation_count = count;
+-	obj->relocs_ptr = (uint64_t)relocs;
++	obj->relocs_ptr = (uintptr_t)relocs;
+ }
+
+ static void exec_blit(int fd,
+@@ -557,7 +557,7 @@ static void exec_blit(int fd,
+ {
+	struct drm_i915_gem_execbuffer2 exec;
+
+-	exec.buffers_ptr = (uint64_t)objs;
++	exec.buffers_ptr = (uintptr_t)objs;
+	exec.buffer_count = count;
+	exec.batch_start_offset = 0;
+	exec.batch_len = batch_len * 4;
diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
index 72a364e682a3..997f1bfc0120 100644
--- a/pkgs/development/tools/misc/intel-gpu-tools/default.nix
+++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
@@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig libdrm libpciaccess cairo dri2proto udev libX11 libXext libXv libXrandr glib bison ];
 
+  patches = [ ./compile-fix.patch ];
+
   meta = with stdenv.lib; {
     homepage = https://01.org/linuxgraphics/;
     description = "Tools for development and testing of the Intel DRM driver";