Module: Mesa
Branch: master
Commit: f9b3e257d19587f4b9fae31610df857b10d69d1b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9b3e257d19587f4b9fae31610df857b10d69d1b

Author: Eric Anholt <[email protected]>
Date:   Thu Jul  5 13:43:43 2012 -0700

i965: Revert the VBOs-in-system-memory hack.

It didn't change performance on Lightsmark or Nexuiz, which both used
DYNAMIC_DRAW buffers, but it was killing performance (40% CPU wasted pwriting
buffers) on a closed-source app we're looking at.

Reviewed-by: Kenneth Graunke <[email protected]>

---

 src/mesa/drivers/dri/intel/intel_buffer_objects.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c 
b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index d2a0709..ef511e6 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -140,15 +140,11 @@ intel_bufferobj_data(struct gl_context * ctx,
    intel_obj->sys_buffer = NULL;
 
    if (size != 0) {
-      if (usage == GL_DYNAMIC_DRAW
 #ifdef I915
-         /* On pre-965, stick VBOs in system memory, as we're always doing
-          * swtnl with their contents anyway.
-          */
-         || target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER
-#endif
-        )
-      {
+      /* On pre-965, stick VBOs in system memory, as we're always doing
+       * swtnl with their contents anyway.
+       */
+      if (target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER) {
         intel_obj->sys_buffer = malloc(size);
         if (intel_obj->sys_buffer != NULL) {
            if (data != NULL)
@@ -156,6 +152,7 @@ intel_bufferobj_data(struct gl_context * ctx,
            return true;
         }
       }
+#endif
       intel_bufferobj_alloc_buffer(intel, intel_obj);
       if (!intel_obj->buffer)
          return false;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to