diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-11 01:34:05 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-11 01:38:51 +0000 |
commit | eb859f644633ee716083d253a5b7ff95163380e5 (patch) | |
tree | cadd45c6eccf61de6d3f1755f15a53086aba0c17 /src/i965_video.c | |
parent | 051a18063df075536cb1ac0dc4dfc3c1306ab74e (diff) |
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@debian.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43704
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i965_video.c')
-rw-r--r-- | src/i965_video.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/i965_video.c b/src/i965_video.c index aff231f6..a130f3d2 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) |