xf86-video-intel: src/i965_video.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Dec 10 17:41:41 PST 2011


 src/i965_video.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit eb859f644633ee716083d253a5b7ff95163380e5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Dec 11 01:34:05 2011 +0000

    uxa/video: Correct the offset of the binding table in the surface buffer
    
    The binding table is intended to be after all the surface descriptions,
    so make sure we write it with the appropriate offset into the buffer.
    
    Fixes regression from 699888a64 (uxa/video: Use the common bo
    allocations and upload)
    
    Reported-by: Cyril Brulebois <kibi at debian.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43704
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i965_video.c b/src/i965_video.c
index aff231f..a130f3d 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -551,17 +551,19 @@ static void gen7_create_src_surface_state(ScrnInfoPtr scrn,
 }
 
 static void i965_create_binding_table(ScrnInfoPtr scrn,
-				drm_intel_bo *bind_bo,
-				int n_surf)
+				      drm_intel_bo *bind_bo,
+				      int n_surf)
 {
-	uint32_t binding_table[8];
+	uint32_t binding_table[n_surf];
 	int i;
 
 	/* Set up a binding table for our surfaces.  Only the PS will use it */
 	for (i = 0; i < n_surf; i++)
 		binding_table[i] = i * SURFACE_STATE_PADDED_SIZE;
 
-	dri_bo_subdata(bind_bo, 0, sizeof(uint32_t)*n_surf, binding_table);
+	dri_bo_subdata(bind_bo,
+		       n_surf * SURFACE_STATE_PADDED_SIZE,
+		       sizeof(binding_table), binding_table);
 }
 
 static drm_intel_bo *i965_create_sampler_state(ScrnInfoPtr scrn)


More information about the xorg-commit mailing list