* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2012-06-03 10:20 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2012-06-03 10:20 UTC (permalink / raw
To: gentoo-commits
commit: 4f6e677ca64557ef18d1245a893df206ac89d735
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 3 10:17:57 2012 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Jun 3 10:17:57 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=4f6e677c
add few patches to make opencl work
(Portage version: 2.2.0_alpha109/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)
---
...adeong-clover-add-clang-path-to-configure.patch | 48 ++++++++++++++++++++
...ncl-rename-target-from-r600-to-r600-amd-n.patch | 26 +++++++++++
...building-and-add-standart-locations-for-l.patch | 48 ++++++++++++++++++++
media-libs/mesa/mesa-9999.ebuild | 8 +++
4 files changed, 130 insertions(+), 0 deletions(-)
diff --git a/media-libs/mesa/files/0001-radeong-clover-add-clang-path-to-configure.patch b/media-libs/mesa/files/0001-radeong-clover-add-clang-path-to-configure.patch
new file mode 100644
index 0000000..bcfd425
--- /dev/null
+++ b/media-libs/mesa/files/0001-radeong-clover-add-clang-path-to-configure.patch
@@ -0,0 +1,48 @@
+From 932b4a03d17aad57090835d9559b99475f504d31 Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Sun, 3 Jun 2012 14:05:35 +0400
+Subject: [PATCH 1/3] radeong/clover add clang path to configure
+
+---
+ configure.ac | 11 +++++++++++
+ src/gallium/state_trackers/clover/Makefile.am | 2 +-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index fc1c28e..3414a66 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1629,6 +1629,17 @@ AC_ARG_WITH([libclc-path],
+
+ AC_SUBST([LIBCLC_PATH])
+
++dnl
++dnl Also we need path to clang includes
++dnl
++
++AC_ARG_WITH([clang-path],
++ [AS_HELP_STRING([--with-clang-path],
++ [Path to clang base dir. Example: --with-clang-path=/usr/lib])],
++ [CLANG_PATH="$withval"],
++ [CLANG_PATH=""])
++AC_SUBST([CLANG_PATH])
++
+ if test "x$enable_opencl" = xyes; then
+ if test "x$with_gallium_drivers" = x; then
+ AC_MSG_ERROR([cannot enable OpenCL without Gallium])
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
+index 818ced6..bc37c4e 100644
+--- a/src/gallium/state_trackers/clover/Makefile.am
++++ b/src/gallium/state_trackers/clover/Makefile.am
+@@ -24,7 +24,7 @@ libclllvm_la_CXXFLAGS = \
+ $(LLVM_CPPFLAGS) \
+ $(DEFINES) \
+ -DLIBCLC_PATH=\"$(LIBCLC_PATH)/\" \
+- -DCLANG_RESOURCE_DIR=\"$(LLVM_LIBDIR)/clang/$(LLVM_VERSION)/\"
++ -DCLANG_RESOURCE_DIR=\"$(CLANG_PATH)/clang/$(LLVM_VERSION)/\"
+
+ libclllvm_la_SOURCES = \
+ llvm/invocation.cpp
+--
+1.7.10.2
+
diff --git a/media-libs/mesa/files/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch b/media-libs/mesa/files/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch
new file mode 100644
index 0000000..2eebc9c
--- /dev/null
+++ b/media-libs/mesa/files/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch
@@ -0,0 +1,26 @@
+From 7c4d0a88c45acedfd47eba93646bf5ea7435472c Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Sun, 3 Jun 2012 13:52:00 +0400
+Subject: [PATCH 2/3] radeong/opencl rename target from r600-- to
+ r600-amd-none
+
+---
+ src/gallium/drivers/r600/r600_pipe.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
+index e0ee823..790afcc 100644
+--- a/src/gallium/drivers/r600/r600_pipe.c
++++ b/src/gallium/drivers/r600/r600_pipe.c
+@@ -582,7 +582,7 @@ static int r600_get_compute_param(struct pipe_screen *screen,
+ switch (param) {
+ case PIPE_COMPUTE_CAP_IR_TARGET:
+ if (ret) {
+- strcpy(ret, "r600--");
++ strcpy(ret, "r600-amd-none");
+ }
+ return 7 * sizeof(char);
+
+--
+1.7.10.2
+
diff --git a/media-libs/mesa/files/0003-clover-fix-building-and-add-standart-locations-for-l.patch b/media-libs/mesa/files/0003-clover-fix-building-and-add-standart-locations-for-l.patch
new file mode 100644
index 0000000..3a78505
--- /dev/null
+++ b/media-libs/mesa/files/0003-clover-fix-building-and-add-standart-locations-for-l.patch
@@ -0,0 +1,48 @@
+From 3d4239edd2c89d3b67aef11786f0846fba96d718 Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Sun, 3 Jun 2012 04:35:51 +0400
+Subject: [PATCH 3/3] clover fix building and add standart locations for
+ libclc
+
+---
+ src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 ++--
+ src/gallium/targets/opencl/Makefile.am | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
+index 27276bc..78c8670 100644
+--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
++++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
+@@ -107,7 +107,7 @@ namespace {
+ c.getHeaderSearchOpts().ResourceDir = CLANG_RESOURCE_DIR;
+
+ // Add libclc generic search path
+- c.getHeaderSearchOpts().AddPath(LIBCLC_PATH "/generic/include/",
++ c.getHeaderSearchOpts().AddPath(LIBCLC_PATH "/include/",
+ clang::frontend::Angled,
+ false, false, false);
+
+@@ -142,7 +142,7 @@ namespace {
+ llvm::Linker linker("clover", mod);
+
+ // Link the kernel with libclc
+- linker.LinkInFile(llvm::sys::Path(LIBCLC_PATH + triple + "/lib/builtins.bc"), isNative);
++ linker.LinkInFile(llvm::sys::Path(LIBCLC_PATH + "/lib/clc/" +triple + "/builtins.bc"), isNative);
+ mod = linker.releaseModule();
+
+ // Run link time optimizations
+diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
+index d55b21e..4c89e36 100644
+--- a/src/gallium/targets/opencl/Makefile.am
++++ b/src/gallium/targets/opencl/Makefile.am
+@@ -3,6 +3,7 @@ AUTOMAKE_OPTIONS = subdir-objects
+ lib_LTLIBRARIES = libOpenCL.la
+
+ libOpenCL_la_LDFLAGS = \
++ $(LLVM_LDFLAGS) \
+ -version-number 1:0
+
+ libOpenCL_la_LIBADD = \
+--
+1.7.10.2
+
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 7e39bae..46d4861 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -147,6 +147,12 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/0001-radeong-clover-add-clang-path-to-configure.patch"
+ "${FILESDIR}/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch"
+ "${FILESDIR}/0003-clover-fix-building-and-add-standart-locations-for-l.patch"
+ )
+
# It is slow without texrels, if someone wants slow
# mesa without texrels +pic use is worth the shot
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
@@ -256,6 +262,8 @@ src_configure() {
myconf+="
$(use_enable opencl)
--with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
+ --with-libclc-path="${EPREFIX}/usr"
+ --with-clang-path="${EPREFIX}/usr/$(get_libdir)"
"
fi
fi
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2012-06-19 22:42 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2012-06-19 22:42 UTC (permalink / raw
To: gentoo-commits
commit: 3994c6caadfb28b1e50cf174ad279450f8fd1e31
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 19 22:42:36 2012 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Tue Jun 19 22:42:36 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=3994c6ca
[media-libs/mesa] Add patch to fix compute capability for 3.4+ kernels
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
---
.../mesa/files/0004-r600g-fix-reading-vtx.patch | 21 ++++++++++++++++++++
media-libs/mesa/mesa-9999.ebuild | 1 +
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/media-libs/mesa/files/0004-r600g-fix-reading-vtx.patch b/media-libs/mesa/files/0004-r600g-fix-reading-vtx.patch
new file mode 100644
index 0000000..723f239
--- /dev/null
+++ b/media-libs/mesa/files/0004-r600g-fix-reading-vtx.patch
@@ -0,0 +1,21 @@
+From 7c1c8b1384e11166e1d3d1eb15750f3f8dd3241c Mon Sep 17 00:00:00 2001
+From: Tom Stellard <thomas.stellard@amd.com>
+Date: Wed, 06 Jun 2012 22:31:00 +0000
+Subject: r600g: Fix reading vtx instruction offset from bytestream
+
+---
+diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
+index 8a80dba..7ec1a1a 100644
+--- a/src/gallium/drivers/r600/r600_shader.c
++++ b/src/gallium/drivers/r600/r600_shader.c
+@@ -460,7 +460,7 @@ static int r600_vtx_from_byte_stream(struct r600_shader_ctx *ctx,
+ vtx.srf_mode_all = bytes[bytes_read++];
+ /* offset is 2 bytes wide */
+ vtx.offset = bytes[bytes_read++];
+- vtx.offset |= bytes[bytes_read++];
++ vtx.offset |= (bytes[bytes_read++] << 8);
+ vtx.endian = bytes[bytes_read++];
+
+ if (r600_bytecode_add_vtx(ctx->bc, &vtx)) {
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index af5720e..0a19214 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -154,6 +154,7 @@ PATCHES=(
"${FILESDIR}/0001-radeong-clover-add-clang-path-to-configure.patch"
"${FILESDIR}/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch"
"${FILESDIR}/0003-clover-fix-building-and-add-standart-locations-for-l.patch"
+ "${FILESDIR}/0004-r600g-fix-reading-vtx.patch"
)
# It is slow without texrels, if someone wants slow
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2012-06-22 21:18 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2012-06-22 21:18 UTC (permalink / raw
To: gentoo-commits
commit: c538564b9575ea1d1d4f2aa13125277ae9f01485
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 22 21:17:20 2012 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Fri Jun 22 21:17:20 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=c538564b
clover some patches were merged upstream
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
---
...adeong-clover-add-clang-path-to-configure.patch | 48 --------------------
.../mesa/files/0004-r600g-fix-reading-vtx.patch | 21 ---------
media-libs/mesa/mesa-9999.ebuild | 4 +-
3 files changed, 1 insertions(+), 72 deletions(-)
diff --git a/media-libs/mesa/files/0001-radeong-clover-add-clang-path-to-configure.patch b/media-libs/mesa/files/0001-radeong-clover-add-clang-path-to-configure.patch
deleted file mode 100644
index bcfd425..0000000
--- a/media-libs/mesa/files/0001-radeong-clover-add-clang-path-to-configure.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 932b4a03d17aad57090835d9559b99475f504d31 Mon Sep 17 00:00:00 2001
-From: Alexey Shvetsov <alexxy@gentoo.org>
-Date: Sun, 3 Jun 2012 14:05:35 +0400
-Subject: [PATCH 1/3] radeong/clover add clang path to configure
-
----
- configure.ac | 11 +++++++++++
- src/gallium/state_trackers/clover/Makefile.am | 2 +-
- 2 files changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index fc1c28e..3414a66 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1629,6 +1629,17 @@ AC_ARG_WITH([libclc-path],
-
- AC_SUBST([LIBCLC_PATH])
-
-+dnl
-+dnl Also we need path to clang includes
-+dnl
-+
-+AC_ARG_WITH([clang-path],
-+ [AS_HELP_STRING([--with-clang-path],
-+ [Path to clang base dir. Example: --with-clang-path=/usr/lib])],
-+ [CLANG_PATH="$withval"],
-+ [CLANG_PATH=""])
-+AC_SUBST([CLANG_PATH])
-+
- if test "x$enable_opencl" = xyes; then
- if test "x$with_gallium_drivers" = x; then
- AC_MSG_ERROR([cannot enable OpenCL without Gallium])
-diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
-index 818ced6..bc37c4e 100644
---- a/src/gallium/state_trackers/clover/Makefile.am
-+++ b/src/gallium/state_trackers/clover/Makefile.am
-@@ -24,7 +24,7 @@ libclllvm_la_CXXFLAGS = \
- $(LLVM_CPPFLAGS) \
- $(DEFINES) \
- -DLIBCLC_PATH=\"$(LIBCLC_PATH)/\" \
-- -DCLANG_RESOURCE_DIR=\"$(LLVM_LIBDIR)/clang/$(LLVM_VERSION)/\"
-+ -DCLANG_RESOURCE_DIR=\"$(CLANG_PATH)/clang/$(LLVM_VERSION)/\"
-
- libclllvm_la_SOURCES = \
- llvm/invocation.cpp
---
-1.7.10.2
-
diff --git a/media-libs/mesa/files/0004-r600g-fix-reading-vtx.patch b/media-libs/mesa/files/0004-r600g-fix-reading-vtx.patch
deleted file mode 100644
index 723f239..0000000
--- a/media-libs/mesa/files/0004-r600g-fix-reading-vtx.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 7c1c8b1384e11166e1d3d1eb15750f3f8dd3241c Mon Sep 17 00:00:00 2001
-From: Tom Stellard <thomas.stellard@amd.com>
-Date: Wed, 06 Jun 2012 22:31:00 +0000
-Subject: r600g: Fix reading vtx instruction offset from bytestream
-
----
-diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
-index 8a80dba..7ec1a1a 100644
---- a/src/gallium/drivers/r600/r600_shader.c
-+++ b/src/gallium/drivers/r600/r600_shader.c
-@@ -460,7 +460,7 @@ static int r600_vtx_from_byte_stream(struct r600_shader_ctx *ctx,
- vtx.srf_mode_all = bytes[bytes_read++];
- /* offset is 2 bytes wide */
- vtx.offset = bytes[bytes_read++];
-- vtx.offset |= bytes[bytes_read++];
-+ vtx.offset |= (bytes[bytes_read++] << 8);
- vtx.endian = bytes[bytes_read++];
-
- if (r600_bytecode_add_vtx(ctx->bc, &vtx)) {
---
-cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 0a19214..3d7fa20 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -151,10 +151,8 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
PATCHES=(
- "${FILESDIR}/0001-radeong-clover-add-clang-path-to-configure.patch"
"${FILESDIR}/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch"
"${FILESDIR}/0003-clover-fix-building-and-add-standart-locations-for-l.patch"
- "${FILESDIR}/0004-r600g-fix-reading-vtx.patch"
)
# It is slow without texrels, if someone wants slow
@@ -267,7 +265,7 @@ src_configure() {
$(use_enable opencl)
--with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
--with-libclc-path="${EPREFIX}/usr"
- --with-clang-path="${EPREFIX}/usr/$(get_libdir)"
+ --with-clang-libdir="${EPREFIX}/usr/$(get_libdir)"
"
fi
fi
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-06 11:30 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-06 11:30 UTC (permalink / raw
To: gentoo-commits
commit: fd52abb858241361b2242955ccfeffd51a4d5a43
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 6 11:29:02 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sat Apr 6 11:29:02 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=fd52abb8
Drop unneded patches
Package-Manager: portage-2.2.0_alpha171
---
.../files/0001-XXX-Hacks-for-R600-rename.patch | 67 --------------------
...ncl-rename-target-from-r600-to-r600-amd-n.patch | 26 --------
...building-and-add-standart-locations-for-l.patch | 38 -----------
media-libs/mesa/mesa-9999.ebuild | 6 +--
4 files changed, 1 insertions(+), 136 deletions(-)
diff --git a/media-libs/mesa/files/0001-XXX-Hacks-for-R600-rename.patch b/media-libs/mesa/files/0001-XXX-Hacks-for-R600-rename.patch
deleted file mode 100644
index 5e3375a..0000000
--- a/media-libs/mesa/files/0001-XXX-Hacks-for-R600-rename.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From b2ec8e889fa9005cd9a6a81116171083f709e769 Mon Sep 17 00:00:00 2001
-From: Tom Stellard <thomas.stellard@amd.com>
-Date: Mon, 26 Nov 2012 21:18:19 +0000
-Subject: [PATCH] XXX: Hacks for R600 rename
-
----
- configure.ac | 12 ++++++------
- src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 7 +++++++
- 2 files changed, 13 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 228f464..b848503 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1784,20 +1784,20 @@ radeon_llvm_check() {
- LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
- LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
- if test "$LLVM_AVAILABLE_VERSION_MAJOR" -lt "$LLVM_REQUIRED_VERSION_MAJOR" -o [ "$LLVM_AVAILABLE_VERSION_MAJOR" -eq "$LLVM_REQUIRED_VERSION_MAJOR" -a "$LLVM_AVAILABLE_VERSION_MINOR" -lt "$LLVM_REQUIRED_VERSION_MINOR" ] ; then
-- AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with AMDGPU target enabled is required.
-+ AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with R600 target enabled is required.
- To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
- git://people.freedesktop.org/~tstellar/llvm master
-- and build with --enable-experimental-targets=AMDGPU])
-+ and build with --enable-experimental-targets=R600])
- fi
-- if test true && $LLVM_CONFIG --targets-built | grep -qv '\<AMDGPU\>' ; then
-- AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
-+ if test true && $LLVM_CONFIG --targets-built | grep -qv '\<R600\>' ; then
-+ AC_MSG_ERROR([LLVM R600 Target not enabled.
- To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
- git://people.freedesktop.org/~tstellar/llvm master
-- and build with --enable-experimental-targets=AMDGPU])
-+ and build with --enable-experimental-targets=R600])
- fi
- AC_MSG_WARN([Please ensure you use the latest llvm tree from git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
- if test "x$LLVM_VERSION" = "x3.2"; then
-- LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`"
-+ LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --libs R600`"
- fi
- }
-
-diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
-index 21661a0..9914228 100644
---- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
-+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
-@@ -89,11 +89,18 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
-
- Triple AMDGPUTriple(sys::getDefaultTargetTriple());
-
-+#if 0
- LLVMInitializeAMDGPUTargetInfo();
- LLVMInitializeAMDGPUTarget();
- LLVMInitializeAMDGPUTargetMC();
- LLVMInitializeAMDGPUAsmPrinter();
-+#else
-+ LLVMInitializeR600TargetInfo();
-+ LLVMInitializeR600Target();
-+ LLVMInitializeR600TargetMC();
-+ LLVMInitializeR600AsmPrinter();
-
-+#endif
- std::string err;
- const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err);
- if(!AMDGPUTarget) {
---
-1.7.11.4
-
diff --git a/media-libs/mesa/files/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch b/media-libs/mesa/files/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch
deleted file mode 100644
index 2eebc9c..0000000
--- a/media-libs/mesa/files/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 7c4d0a88c45acedfd47eba93646bf5ea7435472c Mon Sep 17 00:00:00 2001
-From: Alexey Shvetsov <alexxy@gentoo.org>
-Date: Sun, 3 Jun 2012 13:52:00 +0400
-Subject: [PATCH 2/3] radeong/opencl rename target from r600-- to
- r600-amd-none
-
----
- src/gallium/drivers/r600/r600_pipe.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
-index e0ee823..790afcc 100644
---- a/src/gallium/drivers/r600/r600_pipe.c
-+++ b/src/gallium/drivers/r600/r600_pipe.c
-@@ -582,7 +582,7 @@ static int r600_get_compute_param(struct pipe_screen *screen,
- switch (param) {
- case PIPE_COMPUTE_CAP_IR_TARGET:
- if (ret) {
-- strcpy(ret, "r600--");
-+ strcpy(ret, "r600-amd-none");
- }
- return 7 * sizeof(char);
-
---
-1.7.10.2
-
diff --git a/media-libs/mesa/files/0003-clover-fix-building-and-add-standart-locations-for-l.patch b/media-libs/mesa/files/0003-clover-fix-building-and-add-standart-locations-for-l.patch
deleted file mode 100644
index 2b18806..0000000
--- a/media-libs/mesa/files/0003-clover-fix-building-and-add-standart-locations-for-l.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3d4239edd2c89d3b67aef11786f0846fba96d718 Mon Sep 17 00:00:00 2001
-From: Alexey Shvetsov <alexxy@gentoo.org>
-Date: Sun, 3 Jun 2012 04:35:51 +0400
-Subject: [PATCH 3/3] clover fix building and add standart locations for
- libclc
-
----
- src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 ++--
- src/gallium/targets/opencl/Makefile.am | 1 +
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
-index 27276bc..78c8670 100644
---- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
-+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
-@@ -107,7 +107,7 @@ namespace {
- c.getHeaderSearchOpts().ResourceDir = CLANG_RESOURCE_DIR;
-
- // Add libclc generic search path
-- c.getHeaderSearchOpts().AddPath(LIBCLC_PATH "/generic/include/",
-+ c.getHeaderSearchOpts().AddPath(LIBCLC_PATH "/include/",
- clang::frontend::Angled,
- false, false, false);
-
-@@ -142,7 +142,7 @@ namespace {
- llvm::Linker linker("clover", mod);
-
- // Link the kernel with libclc
-- linker.LinkInFile(llvm::sys::Path(LIBCLC_PATH + triple + "/lib/builtins.bc"), isNative);
-+ linker.LinkInFile(llvm::sys::Path(LIBCLC_PATH + ("/lib/clc/" + triple + "/builtins.bc")), isNative);
- mod = linker.releaseModule();
-
- // Run link time optimizations
-diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
-index d55b21e..4c89e36 100644
---
-1.7.10.2
-
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index c2d9368..6243eed 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -123,7 +123,7 @@ DEPEND="${RDEPEND}
video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
)
opencl? (
- >=sys-devel/llvm[video_cards_radeon]
+ >=sys-devel/llvm-3.3[video_cards_radeon]
>=sys-devel/clang-3.3
>=sys-devel/gcc-4.6
)
@@ -141,10 +141,6 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
-PATCHES=(
- "${FILESDIR}/0002-radeong-opencl-rename-target-from-r600-to-r600-amd-n.patch"
- )
-
# It is slow without texrels, if someone wants slow
# mesa without texrels +pic use is worth the shot
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-06 13:32 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-06 13:32 UTC (permalink / raw
To: gentoo-commits
commit: 80e8f10f730178ef1bc1e873fd8e8539136250a1
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 6 13:32:04 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sat Apr 6 13:32:04 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=80e8f10f
Add patch to use non-null platform-id
Package-Manager: portage-2.2.0_alpha171
---
...mesa-9999-clover-use-non-null-platform-id.patch | 87 ++++++++++++++++++++
media-libs/mesa/mesa-9999.ebuild | 3 +
2 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/media-libs/mesa/files/mesa-9999-clover-use-non-null-platform-id.patch b/media-libs/mesa/files/mesa-9999-clover-use-non-null-platform-id.patch
new file mode 100644
index 0000000..5be513d
--- /dev/null
+++ b/media-libs/mesa/files/mesa-9999-clover-use-non-null-platform-id.patch
@@ -0,0 +1,87 @@
+From: Tom Stellard <thomas.stellard at amd.com>
+
+Using a NULL value for the platform_id is legal according to the spec,
+however, passing a NULL value as the platform parameter to
+clGetPlatformInfo() results in implementation defined behavior.
+
+In order to avoid implementation defined behavior some apps require that
+the platfrom_id is non-NULL. To statisfy this requirement, we just need
+to hard-code clover's platform_id to something other than NULL.
+
+v2:
+ - Handle platform check in clGetDeviceIDs()
+ - Use a macro for MESA_PLATFORM_ID
+
+v3:
+ - Use MESA_PLATFORM_ID when calling clGetDeviceIDs() from
+ clCreateContextFromType()
+---
+ src/gallium/state_trackers/clover/api/context.cpp | 2 +-
+ src/gallium/state_trackers/clover/api/device.cpp | 2 +-
+ src/gallium/state_trackers/clover/api/platform.cpp | 4 ++--
+ src/gallium/state_trackers/clover/api/util.hpp | 2 ++
+ 4 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp
+index 80afb6b..d509619 100644
+--- a/src/gallium/state_trackers/clover/api/context.cpp
++++ b/src/gallium/state_trackers/clover/api/context.cpp
+@@ -65,7 +65,7 @@ clCreateContextFromType(const cl_context_properties *props,
+ cl_device_id dev;
+ cl_int ret;
+
+- ret = clGetDeviceIDs(0, type, 1, &dev, 0);
++ ret = clGetDeviceIDs(MESA_PLATFORM_ID, type, 1, &dev, 0);
+ if (ret) {
+ ret_error(errcode_ret, ret);
+ return NULL;
+diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
+index cf68d0f..d9b0223 100644
+--- a/src/gallium/state_trackers/clover/api/device.cpp
++++ b/src/gallium/state_trackers/clover/api/device.cpp
+@@ -33,7 +33,7 @@ clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
+ cl_uint *num_devices) {
+ std::vector<cl_device_id> devs;
+
+- if (platform != NULL)
++ if (platform != MESA_PLATFORM_ID)
+ return CL_INVALID_PLATFORM;
+
+ if ((!num_entries && devices) ||
+diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
+index f99b694..3a988a6 100644
+--- a/src/gallium/state_trackers/clover/api/platform.cpp
++++ b/src/gallium/state_trackers/clover/api/platform.cpp
+@@ -34,7 +34,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
+ if (num_platforms)
+ *num_platforms = 1;
+ if (platforms)
+- *platforms = NULL;
++ *platforms = MESA_PLATFORM_ID;
+
+ return CL_SUCCESS;
+ }
+@@ -42,7 +42,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
+ PUBLIC cl_int
+ clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
+ size_t size, void *buf, size_t *size_ret) {
+- if (platform != NULL)
++ if (platform != MESA_PLATFORM_ID)
+ return CL_INVALID_PLATFORM;
+
+ switch (param_name) {
+diff --git a/src/gallium/state_trackers/clover/api/util.hpp b/src/gallium/state_trackers/clover/api/util.hpp
+index 2f9ec1f..0e80cda 100644
+--- a/src/gallium/state_trackers/clover/api/util.hpp
++++ b/src/gallium/state_trackers/clover/api/util.hpp
+@@ -31,6 +31,8 @@
+ #include "core/base.hpp"
+ #include "pipe/p_compiler.h"
+
++#define MESA_PLATFORM_ID ((cl_platform_id)0xc1c1c1c1)
++
+ namespace clover {
+ ///
+ /// Return a matrix (a container of containers) in \a buf with
+--
+1.7.11.4
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 6243eed..f679276 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -172,6 +172,9 @@ src_prepare() {
# relax the requirement that r300 must have llvm, bug 380303
epatch "${FILESDIR}"/${P}-dont-require-llvm-for-r300.patch
+ # use non-NULL platform id
+ epatch "${FILESDIR}/${P}-clover-use-non-null-platform-id.patch"
+
# fix for hardened pax_kernel, bug 240956
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-08 18:37 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-08 18:37 UTC (permalink / raw
To: gentoo-commits
commit: 0d15e6b397d74c1a83504ef098494b6b3670583b
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 8 18:36:48 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Mon Apr 8 18:36:48 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=0d15e6b3
Add fixes for clover
Package-Manager: portage-2.2.0_alpha171
---
...d-basic-64-bit-float-load-support-to-GPRs.patch | 181 ++++++++++++++++++++
.../0002-R600-Add-64-bit-v2f32-v2i32-store.patch | 57 ++++++
...0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch | 63 +++++++
media-libs/mesa/mesa-9999.ebuild | 3 +
4 files changed, 304 insertions(+), 0 deletions(-)
diff --git a/media-libs/mesa/files/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch b/media-libs/mesa/files/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch
new file mode 100644
index 0000000..7e7e4c1
--- /dev/null
+++ b/media-libs/mesa/files/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch
@@ -0,0 +1,181 @@
+From ecf4eaedd349d007227f07c145efcd37f4014067 Mon Sep 17 00:00:00 2001
+From: Dmitry Cherkassov <dcherkassov@gmail.com>
+Date: Thu, 7 Mar 2013 20:17:59 +0400
+Subject: [PATCH 1/3] R600: Add basic 64-bit float load support to GPRs
+
+* Added R600_Reg64 class
+* Added T#Index#.XY registers definition
+* Added v2i32 register reads from parameter and global space
+* Added f32 and i32 elements extraction from v2f32 and v2i32
+* Added v2i32 -> v2f32 conversions
+
+Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
+---
+ lib/Target/R600/AMDGPUISelLowering.cpp | 3 ++
+ lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 2 ++
+ lib/Target/R600/R600ISelLowering.cpp | 3 ++
+ lib/Target/R600/R600Instructions.td | 37 ++++++++++++++++++++++
+ lib/Target/R600/R600RegisterInfo.td | 16 ++++++++++
+ 5 files changed, 61 insertions(+)
+
+diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp
+index a266df5..8c26922 100644
+--- a/lib/Target/R600/AMDGPUISelLowering.cpp
++++ b/lib/Target/R600/AMDGPUISelLowering.cpp
+@@ -60,6 +60,9 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
+ setOperationAction(ISD::LOAD, MVT::v4f32, Promote);
+ AddPromotedToType(ISD::LOAD, MVT::v4f32, MVT::v4i32);
+
++ setOperationAction(ISD::LOAD, MVT::v2f32, Promote);
++ AddPromotedToType(ISD::LOAD, MVT::v2f32, MVT::v2i32);
++
+ setOperationAction(ISD::MUL, MVT::i64, Expand);
+
+ setOperationAction(ISD::UDIV, MVT::i32, Expand);
+diff --git a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
+index 469a8ad..82fef06 100644
+--- a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
++++ b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
+@@ -162,9 +162,11 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
+ case AMDGPU::VTX_READ_PARAM_8_eg:
+ case AMDGPU::VTX_READ_PARAM_16_eg:
+ case AMDGPU::VTX_READ_PARAM_32_eg:
++ case AMDGPU::VTX_READ_PARAM_64_eg:
+ case AMDGPU::VTX_READ_PARAM_128_eg:
+ case AMDGPU::VTX_READ_GLOBAL_8_eg:
+ case AMDGPU::VTX_READ_GLOBAL_32_eg:
++ case AMDGPU::VTX_READ_GLOBAL_64_eg:
+ case AMDGPU::VTX_READ_GLOBAL_128_eg:
+ case AMDGPU::TEX_VTX_CONSTBUF:
+ case AMDGPU::TEX_VTX_TEXBUF : {
+diff --git a/lib/Target/R600/R600ISelLowering.cpp b/lib/Target/R600/R600ISelLowering.cpp
+index 53e6e51..953f22d 100644
+--- a/lib/Target/R600/R600ISelLowering.cpp
++++ b/lib/Target/R600/R600ISelLowering.cpp
+@@ -32,6 +32,9 @@ R600TargetLowering::R600TargetLowering(TargetMachine &TM) :
+ addRegisterClass(MVT::f32, &AMDGPU::R600_Reg32RegClass);
+ addRegisterClass(MVT::v4i32, &AMDGPU::R600_Reg128RegClass);
+ addRegisterClass(MVT::i32, &AMDGPU::R600_Reg32RegClass);
++ addRegisterClass(MVT::v2f32, &AMDGPU::R600_Reg64RegClass);
++ addRegisterClass(MVT::v2i32, &AMDGPU::R600_Reg64RegClass);
++
+ computeRegisterProperties();
+
+ setOperationAction(ISD::FADD, MVT::v4f32, Expand);
+diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
+index b4c45e1..716c90d 100644
+--- a/lib/Target/R600/R600Instructions.td
++++ b/lib/Target/R600/R600Instructions.td
+@@ -1824,6 +1824,18 @@ class VTX_READ_32_eg <bits<8> buffer_id, list<dag> pattern>
+ let Constraints = "$ptr.ptr = $dst";
+ }
+
++class VTX_READ_64_eg <bits<8> buffer_id, list<dag> pattern>
++ : VTX_READ_eg <"VTX_READ_64", buffer_id, (outs R600_Reg64:$dst),
++ pattern> {
++
++ let MEGA_FETCH_COUNT = 8;
++ let DST_SEL_X = 0;
++ let DST_SEL_Y = 1;
++ let DST_SEL_Z = 7;
++ let DST_SEL_W = 7;
++ let DATA_FORMAT = 0x1D; // COLOR_32_32
++}
++
+ class VTX_READ_128_eg <bits<8> buffer_id, list<dag> pattern>
+ : VTX_READ_eg <"VTX_READ_128", buffer_id, (outs R600_Reg128:$dst),
+ pattern> {
+@@ -1857,6 +1869,11 @@ def VTX_READ_PARAM_32_eg : VTX_READ_32_eg <0,
+ [(set (i32 R600_TReg32_X:$dst), (load_param ADDRVTX_READ:$ptr))]
+ >;
+
++def VTX_READ_PARAM_64_eg : VTX_READ_64_eg <0,
++ [(set (v2i32 R600_Reg64:$dst), (load_param ADDRVTX_READ:$ptr))]
++>;
++
++
+ def VTX_READ_PARAM_128_eg : VTX_READ_128_eg <0,
+ [(set (v4i32 R600_Reg128:$dst), (load_param ADDRVTX_READ:$ptr))]
+ >;
+@@ -1875,6 +1892,12 @@ def VTX_READ_GLOBAL_32_eg : VTX_READ_32_eg <1,
+ [(set (i32 R600_TReg32_X:$dst), (global_load ADDRVTX_READ:$ptr))]
+ >;
+
++// 64-bit reads
++def VTX_READ_GLOBAL_64_eg : VTX_READ_64_eg <1,
++ [(set (v2i32 R600_Reg64:$dst), (global_load ADDRVTX_READ:$ptr))]
++>;
++
++
+ // 128-bit reads
+ def VTX_READ_GLOBAL_128_eg : VTX_READ_128_eg <1,
+ [(set (v4i32 R600_Reg128:$dst), (global_load ADDRVTX_READ:$ptr))]
+@@ -2352,10 +2375,24 @@ def : Insert_Element <i32, v4i32, R600_Reg32, R600_Reg128, 3, sub3>;
+ def : Vector4_Build <v4f32, R600_Reg128, f32, R600_Reg32>;
+ def : Vector4_Build <v4i32, R600_Reg128, i32, R600_Reg32>;
+
++def : Extract_Element <f32, v2f32, R600_Reg64, 0, sub0>;
++def : Extract_Element <f32, v2f32, R600_Reg64, 1, sub1>;
++
++def : Insert_Element <f32, v2f32, R600_Reg32, R600_Reg64, 0, sub0>;
++def : Insert_Element <f32, v2f32, R600_Reg32, R600_Reg64, 1, sub1>;
++
++def : Extract_Element <i32, v2i32, R600_Reg64, 0, sub0>;
++def : Extract_Element <i32, v2i32, R600_Reg64, 1, sub1>;
++
++def : Insert_Element <i32, v2i32, R600_Reg32, R600_Reg64, 0, sub0>;
++def : Insert_Element <i32, v2i32, R600_Reg32, R600_Reg64, 1, sub1>;
++
+ // bitconvert patterns
+
+ def : BitConvert <i32, f32, R600_Reg32>;
+ def : BitConvert <f32, i32, R600_Reg32>;
++def : BitConvert <v2f32, v2i32, R600_Reg64>;
++def : BitConvert <v2i32, v2f32, R600_Reg64>;
+ def : BitConvert <v4f32, v4i32, R600_Reg128>;
+ def : BitConvert <v4i32, v4f32, R600_Reg128>;
+
+diff --git a/lib/Target/R600/R600RegisterInfo.td b/lib/Target/R600/R600RegisterInfo.td
+index 03f4976..33593bc 100644
+--- a/lib/Target/R600/R600RegisterInfo.td
++++ b/lib/Target/R600/R600RegisterInfo.td
+@@ -23,6 +23,14 @@ class R600Reg_128<string n, list<Register> subregs, bits<16> encoding> :
+ let HWEncoding = encoding;
+ }
+
++class R600Reg_64<string n, list<Register> subregs, bits<16> encoding> :
++ RegisterWithSubRegs<n, subregs> {
++ let Namespace = "AMDGPU";
++ let SubRegIndices = [sub0, sub1];
++ let HWEncoding = encoding;
++}
++
++
+ foreach Index = 0-127 in {
+ foreach Chan = [ "X", "Y", "Z", "W" ] in {
+ // 32-bit Temporary Registers
+@@ -41,6 +49,11 @@ foreach Index = 0-127 in {
+ !cast<Register>("T"#Index#"_Z"),
+ !cast<Register>("T"#Index#"_W")],
+ Index>;
++
++ def T#Index#_XY : R600Reg_64 <"T"#Index#".XY",
++ [!cast<Register>("T"#Index#"_X"),
++ !cast<Register>("T"#Index#"_Y")],
++ Index>;
+ }
+
+ // KCACHE_BANK0
+@@ -178,6 +191,9 @@ def R600_Reg128 : RegisterClass<"AMDGPU", [v4f32, v4i32], 128,
+ let CopyCost = -1;
+ }
+
++def R600_Reg64 : RegisterClass<"AMDGPU", [v2f32, v2i32], 64,
++ (add (sequence "T%u_XY", 0, 63))>;
++
+ //===----------------------------------------------------------------------===//
+ // Register classes for indirect addressing
+ //===----------------------------------------------------------------------===//
+--
+1.8.1.5
+
diff --git a/media-libs/mesa/files/0002-R600-Add-64-bit-v2f32-v2i32-store.patch b/media-libs/mesa/files/0002-R600-Add-64-bit-v2f32-v2i32-store.patch
new file mode 100644
index 0000000..b51bb0f
--- /dev/null
+++ b/media-libs/mesa/files/0002-R600-Add-64-bit-v2f32-v2i32-store.patch
@@ -0,0 +1,57 @@
+From f48f6462adc38526a710626743863ba3915c68b4 Mon Sep 17 00:00:00 2001
+From: Dmitry Cherkassov <dcherkassov@gmail.com>
+Date: Thu, 7 Mar 2013 20:18:00 +0400
+Subject: [PATCH 2/3] R600: Add 64-bit v2f32/v2i32 store
+
+Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
+---
+ lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 1 +
+ lib/Target/R600/R600ISelLowering.cpp | 1 +
+ lib/Target/R600/R600Instructions.td | 7 +++++++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
+index 82fef06..e529f76 100644
+--- a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
++++ b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
+@@ -152,6 +152,7 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
+ break;
+ }
+ case AMDGPU::RAT_WRITE_CACHELESS_32_eg:
++ case AMDGPU::RAT_WRITE_CACHELESS_64_eg:
+ case AMDGPU::RAT_WRITE_CACHELESS_128_eg: {
+ uint64_t inst = getBinaryCodeForInstr(MI, Fixups);
+ EmitByte(INSTR_NATIVE, OS);
+diff --git a/lib/Target/R600/R600ISelLowering.cpp b/lib/Target/R600/R600ISelLowering.cpp
+index 953f22d..9980fe1 100644
+--- a/lib/Target/R600/R600ISelLowering.cpp
++++ b/lib/Target/R600/R600ISelLowering.cpp
+@@ -160,6 +160,7 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter(
+ }
+
+ case AMDGPU::RAT_WRITE_CACHELESS_32_eg:
++ case AMDGPU::RAT_WRITE_CACHELESS_64_eg:
+ case AMDGPU::RAT_WRITE_CACHELESS_128_eg: {
+ unsigned EOP = (llvm::next(I)->getOpcode() == AMDGPU::RETURN) ? 1 : 0;
+
+diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
+index 716c90d..8c926cd 100644
+--- a/lib/Target/R600/R600Instructions.td
++++ b/lib/Target/R600/R600Instructions.td
+@@ -1719,6 +1719,13 @@ def RAT_WRITE_CACHELESS_32_eg : RAT_WRITE_CACHELESS_eg <
+ [(global_store (i32 R600_TReg32_X:$rw_gpr), R600_TReg32_X:$index_gpr)]
+ >;
+
++// 64-bit store
++def RAT_WRITE_CACHELESS_64_eg : RAT_WRITE_CACHELESS_eg <
++ (ins R600_Reg64:$rw_gpr, R600_TReg32_X:$index_gpr, InstFlag:$eop),
++ 0x3, "RAT_WRITE_CACHELESS_64_eg",
++ [(global_store (v2i32 R600_Reg64:$rw_gpr), R600_TReg32_X:$index_gpr)]
++>;
++
+ //128-bit store
+ def RAT_WRITE_CACHELESS_128_eg : RAT_WRITE_CACHELESS_eg <
+ (ins R600_Reg128:$rw_gpr, R600_TReg32_X:$index_gpr, InstFlag:$eop),
+--
+1.8.1.5
+
diff --git a/media-libs/mesa/files/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch b/media-libs/mesa/files/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch
new file mode 100644
index 0000000..13511a3
--- /dev/null
+++ b/media-libs/mesa/files/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch
@@ -0,0 +1,63 @@
+From d01a8de8442b2ee3b7b49fb9cb5cb39d238116f6 Mon Sep 17 00:00:00 2001
+From: Dmitry Cherkassov <dcherkassov@gmail.com>
+Date: Thu, 7 Mar 2013 20:18:01 +0400
+Subject: [PATCH 3/3] R600: Add test for 64-bit v2f32/v2i32
+
+Added tests for checking v2f32/v2i32 load, store and element extract
+
+Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
+---
+ test/CodeGen/R600/64bit-kernel-args.ll | 41 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+ create mode 100644 test/CodeGen/R600/64bit-kernel-args.ll
+
+diff --git a/test/CodeGen/R600/64bit-kernel-args.ll b/test/CodeGen/R600/64bit-kernel-args.ll
+new file mode 100644
+index 0000000..fe86fcf
+--- /dev/null
++++ b/test/CodeGen/R600/64bit-kernel-args.ll
+@@ -0,0 +1,41 @@
++;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
++
++; CHECK: @v2i32_kernel_arg
++; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
++define void @v2i32_load_extract_store(i32 addrspace(1)* nocapture %out, <2 x i32> %in) {
++entry:
++ %0 = extractelement <2 x i32> %in, i32 0
++ store i32 %0, i32 addrspace(1)* %out, align 4
++ %1 = extractelement <2 x i32> %in, i32 1
++ %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %out, i32 1
++ store i32 %1, i32 addrspace(1)* %arrayidx1, align 4
++ ret void
++}
++
++; CHECK: @v2f32_kernel_arg
++; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
++define void @v2f32_load_extract_store(float addrspace(1)* nocapture %out, <2 x float> %in) {
++entry:
++ %0 = extractelement <2 x float> %in, i32 0
++ store float %0, float addrspace(1)* %out, align 4
++ %1 = extractelement <2 x float> %in, i32 1
++ %arrayidx1 = getelementptr inbounds float addrspace(1)* %out, i32 1
++ store float %1, float addrspace(1)* %arrayidx1, align 4
++ ret void
++}
++
++; CHECK: @v2i32_kernel_arg
++; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
++define void @v2i32_load_store(<2 x i32> addrspace(1)* %out, <2 x i32> %in) {
++entry:
++ store <2 x i32> %in, <2 x i32> addrspace(1)* %out
++ ret void
++}
++
++; CHECK: @v2f32_kernel_arg
++; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
++define void @v2f32_load_store(<2 x float> addrspace(1)* %out, <2 x float> %in) {
++entry:
++ store <2 x float> %in, <2 x float> addrspace(1)* %out
++ ret void
++}
+--
+1.8.1.5
+
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index f679276..d74726c 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -174,6 +174,9 @@ src_prepare() {
# use non-NULL platform id
epatch "${FILESDIR}/${P}-clover-use-non-null-platform-id.patch"
+ epatch "${FILESDIR}/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch"
+ epatch "${FILESDIR}/0002-R600-Add-64-bit-v2f32-v2i32-store.patch"
+ epatch "${FILESDIR}/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch"
# fix for hardened pax_kernel, bug 240956
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-08 18:40 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-08 18:40 UTC (permalink / raw
To: gentoo-commits
commit: 1f8b21fa962dedded5bff49c2fe340a11b056970
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 8 18:40:06 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Mon Apr 8 18:40:06 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=1f8b21fa
Revert "Add fixes for clover"
This reverts commit 0d15e6b397d74c1a83504ef098494b6b3670583b.
---
...d-basic-64-bit-float-load-support-to-GPRs.patch | 181 --------------------
.../0002-R600-Add-64-bit-v2f32-v2i32-store.patch | 57 ------
...0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch | 63 -------
media-libs/mesa/mesa-9999.ebuild | 3 -
4 files changed, 0 insertions(+), 304 deletions(-)
diff --git a/media-libs/mesa/files/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch b/media-libs/mesa/files/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch
deleted file mode 100644
index 7e7e4c1..0000000
--- a/media-libs/mesa/files/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From ecf4eaedd349d007227f07c145efcd37f4014067 Mon Sep 17 00:00:00 2001
-From: Dmitry Cherkassov <dcherkassov@gmail.com>
-Date: Thu, 7 Mar 2013 20:17:59 +0400
-Subject: [PATCH 1/3] R600: Add basic 64-bit float load support to GPRs
-
-* Added R600_Reg64 class
-* Added T#Index#.XY registers definition
-* Added v2i32 register reads from parameter and global space
-* Added f32 and i32 elements extraction from v2f32 and v2i32
-* Added v2i32 -> v2f32 conversions
-
-Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
----
- lib/Target/R600/AMDGPUISelLowering.cpp | 3 ++
- lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 2 ++
- lib/Target/R600/R600ISelLowering.cpp | 3 ++
- lib/Target/R600/R600Instructions.td | 37 ++++++++++++++++++++++
- lib/Target/R600/R600RegisterInfo.td | 16 ++++++++++
- 5 files changed, 61 insertions(+)
-
-diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp
-index a266df5..8c26922 100644
---- a/lib/Target/R600/AMDGPUISelLowering.cpp
-+++ b/lib/Target/R600/AMDGPUISelLowering.cpp
-@@ -60,6 +60,9 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
- setOperationAction(ISD::LOAD, MVT::v4f32, Promote);
- AddPromotedToType(ISD::LOAD, MVT::v4f32, MVT::v4i32);
-
-+ setOperationAction(ISD::LOAD, MVT::v2f32, Promote);
-+ AddPromotedToType(ISD::LOAD, MVT::v2f32, MVT::v2i32);
-+
- setOperationAction(ISD::MUL, MVT::i64, Expand);
-
- setOperationAction(ISD::UDIV, MVT::i32, Expand);
-diff --git a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
-index 469a8ad..82fef06 100644
---- a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
-+++ b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
-@@ -162,9 +162,11 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
- case AMDGPU::VTX_READ_PARAM_8_eg:
- case AMDGPU::VTX_READ_PARAM_16_eg:
- case AMDGPU::VTX_READ_PARAM_32_eg:
-+ case AMDGPU::VTX_READ_PARAM_64_eg:
- case AMDGPU::VTX_READ_PARAM_128_eg:
- case AMDGPU::VTX_READ_GLOBAL_8_eg:
- case AMDGPU::VTX_READ_GLOBAL_32_eg:
-+ case AMDGPU::VTX_READ_GLOBAL_64_eg:
- case AMDGPU::VTX_READ_GLOBAL_128_eg:
- case AMDGPU::TEX_VTX_CONSTBUF:
- case AMDGPU::TEX_VTX_TEXBUF : {
-diff --git a/lib/Target/R600/R600ISelLowering.cpp b/lib/Target/R600/R600ISelLowering.cpp
-index 53e6e51..953f22d 100644
---- a/lib/Target/R600/R600ISelLowering.cpp
-+++ b/lib/Target/R600/R600ISelLowering.cpp
-@@ -32,6 +32,9 @@ R600TargetLowering::R600TargetLowering(TargetMachine &TM) :
- addRegisterClass(MVT::f32, &AMDGPU::R600_Reg32RegClass);
- addRegisterClass(MVT::v4i32, &AMDGPU::R600_Reg128RegClass);
- addRegisterClass(MVT::i32, &AMDGPU::R600_Reg32RegClass);
-+ addRegisterClass(MVT::v2f32, &AMDGPU::R600_Reg64RegClass);
-+ addRegisterClass(MVT::v2i32, &AMDGPU::R600_Reg64RegClass);
-+
- computeRegisterProperties();
-
- setOperationAction(ISD::FADD, MVT::v4f32, Expand);
-diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
-index b4c45e1..716c90d 100644
---- a/lib/Target/R600/R600Instructions.td
-+++ b/lib/Target/R600/R600Instructions.td
-@@ -1824,6 +1824,18 @@ class VTX_READ_32_eg <bits<8> buffer_id, list<dag> pattern>
- let Constraints = "$ptr.ptr = $dst";
- }
-
-+class VTX_READ_64_eg <bits<8> buffer_id, list<dag> pattern>
-+ : VTX_READ_eg <"VTX_READ_64", buffer_id, (outs R600_Reg64:$dst),
-+ pattern> {
-+
-+ let MEGA_FETCH_COUNT = 8;
-+ let DST_SEL_X = 0;
-+ let DST_SEL_Y = 1;
-+ let DST_SEL_Z = 7;
-+ let DST_SEL_W = 7;
-+ let DATA_FORMAT = 0x1D; // COLOR_32_32
-+}
-+
- class VTX_READ_128_eg <bits<8> buffer_id, list<dag> pattern>
- : VTX_READ_eg <"VTX_READ_128", buffer_id, (outs R600_Reg128:$dst),
- pattern> {
-@@ -1857,6 +1869,11 @@ def VTX_READ_PARAM_32_eg : VTX_READ_32_eg <0,
- [(set (i32 R600_TReg32_X:$dst), (load_param ADDRVTX_READ:$ptr))]
- >;
-
-+def VTX_READ_PARAM_64_eg : VTX_READ_64_eg <0,
-+ [(set (v2i32 R600_Reg64:$dst), (load_param ADDRVTX_READ:$ptr))]
-+>;
-+
-+
- def VTX_READ_PARAM_128_eg : VTX_READ_128_eg <0,
- [(set (v4i32 R600_Reg128:$dst), (load_param ADDRVTX_READ:$ptr))]
- >;
-@@ -1875,6 +1892,12 @@ def VTX_READ_GLOBAL_32_eg : VTX_READ_32_eg <1,
- [(set (i32 R600_TReg32_X:$dst), (global_load ADDRVTX_READ:$ptr))]
- >;
-
-+// 64-bit reads
-+def VTX_READ_GLOBAL_64_eg : VTX_READ_64_eg <1,
-+ [(set (v2i32 R600_Reg64:$dst), (global_load ADDRVTX_READ:$ptr))]
-+>;
-+
-+
- // 128-bit reads
- def VTX_READ_GLOBAL_128_eg : VTX_READ_128_eg <1,
- [(set (v4i32 R600_Reg128:$dst), (global_load ADDRVTX_READ:$ptr))]
-@@ -2352,10 +2375,24 @@ def : Insert_Element <i32, v4i32, R600_Reg32, R600_Reg128, 3, sub3>;
- def : Vector4_Build <v4f32, R600_Reg128, f32, R600_Reg32>;
- def : Vector4_Build <v4i32, R600_Reg128, i32, R600_Reg32>;
-
-+def : Extract_Element <f32, v2f32, R600_Reg64, 0, sub0>;
-+def : Extract_Element <f32, v2f32, R600_Reg64, 1, sub1>;
-+
-+def : Insert_Element <f32, v2f32, R600_Reg32, R600_Reg64, 0, sub0>;
-+def : Insert_Element <f32, v2f32, R600_Reg32, R600_Reg64, 1, sub1>;
-+
-+def : Extract_Element <i32, v2i32, R600_Reg64, 0, sub0>;
-+def : Extract_Element <i32, v2i32, R600_Reg64, 1, sub1>;
-+
-+def : Insert_Element <i32, v2i32, R600_Reg32, R600_Reg64, 0, sub0>;
-+def : Insert_Element <i32, v2i32, R600_Reg32, R600_Reg64, 1, sub1>;
-+
- // bitconvert patterns
-
- def : BitConvert <i32, f32, R600_Reg32>;
- def : BitConvert <f32, i32, R600_Reg32>;
-+def : BitConvert <v2f32, v2i32, R600_Reg64>;
-+def : BitConvert <v2i32, v2f32, R600_Reg64>;
- def : BitConvert <v4f32, v4i32, R600_Reg128>;
- def : BitConvert <v4i32, v4f32, R600_Reg128>;
-
-diff --git a/lib/Target/R600/R600RegisterInfo.td b/lib/Target/R600/R600RegisterInfo.td
-index 03f4976..33593bc 100644
---- a/lib/Target/R600/R600RegisterInfo.td
-+++ b/lib/Target/R600/R600RegisterInfo.td
-@@ -23,6 +23,14 @@ class R600Reg_128<string n, list<Register> subregs, bits<16> encoding> :
- let HWEncoding = encoding;
- }
-
-+class R600Reg_64<string n, list<Register> subregs, bits<16> encoding> :
-+ RegisterWithSubRegs<n, subregs> {
-+ let Namespace = "AMDGPU";
-+ let SubRegIndices = [sub0, sub1];
-+ let HWEncoding = encoding;
-+}
-+
-+
- foreach Index = 0-127 in {
- foreach Chan = [ "X", "Y", "Z", "W" ] in {
- // 32-bit Temporary Registers
-@@ -41,6 +49,11 @@ foreach Index = 0-127 in {
- !cast<Register>("T"#Index#"_Z"),
- !cast<Register>("T"#Index#"_W")],
- Index>;
-+
-+ def T#Index#_XY : R600Reg_64 <"T"#Index#".XY",
-+ [!cast<Register>("T"#Index#"_X"),
-+ !cast<Register>("T"#Index#"_Y")],
-+ Index>;
- }
-
- // KCACHE_BANK0
-@@ -178,6 +191,9 @@ def R600_Reg128 : RegisterClass<"AMDGPU", [v4f32, v4i32], 128,
- let CopyCost = -1;
- }
-
-+def R600_Reg64 : RegisterClass<"AMDGPU", [v2f32, v2i32], 64,
-+ (add (sequence "T%u_XY", 0, 63))>;
-+
- //===----------------------------------------------------------------------===//
- // Register classes for indirect addressing
- //===----------------------------------------------------------------------===//
---
-1.8.1.5
-
diff --git a/media-libs/mesa/files/0002-R600-Add-64-bit-v2f32-v2i32-store.patch b/media-libs/mesa/files/0002-R600-Add-64-bit-v2f32-v2i32-store.patch
deleted file mode 100644
index b51bb0f..0000000
--- a/media-libs/mesa/files/0002-R600-Add-64-bit-v2f32-v2i32-store.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From f48f6462adc38526a710626743863ba3915c68b4 Mon Sep 17 00:00:00 2001
-From: Dmitry Cherkassov <dcherkassov@gmail.com>
-Date: Thu, 7 Mar 2013 20:18:00 +0400
-Subject: [PATCH 2/3] R600: Add 64-bit v2f32/v2i32 store
-
-Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
----
- lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 1 +
- lib/Target/R600/R600ISelLowering.cpp | 1 +
- lib/Target/R600/R600Instructions.td | 7 +++++++
- 3 files changed, 9 insertions(+)
-
-diff --git a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
-index 82fef06..e529f76 100644
---- a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
-+++ b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
-@@ -152,6 +152,7 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
- break;
- }
- case AMDGPU::RAT_WRITE_CACHELESS_32_eg:
-+ case AMDGPU::RAT_WRITE_CACHELESS_64_eg:
- case AMDGPU::RAT_WRITE_CACHELESS_128_eg: {
- uint64_t inst = getBinaryCodeForInstr(MI, Fixups);
- EmitByte(INSTR_NATIVE, OS);
-diff --git a/lib/Target/R600/R600ISelLowering.cpp b/lib/Target/R600/R600ISelLowering.cpp
-index 953f22d..9980fe1 100644
---- a/lib/Target/R600/R600ISelLowering.cpp
-+++ b/lib/Target/R600/R600ISelLowering.cpp
-@@ -160,6 +160,7 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter(
- }
-
- case AMDGPU::RAT_WRITE_CACHELESS_32_eg:
-+ case AMDGPU::RAT_WRITE_CACHELESS_64_eg:
- case AMDGPU::RAT_WRITE_CACHELESS_128_eg: {
- unsigned EOP = (llvm::next(I)->getOpcode() == AMDGPU::RETURN) ? 1 : 0;
-
-diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
-index 716c90d..8c926cd 100644
---- a/lib/Target/R600/R600Instructions.td
-+++ b/lib/Target/R600/R600Instructions.td
-@@ -1719,6 +1719,13 @@ def RAT_WRITE_CACHELESS_32_eg : RAT_WRITE_CACHELESS_eg <
- [(global_store (i32 R600_TReg32_X:$rw_gpr), R600_TReg32_X:$index_gpr)]
- >;
-
-+// 64-bit store
-+def RAT_WRITE_CACHELESS_64_eg : RAT_WRITE_CACHELESS_eg <
-+ (ins R600_Reg64:$rw_gpr, R600_TReg32_X:$index_gpr, InstFlag:$eop),
-+ 0x3, "RAT_WRITE_CACHELESS_64_eg",
-+ [(global_store (v2i32 R600_Reg64:$rw_gpr), R600_TReg32_X:$index_gpr)]
-+>;
-+
- //128-bit store
- def RAT_WRITE_CACHELESS_128_eg : RAT_WRITE_CACHELESS_eg <
- (ins R600_Reg128:$rw_gpr, R600_TReg32_X:$index_gpr, InstFlag:$eop),
---
-1.8.1.5
-
diff --git a/media-libs/mesa/files/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch b/media-libs/mesa/files/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch
deleted file mode 100644
index 13511a3..0000000
--- a/media-libs/mesa/files/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d01a8de8442b2ee3b7b49fb9cb5cb39d238116f6 Mon Sep 17 00:00:00 2001
-From: Dmitry Cherkassov <dcherkassov@gmail.com>
-Date: Thu, 7 Mar 2013 20:18:01 +0400
-Subject: [PATCH 3/3] R600: Add test for 64-bit v2f32/v2i32
-
-Added tests for checking v2f32/v2i32 load, store and element extract
-
-Signed-off-by: Dmitry Cherkassov <dcherkassov@gmail.com>
----
- test/CodeGen/R600/64bit-kernel-args.ll | 41 ++++++++++++++++++++++++++++++++++
- 1 file changed, 41 insertions(+)
- create mode 100644 test/CodeGen/R600/64bit-kernel-args.ll
-
-diff --git a/test/CodeGen/R600/64bit-kernel-args.ll b/test/CodeGen/R600/64bit-kernel-args.ll
-new file mode 100644
-index 0000000..fe86fcf
---- /dev/null
-+++ b/test/CodeGen/R600/64bit-kernel-args.ll
-@@ -0,0 +1,41 @@
-+;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
-+
-+; CHECK: @v2i32_kernel_arg
-+; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
-+define void @v2i32_load_extract_store(i32 addrspace(1)* nocapture %out, <2 x i32> %in) {
-+entry:
-+ %0 = extractelement <2 x i32> %in, i32 0
-+ store i32 %0, i32 addrspace(1)* %out, align 4
-+ %1 = extractelement <2 x i32> %in, i32 1
-+ %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %out, i32 1
-+ store i32 %1, i32 addrspace(1)* %arrayidx1, align 4
-+ ret void
-+}
-+
-+; CHECK: @v2f32_kernel_arg
-+; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
-+define void @v2f32_load_extract_store(float addrspace(1)* nocapture %out, <2 x float> %in) {
-+entry:
-+ %0 = extractelement <2 x float> %in, i32 0
-+ store float %0, float addrspace(1)* %out, align 4
-+ %1 = extractelement <2 x float> %in, i32 1
-+ %arrayidx1 = getelementptr inbounds float addrspace(1)* %out, i32 1
-+ store float %1, float addrspace(1)* %arrayidx1, align 4
-+ ret void
-+}
-+
-+; CHECK: @v2i32_kernel_arg
-+; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
-+define void @v2i32_load_store(<2 x i32> addrspace(1)* %out, <2 x i32> %in) {
-+entry:
-+ store <2 x i32> %in, <2 x i32> addrspace(1)* %out
-+ ret void
-+}
-+
-+; CHECK: @v2f32_kernel_arg
-+; CHECK: VTX_READ_64 T{{[0-9]+}}.XY, T{{[0-9]+}}.X, 40
-+define void @v2f32_load_store(<2 x float> addrspace(1)* %out, <2 x float> %in) {
-+entry:
-+ store <2 x float> %in, <2 x float> addrspace(1)* %out
-+ ret void
-+}
---
-1.8.1.5
-
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index d74726c..f679276 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -174,9 +174,6 @@ src_prepare() {
# use non-NULL platform id
epatch "${FILESDIR}/${P}-clover-use-non-null-platform-id.patch"
- epatch "${FILESDIR}/0001-R600-Add-basic-64-bit-float-load-support-to-GPRs.patch"
- epatch "${FILESDIR}/0002-R600-Add-64-bit-v2f32-v2i32-store.patch"
- epatch "${FILESDIR}/0003-R600-Add-test-for-64-bit-v2f32-v2i32.patch"
# fix for hardened pax_kernel, bug 240956
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-11 5:30 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-11 5:30 UTC (permalink / raw
To: gentoo-commits
commit: cb2c78f3358ef8d77ae830a29c673378f036392f
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 05:30:02 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 05:30:02 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=cb2c78f3
Update patches
Package-Manager: portage-2.2.0_alpha171
---
...mesa-9999-clover-use-non-null-platform-id.patch | 103 -----
...mesa-9999-use-a-struct-for-cl_platform_id.patch | 400 ++++++++++++++++++++
media-libs/mesa/mesa-9999.ebuild | 2 +-
3 files changed, 401 insertions(+), 104 deletions(-)
diff --git a/media-libs/mesa/files/mesa-9999-clover-use-non-null-platform-id.patch b/media-libs/mesa/files/mesa-9999-clover-use-non-null-platform-id.patch
deleted file mode 100644
index 1c2d065..0000000
--- a/media-libs/mesa/files/mesa-9999-clover-use-non-null-platform-id.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From cc0fb86ba8ca9c96806f05e71b70db3da5edf4fd Mon Sep 17 00:00:00 2001
-From: Tom Stellard <thomas.stellard@amd.com>
-Date: Fri, 5 Apr 2013 13:23:01 -0700
-Subject: [PATCH] clover: Use a non-NULL value to represent the platform_id v3
-
-Using a NULL value for the platform_id is legal according to the spec,
-however, passing a NULL value as the platform parameter to
-clGetPlatformInfo() results in implementation defined behavior.
-
-In order to avoid implementation defined behavior some apps require that
-the platfrom_id is non-NULL. To statisfy this requirement, we just need
-to hard-code clover's platform_id to something other than NULL.
-
-v2:
- - Handle platform check in clGetDeviceIDs()
- - Use a macro for MESA_PLATFORM_ID
-
-v3:
- - Use MESA_PLATFORM_ID when calling clGetDeviceIDs() from
- clCreateContextFromType()
-
-v4:
- - Use MESA_PLATFORM_ID when checking the CL_CONTEXT_PLATFORM property
----
- src/gallium/state_trackers/clover/api/context.cpp | 4 ++--
- src/gallium/state_trackers/clover/api/device.cpp | 2 +-
- src/gallium/state_trackers/clover/api/platform.cpp | 4 ++--
- src/gallium/state_trackers/clover/api/util.hpp | 2 ++
- 4 files changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp
-index 80afb6b..f25856f 100644
---- a/src/gallium/state_trackers/clover/api/context.cpp
-+++ b/src/gallium/state_trackers/clover/api/context.cpp
-@@ -42,7 +42,7 @@ clCreateContext(const cl_context_properties *props, cl_uint num_devs,
-
- for (auto p : mprops) {
- if (!(p.first == CL_CONTEXT_PLATFORM &&
-- (cl_platform_id)p.second == NULL))
-+ (cl_platform_id)p.second == MESA_PLATFORM_ID))
- throw error(CL_INVALID_PROPERTY);
- }
-
-@@ -65,7 +65,7 @@ clCreateContextFromType(const cl_context_properties *props,
- cl_device_id dev;
- cl_int ret;
-
-- ret = clGetDeviceIDs(0, type, 1, &dev, 0);
-+ ret = clGetDeviceIDs(MESA_PLATFORM_ID, type, 1, &dev, 0);
- if (ret) {
- ret_error(errcode_ret, ret);
- return NULL;
-diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
-index cf68d0f..d9b0223 100644
---- a/src/gallium/state_trackers/clover/api/device.cpp
-+++ b/src/gallium/state_trackers/clover/api/device.cpp
-@@ -33,7 +33,7 @@ clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
- cl_uint *num_devices) {
- std::vector<cl_device_id> devs;
-
-- if (platform != NULL)
-+ if (platform != MESA_PLATFORM_ID)
- return CL_INVALID_PLATFORM;
-
- if ((!num_entries && devices) ||
-diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
-index f99b694..3a988a6 100644
---- a/src/gallium/state_trackers/clover/api/platform.cpp
-+++ b/src/gallium/state_trackers/clover/api/platform.cpp
-@@ -34,7 +34,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
- if (num_platforms)
- *num_platforms = 1;
- if (platforms)
-- *platforms = NULL;
-+ *platforms = MESA_PLATFORM_ID;
-
- return CL_SUCCESS;
- }
-@@ -42,7 +42,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
- PUBLIC cl_int
- clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
- size_t size, void *buf, size_t *size_ret) {
-- if (platform != NULL)
-+ if (platform != MESA_PLATFORM_ID)
- return CL_INVALID_PLATFORM;
-
- switch (param_name) {
-diff --git a/src/gallium/state_trackers/clover/api/util.hpp b/src/gallium/state_trackers/clover/api/util.hpp
-index 2f9ec1f..0e80cda 100644
---- a/src/gallium/state_trackers/clover/api/util.hpp
-+++ b/src/gallium/state_trackers/clover/api/util.hpp
-@@ -31,6 +31,8 @@
- #include "core/base.hpp"
- #include "pipe/p_compiler.h"
-
-+#define MESA_PLATFORM_ID ((cl_platform_id)0xc1c1c1c1)
-+
- namespace clover {
- ///
- /// Return a matrix (a container of containers) in \a buf with
---
-1.8.1.5
-
diff --git a/media-libs/mesa/files/mesa-9999-use-a-struct-for-cl_platform_id.patch b/media-libs/mesa/files/mesa-9999-use-a-struct-for-cl_platform_id.patch
new file mode 100644
index 0000000..e5c7786
--- /dev/null
+++ b/media-libs/mesa/files/mesa-9999-use-a-struct-for-cl_platform_id.patch
@@ -0,0 +1,400 @@
+From 39d5479f931bfce9641fb43d99a50cea63952de6 Mon Sep 17 00:00:00 2001
+From: Francisco Jerez <currojerez@riseup.net>
+Date: Wed, 10 Apr 2013 19:16:43 +0000
+Subject: clover: Use a struct to represent cl_platform_id
+
+---
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
+index 33ff03d..b4c197a 100644
+--- a/src/gallium/state_trackers/clover/Makefile.am
++++ b/src/gallium/state_trackers/clover/Makefile.am
+@@ -50,6 +50,8 @@ libclover_la_SOURCES = \
+ core/format.cpp \
+ core/memory.hpp \
+ core/memory.cpp \
++ core/platform.hpp \
++ core/platform.cpp \
+ core/resource.hpp \
+ core/resource.cpp \
+ core/sampler.hpp \
+diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp
+index 80afb6b..99b9566 100644
+--- a/src/gallium/state_trackers/clover/api/context.cpp
++++ b/src/gallium/state_trackers/clover/api/context.cpp
+@@ -41,8 +41,7 @@ clCreateContext(const cl_context_properties *props, cl_uint num_devs,
+ throw error(CL_INVALID_DEVICE);
+
+ for (auto p : mprops) {
+- if (!(p.first == CL_CONTEXT_PLATFORM &&
+- (cl_platform_id)p.second == NULL))
++ if (p.first != CL_CONTEXT_PLATFORM)
+ throw error(CL_INVALID_PROPERTY);
+ }
+
+@@ -61,17 +60,25 @@ clCreateContextFromType(const cl_context_properties *props,
+ cl_device_type type,
+ void (CL_CALLBACK *pfn_notify)(
+ const char *, const void *, size_t, void *),
+- void *user_data, cl_int *errcode_ret) {
++ void *user_data, cl_int *errcode_ret) try {
++ cl_platform_id platform;
++ cl_uint num_platforms;
+ cl_device_id dev;
+ cl_int ret;
+
+- ret = clGetDeviceIDs(0, type, 1, &dev, 0);
+- if (ret) {
+- ret_error(errcode_ret, ret);
+- return NULL;
+- }
++ ret = clGetPlatformIDs(1, &platform, &num_platforms);
++ if (ret || !num_platforms)
++ throw error(CL_INVALID_PLATFORM);
++
++ ret = clGetDeviceIDs(platform, type, 1, &dev, 0);
++ if (ret)
++ throw error(CL_DEVICE_NOT_FOUND);
+
+ return clCreateContext(props, 1, &dev, pfn_notify, user_data, errcode_ret);
++
++} catch(error &e) {
++ ret_error(errcode_ret, e);
++ return NULL;
+ }
+
+ PUBLIC cl_int
+diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
+index cf68d0f..dfb440d 100644
+--- a/src/gallium/state_trackers/clover/api/device.cpp
++++ b/src/gallium/state_trackers/clover/api/device.cpp
+@@ -21,29 +21,25 @@
+ //
+
+ #include "api/util.hpp"
++#include "core/platform.hpp"
+ #include "core/device.hpp"
+
+ using namespace clover;
+
+-static device_registry registry;
+-
+ PUBLIC cl_int
+ clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
+ cl_uint num_entries, cl_device_id *devices,
+ cl_uint *num_devices) {
+ std::vector<cl_device_id> devs;
+
+- if (platform != NULL)
+- return CL_INVALID_PLATFORM;
+-
+ if ((!num_entries && devices) ||
+ (!num_devices && !devices))
+ return CL_INVALID_VALUE;
+
+ // Collect matching devices
+- for (device &dev : registry) {
++ for (device &dev : *platform) {
+ if (((device_type & CL_DEVICE_TYPE_DEFAULT) &&
+- &dev == ®istry.front()) ||
++ &dev == &platform->front()) ||
+ (device_type & dev.type()))
+ devs.push_back(&dev);
+ }
+@@ -223,13 +219,15 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param,
+ return string_property(buf, size, size_ret, "FULL_PROFILE");
+
+ case CL_DEVICE_VERSION:
+- return string_property(buf, size, size_ret, "OpenCL 1.1 MESA " PACKAGE_VERSION);
++ return string_property(buf, size, size_ret,
++ "OpenCL 1.1 MESA " PACKAGE_VERSION);
+
+ case CL_DEVICE_EXTENSIONS:
+ return string_property(buf, size, size_ret, "");
+
+ case CL_DEVICE_PLATFORM:
+- return scalar_property<cl_platform_id>(buf, size, size_ret, NULL);
++ return scalar_property<cl_platform_id>(buf, size, size_ret,
++ dev->platform);
+
+ case CL_DEVICE_HOST_UNIFIED_MEMORY:
+ return scalar_property<cl_bool>(buf, size, size_ret, CL_TRUE);
+diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
+index f99b694..90111c7 100644
+--- a/src/gallium/state_trackers/clover/api/platform.cpp
++++ b/src/gallium/state_trackers/clover/api/platform.cpp
+@@ -21,9 +21,12 @@
+ //
+
+ #include "api/util.hpp"
++#include "core/platform.hpp"
+
+ using namespace clover;
+
++static platform __platform;
++
+ PUBLIC cl_int
+ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
+ cl_uint *num_platforms) {
+@@ -34,7 +37,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
+ if (num_platforms)
+ *num_platforms = 1;
+ if (platforms)
+- *platforms = NULL;
++ *platforms = &__platform;
+
+ return CL_SUCCESS;
+ }
+@@ -42,7 +45,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
+ PUBLIC cl_int
+ clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
+ size_t size, void *buf, size_t *size_ret) {
+- if (platform != NULL)
++ if (platform != &__platform)
+ return CL_INVALID_PLATFORM;
+
+ switch (param_name) {
+diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp
+index d93a1f6..8c6a8a6 100644
+--- a/src/gallium/state_trackers/clover/core/device.cpp
++++ b/src/gallium/state_trackers/clover/core/device.cpp
+@@ -38,13 +38,16 @@ namespace {
+ }
+ }
+
+-_cl_device_id::_cl_device_id(pipe_loader_device *ldev) : ldev(ldev) {
++_cl_device_id::_cl_device_id(clover::platform *platform,
++ pipe_loader_device *ldev) :
++ platform(platform), ldev(ldev) {
+ pipe = pipe_loader_create_screen(ldev, PIPE_SEARCH_DIR);
+ if (!pipe || !pipe->get_param(pipe, PIPE_CAP_COMPUTE))
+ throw error(CL_INVALID_DEVICE);
+ }
+
+-_cl_device_id::_cl_device_id(_cl_device_id &&dev) : pipe(dev.pipe), ldev(dev.ldev) {
++_cl_device_id::_cl_device_id(_cl_device_id &&dev) :
++ platform(dev.platform), pipe(dev.pipe), ldev(dev.ldev) {
+ dev.ldev = NULL;
+ dev.pipe = NULL;
+ }
+@@ -56,6 +59,15 @@ _cl_device_id::~_cl_device_id() {
+ pipe_loader_release(&ldev, 1);
+ }
+
++void
++_cl_device_id::operator=(_cl_device_id &&dev) {
++ platform = dev.platform;
++ pipe = dev.pipe;
++ ldev = dev.ldev;
++ dev.ldev = NULL;
++ dev.pipe = NULL;
++}
++
+ cl_device_type
+ _cl_device_id::type() const {
+ switch (ldev->type) {
+@@ -179,16 +191,3 @@ _cl_device_id::ir_target() const {
+ PIPE_COMPUTE_CAP_IR_TARGET);
+ return { target.data() };
+ }
+-
+-device_registry::device_registry() {
+- int n = pipe_loader_probe(NULL, 0);
+- std::vector<pipe_loader_device *> ldevs(n);
+-
+- pipe_loader_probe(&ldevs.front(), n);
+-
+- for (pipe_loader_device *ldev : ldevs) {
+- try {
+- devs.emplace_back(ldev);
+- } catch (error &) {}
+- }
+-}
+diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp
+index 5b92751..897a003 100644
+--- a/src/gallium/state_trackers/clover/core/device.hpp
++++ b/src/gallium/state_trackers/clover/core/device.hpp
+@@ -32,17 +32,21 @@
+
+ namespace clover {
+ typedef struct _cl_device_id device;
++ typedef struct _cl_platform_id platform;
+ class root_resource;
+ class hard_event;
+ }
+
+ struct _cl_device_id {
+ public:
+- _cl_device_id(pipe_loader_device *ldev);
++ _cl_device_id(clover::platform *platform, pipe_loader_device *ldev);
+ _cl_device_id(_cl_device_id &&dev);
+ _cl_device_id(const _cl_device_id &dev) = delete;
+ ~_cl_device_id();
+
++ void operator=(_cl_device_id &&dev);
++ void operator=(const _cl_device_id &dev) = delete;
++
+ cl_device_type type() const;
+ cl_uint vendor_id() const;
+ size_t max_images_read() const;
+@@ -70,41 +74,11 @@ public:
+ friend std::set<cl_image_format>
+ clover::supported_formats(cl_context, cl_mem_object_type);
+
++ clover::platform *platform;
++
+ private:
+ pipe_screen *pipe;
+ pipe_loader_device *ldev;
+ };
+
+-namespace clover {
+- ///
+- /// Container of all the compute devices that are available in the
+- /// system.
+- ///
+- class device_registry {
+- public:
+- typedef std::vector<device>::iterator iterator;
+-
+- device_registry();
+-
+- iterator begin() {
+- return devs.begin();
+- }
+-
+- iterator end() {
+- return devs.end();
+- }
+-
+- device &front() {
+- return devs.front();
+- }
+-
+- device &back() {
+- return devs.back();
+- }
+-
+- protected:
+- std::vector<device> devs;
+- };
+-}
+-
+ #endif
+diff --git a/src/gallium/state_trackers/clover/core/platform.cpp b/src/gallium/state_trackers/clover/core/platform.cpp
+new file mode 100644
+index 0000000..f557ef2
+--- a/dev/null
++++ b/src/gallium/state_trackers/clover/core/platform.cpp
+@@ -0,0 +1,38 @@
++//
++// Copyright 2012 Francisco Jerez
++//
++// Permission is hereby granted, free of charge, to any person obtaining a
++// copy of this software and associated documentation files (the "Software"),
++// to deal in the Software without restriction, including without limitation
++// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++// and/or sell copies of the Software, and to permit persons to whom the
++// Software is furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++// THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
++// OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++// SOFTWARE.
++//
++
++#include "core/platform.hpp"
++
++using namespace clover;
++
++_cl_platform_id::_cl_platform_id() {
++ int n = pipe_loader_probe(NULL, 0);
++ std::vector<pipe_loader_device *> ldevs(n);
++
++ pipe_loader_probe(&ldevs.front(), n);
++
++ for (pipe_loader_device *ldev : ldevs) {
++ try {
++ devs.emplace_back(this, ldev);
++ } catch (error &) {}
++ }
++}
+diff --git a/src/gallium/state_trackers/clover/core/platform.hpp b/src/gallium/state_trackers/clover/core/platform.hpp
+new file mode 100644
+index 0000000..eeb6d60
+--- a/dev/null
++++ b/src/gallium/state_trackers/clover/core/platform.hpp
+@@ -0,0 +1,66 @@
++//
++// Copyright 2013 Francisco Jerez
++//
++// Permission is hereby granted, free of charge, to any person obtaining a
++// copy of this software and associated documentation files (the "Software"),
++// to deal in the Software without restriction, including without limitation
++// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++// and/or sell copies of the Software, and to permit persons to whom the
++// Software is furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included in
++// all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++// THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
++// OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++// SOFTWARE.
++//
++
++#ifndef __CORE_PLATFORM_HPP__
++#define __CORE_PLATFORM_HPP__
++
++#include <vector>
++
++#include "core/base.hpp"
++#include "core/device.hpp"
++
++namespace clover {
++ typedef struct _cl_platform_id platform;
++}
++
++struct _cl_platform_id {
++public:
++ typedef std::vector<clover::device>::iterator iterator;
++
++ _cl_platform_id();
++
++ ///
++ /// Container of all compute devices that are available in the platform.
++ ///
++ /// @{
++ iterator begin() {
++ return devs.begin();
++ }
++
++ iterator end() {
++ return devs.end();
++ }
++
++ clover::device &front() {
++ return devs.front();
++ }
++
++ clover::device &back() {
++ return devs.back();
++ }
++ /// @}
++
++protected:
++ std::vector<clover::device> devs;
++};
++
++#endif
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index f679276..6682954 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -173,7 +173,7 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-dont-require-llvm-for-r300.patch
# use non-NULL platform id
- epatch "${FILESDIR}/${P}-clover-use-non-null-platform-id.patch"
+ epatch "${FILESDIR}/${P}-use-a-struct-for-cl_platform_id.patch"
# fix for hardened pax_kernel, bug 240956
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-11 15:36 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-11 15:36 UTC (permalink / raw
To: gentoo-commits
commit: 5fc6d117965dd1cbc2abd547fcd3648935c13e71
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 15:36:21 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 15:36:21 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=5fc6d117
Add patch for multigpu in clover
Package-Manager: portage-2.2.0_alpha171
---
...ort-multiple-devices-in-clCreateContextFr.patch | 51 ++++++++++++++++++++
media-libs/mesa/mesa-9999.ebuild | 1 +
2 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/media-libs/mesa/files/0001-clover-Support-multiple-devices-in-clCreateContextFr.patch b/media-libs/mesa/files/0001-clover-Support-multiple-devices-in-clCreateContextFr.patch
new file mode 100644
index 0000000..bd050ad
--- /dev/null
+++ b/media-libs/mesa/files/0001-clover-Support-multiple-devices-in-clCreateContextFr.patch
@@ -0,0 +1,51 @@
+From 7ab4839745069e22ff2e2636fd27b463fa308838 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <thomas.stellard@amd.com>
+Date: Thu, 11 Apr 2013 10:37:55 -0400
+Subject: [PATCH] clover: Support multiple devices in clCreateContextFromType()
+
+---
+ src/gallium/state_trackers/clover/api/context.cpp | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp
+index 99b9566..5caa48c 100644
+--- a/src/gallium/state_trackers/clover/api/context.cpp
++++ b/src/gallium/state_trackers/clover/api/context.cpp
+@@ -22,6 +22,7 @@
+
+ #include "api/util.hpp"
+ #include "core/context.hpp"
++#include "core/platform.hpp"
+
+ using namespace clover;
+
+@@ -63,18 +64,22 @@ clCreateContextFromType(const cl_context_properties *props,
+ void *user_data, cl_int *errcode_ret) try {
+ cl_platform_id platform;
+ cl_uint num_platforms;
+- cl_device_id dev;
+ cl_int ret;
++ std::vector<cl_device_id> devs;
+
+ ret = clGetPlatformIDs(1, &platform, &num_platforms);
+ if (ret || !num_platforms)
+ throw error(CL_INVALID_PLATFORM);
+
+- ret = clGetDeviceIDs(platform, type, 1, &dev, 0);
+- if (ret)
++ if (platform->begin() == platform->end())
+ throw error(CL_DEVICE_NOT_FOUND);
+
+- return clCreateContext(props, 1, &dev, pfn_notify, user_data, errcode_ret);
++ for (clover::platform::iterator i = platform->begin(), e = platform->end();
++ i != e; ++i) {
++ devs.push_back(&*i);
++ }
++
++ return clCreateContext(props, devs.size(), devs.data(), pfn_notify, user_data, errcode_ret);
+
+ } catch(error &e) {
+ ret_error(errcode_ret, e);
+--
+1.8.1.5
+
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 6682954..9ceca55 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -174,6 +174,7 @@ src_prepare() {
# use non-NULL platform id
epatch "${FILESDIR}/${P}-use-a-struct-for-cl_platform_id.patch"
+ epatch "${FILESDIR}/0001-clover-Support-multiple-devices-in-clCreateContextFr.patch"
# fix for hardened pax_kernel, bug 240956
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/
@ 2013-04-15 4:19 Alexey Shvetsov
0 siblings, 0 replies; 10+ messages in thread
From: Alexey Shvetsov @ 2013-04-15 4:19 UTC (permalink / raw
To: gentoo-commits
commit: 201ee7f354d412a56865d72e92f3d6b8c34f3b45
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 15 04:19:06 2013 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Mon Apr 15 04:19:06 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=201ee7f3
Drop unneded patch
Package-Manager: portage-2.2.0_alpha173
---
...mesa-9999-use-a-struct-for-cl_platform_id.patch | 400 --------------------
media-libs/mesa/mesa-9999.ebuild | 1 -
2 files changed, 0 insertions(+), 401 deletions(-)
diff --git a/media-libs/mesa/files/mesa-9999-use-a-struct-for-cl_platform_id.patch b/media-libs/mesa/files/mesa-9999-use-a-struct-for-cl_platform_id.patch
deleted file mode 100644
index e5c7786..0000000
--- a/media-libs/mesa/files/mesa-9999-use-a-struct-for-cl_platform_id.patch
+++ /dev/null
@@ -1,400 +0,0 @@
-From 39d5479f931bfce9641fb43d99a50cea63952de6 Mon Sep 17 00:00:00 2001
-From: Francisco Jerez <currojerez@riseup.net>
-Date: Wed, 10 Apr 2013 19:16:43 +0000
-Subject: clover: Use a struct to represent cl_platform_id
-
----
-diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
-index 33ff03d..b4c197a 100644
---- a/src/gallium/state_trackers/clover/Makefile.am
-+++ b/src/gallium/state_trackers/clover/Makefile.am
-@@ -50,6 +50,8 @@ libclover_la_SOURCES = \
- core/format.cpp \
- core/memory.hpp \
- core/memory.cpp \
-+ core/platform.hpp \
-+ core/platform.cpp \
- core/resource.hpp \
- core/resource.cpp \
- core/sampler.hpp \
-diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp
-index 80afb6b..99b9566 100644
---- a/src/gallium/state_trackers/clover/api/context.cpp
-+++ b/src/gallium/state_trackers/clover/api/context.cpp
-@@ -41,8 +41,7 @@ clCreateContext(const cl_context_properties *props, cl_uint num_devs,
- throw error(CL_INVALID_DEVICE);
-
- for (auto p : mprops) {
-- if (!(p.first == CL_CONTEXT_PLATFORM &&
-- (cl_platform_id)p.second == NULL))
-+ if (p.first != CL_CONTEXT_PLATFORM)
- throw error(CL_INVALID_PROPERTY);
- }
-
-@@ -61,17 +60,25 @@ clCreateContextFromType(const cl_context_properties *props,
- cl_device_type type,
- void (CL_CALLBACK *pfn_notify)(
- const char *, const void *, size_t, void *),
-- void *user_data, cl_int *errcode_ret) {
-+ void *user_data, cl_int *errcode_ret) try {
-+ cl_platform_id platform;
-+ cl_uint num_platforms;
- cl_device_id dev;
- cl_int ret;
-
-- ret = clGetDeviceIDs(0, type, 1, &dev, 0);
-- if (ret) {
-- ret_error(errcode_ret, ret);
-- return NULL;
-- }
-+ ret = clGetPlatformIDs(1, &platform, &num_platforms);
-+ if (ret || !num_platforms)
-+ throw error(CL_INVALID_PLATFORM);
-+
-+ ret = clGetDeviceIDs(platform, type, 1, &dev, 0);
-+ if (ret)
-+ throw error(CL_DEVICE_NOT_FOUND);
-
- return clCreateContext(props, 1, &dev, pfn_notify, user_data, errcode_ret);
-+
-+} catch(error &e) {
-+ ret_error(errcode_ret, e);
-+ return NULL;
- }
-
- PUBLIC cl_int
-diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
-index cf68d0f..dfb440d 100644
---- a/src/gallium/state_trackers/clover/api/device.cpp
-+++ b/src/gallium/state_trackers/clover/api/device.cpp
-@@ -21,29 +21,25 @@
- //
-
- #include "api/util.hpp"
-+#include "core/platform.hpp"
- #include "core/device.hpp"
-
- using namespace clover;
-
--static device_registry registry;
--
- PUBLIC cl_int
- clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
- cl_uint num_entries, cl_device_id *devices,
- cl_uint *num_devices) {
- std::vector<cl_device_id> devs;
-
-- if (platform != NULL)
-- return CL_INVALID_PLATFORM;
--
- if ((!num_entries && devices) ||
- (!num_devices && !devices))
- return CL_INVALID_VALUE;
-
- // Collect matching devices
-- for (device &dev : registry) {
-+ for (device &dev : *platform) {
- if (((device_type & CL_DEVICE_TYPE_DEFAULT) &&
-- &dev == ®istry.front()) ||
-+ &dev == &platform->front()) ||
- (device_type & dev.type()))
- devs.push_back(&dev);
- }
-@@ -223,13 +219,15 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param,
- return string_property(buf, size, size_ret, "FULL_PROFILE");
-
- case CL_DEVICE_VERSION:
-- return string_property(buf, size, size_ret, "OpenCL 1.1 MESA " PACKAGE_VERSION);
-+ return string_property(buf, size, size_ret,
-+ "OpenCL 1.1 MESA " PACKAGE_VERSION);
-
- case CL_DEVICE_EXTENSIONS:
- return string_property(buf, size, size_ret, "");
-
- case CL_DEVICE_PLATFORM:
-- return scalar_property<cl_platform_id>(buf, size, size_ret, NULL);
-+ return scalar_property<cl_platform_id>(buf, size, size_ret,
-+ dev->platform);
-
- case CL_DEVICE_HOST_UNIFIED_MEMORY:
- return scalar_property<cl_bool>(buf, size, size_ret, CL_TRUE);
-diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
-index f99b694..90111c7 100644
---- a/src/gallium/state_trackers/clover/api/platform.cpp
-+++ b/src/gallium/state_trackers/clover/api/platform.cpp
-@@ -21,9 +21,12 @@
- //
-
- #include "api/util.hpp"
-+#include "core/platform.hpp"
-
- using namespace clover;
-
-+static platform __platform;
-+
- PUBLIC cl_int
- clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
- cl_uint *num_platforms) {
-@@ -34,7 +37,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
- if (num_platforms)
- *num_platforms = 1;
- if (platforms)
-- *platforms = NULL;
-+ *platforms = &__platform;
-
- return CL_SUCCESS;
- }
-@@ -42,7 +45,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
- PUBLIC cl_int
- clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
- size_t size, void *buf, size_t *size_ret) {
-- if (platform != NULL)
-+ if (platform != &__platform)
- return CL_INVALID_PLATFORM;
-
- switch (param_name) {
-diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp
-index d93a1f6..8c6a8a6 100644
---- a/src/gallium/state_trackers/clover/core/device.cpp
-+++ b/src/gallium/state_trackers/clover/core/device.cpp
-@@ -38,13 +38,16 @@ namespace {
- }
- }
-
--_cl_device_id::_cl_device_id(pipe_loader_device *ldev) : ldev(ldev) {
-+_cl_device_id::_cl_device_id(clover::platform *platform,
-+ pipe_loader_device *ldev) :
-+ platform(platform), ldev(ldev) {
- pipe = pipe_loader_create_screen(ldev, PIPE_SEARCH_DIR);
- if (!pipe || !pipe->get_param(pipe, PIPE_CAP_COMPUTE))
- throw error(CL_INVALID_DEVICE);
- }
-
--_cl_device_id::_cl_device_id(_cl_device_id &&dev) : pipe(dev.pipe), ldev(dev.ldev) {
-+_cl_device_id::_cl_device_id(_cl_device_id &&dev) :
-+ platform(dev.platform), pipe(dev.pipe), ldev(dev.ldev) {
- dev.ldev = NULL;
- dev.pipe = NULL;
- }
-@@ -56,6 +59,15 @@ _cl_device_id::~_cl_device_id() {
- pipe_loader_release(&ldev, 1);
- }
-
-+void
-+_cl_device_id::operator=(_cl_device_id &&dev) {
-+ platform = dev.platform;
-+ pipe = dev.pipe;
-+ ldev = dev.ldev;
-+ dev.ldev = NULL;
-+ dev.pipe = NULL;
-+}
-+
- cl_device_type
- _cl_device_id::type() const {
- switch (ldev->type) {
-@@ -179,16 +191,3 @@ _cl_device_id::ir_target() const {
- PIPE_COMPUTE_CAP_IR_TARGET);
- return { target.data() };
- }
--
--device_registry::device_registry() {
-- int n = pipe_loader_probe(NULL, 0);
-- std::vector<pipe_loader_device *> ldevs(n);
--
-- pipe_loader_probe(&ldevs.front(), n);
--
-- for (pipe_loader_device *ldev : ldevs) {
-- try {
-- devs.emplace_back(ldev);
-- } catch (error &) {}
-- }
--}
-diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp
-index 5b92751..897a003 100644
---- a/src/gallium/state_trackers/clover/core/device.hpp
-+++ b/src/gallium/state_trackers/clover/core/device.hpp
-@@ -32,17 +32,21 @@
-
- namespace clover {
- typedef struct _cl_device_id device;
-+ typedef struct _cl_platform_id platform;
- class root_resource;
- class hard_event;
- }
-
- struct _cl_device_id {
- public:
-- _cl_device_id(pipe_loader_device *ldev);
-+ _cl_device_id(clover::platform *platform, pipe_loader_device *ldev);
- _cl_device_id(_cl_device_id &&dev);
- _cl_device_id(const _cl_device_id &dev) = delete;
- ~_cl_device_id();
-
-+ void operator=(_cl_device_id &&dev);
-+ void operator=(const _cl_device_id &dev) = delete;
-+
- cl_device_type type() const;
- cl_uint vendor_id() const;
- size_t max_images_read() const;
-@@ -70,41 +74,11 @@ public:
- friend std::set<cl_image_format>
- clover::supported_formats(cl_context, cl_mem_object_type);
-
-+ clover::platform *platform;
-+
- private:
- pipe_screen *pipe;
- pipe_loader_device *ldev;
- };
-
--namespace clover {
-- ///
-- /// Container of all the compute devices that are available in the
-- /// system.
-- ///
-- class device_registry {
-- public:
-- typedef std::vector<device>::iterator iterator;
--
-- device_registry();
--
-- iterator begin() {
-- return devs.begin();
-- }
--
-- iterator end() {
-- return devs.end();
-- }
--
-- device &front() {
-- return devs.front();
-- }
--
-- device &back() {
-- return devs.back();
-- }
--
-- protected:
-- std::vector<device> devs;
-- };
--}
--
- #endif
-diff --git a/src/gallium/state_trackers/clover/core/platform.cpp b/src/gallium/state_trackers/clover/core/platform.cpp
-new file mode 100644
-index 0000000..f557ef2
---- a/dev/null
-+++ b/src/gallium/state_trackers/clover/core/platform.cpp
-@@ -0,0 +1,38 @@
-+//
-+// Copyright 2012 Francisco Jerez
-+//
-+// Permission is hereby granted, free of charge, to any person obtaining a
-+// copy of this software and associated documentation files (the "Software"),
-+// to deal in the Software without restriction, including without limitation
-+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+// and/or sell copies of the Software, and to permit persons to whom the
-+// Software is furnished to do so, subject to the following conditions:
-+//
-+// The above copyright notice and this permission notice shall be included in
-+// all copies or substantial portions of the Software.
-+//
-+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+// THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-+// OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+// SOFTWARE.
-+//
-+
-+#include "core/platform.hpp"
-+
-+using namespace clover;
-+
-+_cl_platform_id::_cl_platform_id() {
-+ int n = pipe_loader_probe(NULL, 0);
-+ std::vector<pipe_loader_device *> ldevs(n);
-+
-+ pipe_loader_probe(&ldevs.front(), n);
-+
-+ for (pipe_loader_device *ldev : ldevs) {
-+ try {
-+ devs.emplace_back(this, ldev);
-+ } catch (error &) {}
-+ }
-+}
-diff --git a/src/gallium/state_trackers/clover/core/platform.hpp b/src/gallium/state_trackers/clover/core/platform.hpp
-new file mode 100644
-index 0000000..eeb6d60
---- a/dev/null
-+++ b/src/gallium/state_trackers/clover/core/platform.hpp
-@@ -0,0 +1,66 @@
-+//
-+// Copyright 2013 Francisco Jerez
-+//
-+// Permission is hereby granted, free of charge, to any person obtaining a
-+// copy of this software and associated documentation files (the "Software"),
-+// to deal in the Software without restriction, including without limitation
-+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+// and/or sell copies of the Software, and to permit persons to whom the
-+// Software is furnished to do so, subject to the following conditions:
-+//
-+// The above copyright notice and this permission notice shall be included in
-+// all copies or substantial portions of the Software.
-+//
-+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+// THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-+// OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+// SOFTWARE.
-+//
-+
-+#ifndef __CORE_PLATFORM_HPP__
-+#define __CORE_PLATFORM_HPP__
-+
-+#include <vector>
-+
-+#include "core/base.hpp"
-+#include "core/device.hpp"
-+
-+namespace clover {
-+ typedef struct _cl_platform_id platform;
-+}
-+
-+struct _cl_platform_id {
-+public:
-+ typedef std::vector<clover::device>::iterator iterator;
-+
-+ _cl_platform_id();
-+
-+ ///
-+ /// Container of all compute devices that are available in the platform.
-+ ///
-+ /// @{
-+ iterator begin() {
-+ return devs.begin();
-+ }
-+
-+ iterator end() {
-+ return devs.end();
-+ }
-+
-+ clover::device &front() {
-+ return devs.front();
-+ }
-+
-+ clover::device &back() {
-+ return devs.back();
-+ }
-+ /// @}
-+
-+protected:
-+ std::vector<clover::device> devs;
-+};
-+
-+#endif
---
-cgit v0.9.0.2-2-gbebe
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 9ceca55..8b5323a 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -173,7 +173,6 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-dont-require-llvm-for-r300.patch
# use non-NULL platform id
- epatch "${FILESDIR}/${P}-use-a-struct-for-cl_platform_id.patch"
epatch "${FILESDIR}/0001-clover-Support-multiple-devices-in-clCreateContextFr.patch"
# fix for hardened pax_kernel, bug 240956
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-04-15 4:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 18:37 [gentoo-commits] proj/x11:opencl commit in: media-libs/mesa/, media-libs/mesa/files/ Alexey Shvetsov
-- strict thread matches above, loose matches on Subject: below --
2013-04-15 4:19 Alexey Shvetsov
2013-04-11 15:36 Alexey Shvetsov
2013-04-11 5:30 Alexey Shvetsov
2013-04-08 18:40 Alexey Shvetsov
2013-04-06 13:32 Alexey Shvetsov
2013-04-06 11:30 Alexey Shvetsov
2012-06-22 21:18 Alexey Shvetsov
2012-06-19 22:42 Alexey Shvetsov
2012-06-03 10:20 Alexey Shvetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox