On Wed, 2010-03-10 at 20:42 +0200, Pauli Nieminen wrote: 
> bo->referenced_in_cs is checked if bo is already in cs. Adding and removing
> reference in bo is done with atomic operations to allow parallel access to a
> bo from multiple contexts.
> 
> cs->id generation code quarentees there is not duplicated ids which limits
> number of cs->ids to 32. If there is more cs objects rest will get id 0.
> 
> This optimization decreases cs_write_reloc share of torcs profiling from 4.3%
> to 2.6%.
> 
> Signed-off-by: Pauli Nieminen <suok...@gmail.com>

This also needs something like the below for configure to verify that
atomic ops are available.

diff --git a/configure.ac b/configure.ac
index fe00176..e419dd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,7 +173,7 @@ if test "x$HAVE_LIBUDEV" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
 
-if test "x$INTEL" != "xno"; then
+if test "x$INTEL" != "xno" || test "x$RADEON" != "xno"; then
     # Check for atomic intrinsics
     AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives,
     [
@@ -206,13 +206,23 @@ if test "x$INTEL" != "xno"; then
     fi
 
     if test "x$drm_cv_atomic_primitives" = "xnone"; then
-           if test "x$INTEL" != "xauto"; then
+           if test "x$INTEL" = "xyes"; then
                    AC_MSG_ERROR([libdrm_intel depends upon atomic operations, 
which were not found for your compiler/cpu. Try compiling with -march=native, 
or install the libatomics-op-dev package, or, failing both of those, disable 
support for Intel GPUs by passing --disable-intel to ./configure])
           else
                    INTEL=no
           fi
+           if test "x$RADEON" = "xyes"; then
+                   AC_MSG_ERROR([libdrm_radeon depends upon atomic operations, 
which were not found for your compiler/cpu. Try compiling with -march=native, 
or install the libatomics-op-dev package, or, failing both of those, disable 
support for Radeon GPUs by passing --disable-radeon to ./configure])
+          else
+                   RADEON=no
+          fi
     else
-          INTEL=yes
+           if test "x$INTEL" != "xno"; then
+               INTEL=yes
+           fi
+           if test "x$RADEON" != "xno"; then
+               RADEON=yes
+           fi
     fi
 fi
 



-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to