diff options
author | PFO <pfolinux@rdi-linux> | 2011-06-17 16:07:53 +0200 |
---|---|---|
committer | PFO <pfolinux@rdi-linux> | 2011-06-17 16:07:53 +0200 |
commit | df7dcb58b58c58ac79aa14f17e92d744b8b13dd9 (patch) | |
tree | b439ba04547b3fd5c1b81c2a82269210b1c4523e | |
parent | d58e3fa353c5df8028413837a366a16ff6054015 (diff) | |
parent | 5607823fe4ff35e11086efa6302d8fbacd315b06 (diff) |
Merge branch 'r300' into hhienvsa_r300
-rw-r--r-- | src/gallium/state_trackers/egl/android/native_android.cpp | 4 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 19 | ||||
-rw-r--r-- | src/gralloc/gralloc_gem_radeon.c | 4 | ||||
-rw-r--r-- | src/mesa/Android.mk | 4 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 21 |
5 files changed, 28 insertions, 24 deletions
diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp index a584d54db4..7687ec86a6 100644 --- a/src/gallium/state_trackers/egl/android/native_android.cpp +++ b/src/gallium/state_trackers/egl/android/native_android.cpp @@ -413,7 +413,11 @@ android_display_create_window_surface(struct native_display *ndpy, asurf = CALLOC_STRUCT(android_surface); if (!asurf) + { + LOGE("Can't allocate android surface structure... X_x "); return NULL; + } + LOGI("Android surface struct allocated :)"); asurf->adpy = adpy; asurf->win = win; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index fa20d7eb98..a388e379b9 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -63,6 +63,25 @@ static void* android_mmap2(void *addr, size_t size, int prot, int flags, int fd, #define RADEON_BO_FLAGS_MICRO_TILE 2 #define RADEON_BO_FLAGS_MICRO_TILE_SQUARE 0x20 +#ifdef ANDROID + +extern void* __mmap2(void*, size_t, int, int, int, size_t); + +#define MMAP2_SHIFT 12 +static void* android_mmap2(void *addr, size_t size, int prot, int flags, int fd, unsigned long long offset) +{ + if ( offset & ((1UL << MMAP2_SHIFT)-1) ) { + errno = EINVAL; + return MAP_FAILED; + } + + return __mmap2(addr, size, prot, flags, fd, (size_t)(offset >> MMAP2_SHIFT)); +} + +#define mmap(addr, size, prot, flags, fd, offset) android_mmap2(addr, size, prot, flags, fd, offset) + +#endif /* ANDROID */ + extern const struct pb_vtbl radeon_bo_vtbl; diff --git a/src/gralloc/gralloc_gem_radeon.c b/src/gralloc/gralloc_gem_radeon.c index addb3419a6..469a1488a0 100644 --- a/src/gralloc/gralloc_gem_radeon.c +++ b/src/gralloc/gralloc_gem_radeon.c @@ -223,12 +223,12 @@ drm_gem_radeon_init(struct drm_module_t *drm) drm->gem = (void *) info; -/* ret = eg_init_tile_config(info); + ret = eg_init_tile_config(info); if (ret) { radeon_bo_manager_gem_dtor(info->bufmgr); free(info); return ret; - }*/ + } drm_gem_radeon_init_features(drm); diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk index 9c9ab75964..f361aca3e4 100644 --- a/src/mesa/Android.mk +++ b/src/mesa/Android.mk @@ -4,8 +4,8 @@ include $(LOCAL_PATH)/sources.mak common_CFLAGS := \ -DPTHREADS \ - -DFEATURE_ES1=0 \ - -DFEATURE_ES2=0 \ + -DFEATURE_ES1=1 \ + -DFEATURE_ES2=1 \ -fvisibility=hidden \ -Wno-sign-compare diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 3c430b9a05..d9656b3caf 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -432,7 +432,7 @@ do { \ * Flush (draw) vertices. * \param unmap - leave VBO unmapped after flushing? */ -/*static void +static void vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap) { if (exec->vtx.vert_count || unmap) { @@ -444,7 +444,6 @@ vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap) reset_attrfv( exec ); } } -*/ #if FEATURE_beginend @@ -549,24 +548,6 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j ) /** - * Flush (draw) vertices. - * \param unmap - leave VBO unmapped after flushing? - */ -static void -vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap) -{ - if (exec->vtx.vert_count || unmap) { - vbo_exec_vtx_flush( exec, unmap ); - } - - if (exec->vtx.vertex_size) { - vbo_exec_copy_to_current( exec ); - reset_attrfv( exec ); - } -} - - -/** * Called via glBegin. */ static void GLAPIENTRY vbo_exec_Begin( GLenum mode ) |