[Mesa-dev] [PATCH 02/12] android: make the code be compatible with stlport

Chih-Wei Huang cwhuang at android-x86.org
Fri May 15 11:42:17 PDT 2015


The android's stlport doesn't have tr1/unordered_set but unordered_set.

Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
 src/egl/main/Android.mk                       | 5 +++--
 src/gallium/drivers/nouveau/codegen/nv50_ir.h | 5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk
index 12b66d0..29c978b 100644
--- a/src/egl/main/Android.mk
+++ b/src/egl/main/Android.mk
@@ -100,7 +100,6 @@ endif
 ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS +=  libmesa_winsys_nouveau libmesa_pipe_nouveau
 LOCAL_SHARED_LIBRARIES += libdrm_nouveau
-LOCAL_SHARED_LIBRARIES += libstlport
 endif
 
 # r300g/r600g/radeonsi
@@ -113,7 +112,6 @@ endif # r300g
 ifneq ($(filter r600g radeonsi, $(MESA_GPU_DRIVERS)),)
 ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_pipe_r600
-LOCAL_SHARED_LIBRARIES += libstlport
 endif # r600g
 ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_pipe_radeonsi
@@ -121,6 +119,9 @@ endif # radeonsi
 gallium_DRIVERS += libmesa_pipe_radeon
 endif # r600g || radeonsi
 endif # r300g || r600g || radeonsi
+ifneq ($(filter nouveau r600g, $(MESA_GPU_DRIVERS)),)
+LOCAL_SHARED_LIBRARIES += libstlport
+endif
 
 # vmwgfx
 ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
index f4d52b7..6a17e61 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
@@ -29,7 +29,12 @@
 #include <deque>
 #include <list>
 #include <vector>
+#ifdef ANDROID
+#include <unordered_set> // from stlport
+using std::isfinite;
+#else
 #include <tr1/unordered_set>
+#endif
 
 #include "codegen/nv50_ir_util.h"
 #include "codegen/nv50_ir_graph.h"
-- 
1.9.1



More information about the mesa-dev mailing list