summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>2015-04-24 07:02:19 +0200
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>2015-09-25 08:39:21 +0200
commit5bb5eeea008a01f5bc44570915ea4b7ac432cef9 (patch)
treedfbd221c0e3f092efdb2290aa0369db85d4ee6ea /src/mesa/drivers/dri/i965/brw_wm_surface_state.c
parenteaa6f01c8d0c49d8ae637d8104163da9c45526ca (diff)
downloadexternal_mesa3d-5bb5eeea008a01f5bc44570915ea4b7ac432cef9.zip
external_mesa3d-5bb5eeea008a01f5bc44570915ea4b7ac432cef9.tar.gz
external_mesa3d-5bb5eeea008a01f5bc44570915ea4b7ac432cef9.tar.bz2
i965/wm: surfaces should have the API buffer size, not the drm buffer size
The returned drm buffer object has a size multiple of 4096 but that should not be exposed to the API user, which is working with a different size. As far as I can see this problem is only visible in the calculation of the length of unsized arrays used in SSBOs, as the implementation of this needs to query the underlying buffer size via a message. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 61031d2..f2aaa0b 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -948,7 +948,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw,
binding->Offset,
binding->BufferObject->Size - binding->Offset);
brw_create_constant_surface(brw, bo, binding->Offset,
- bo->size - binding->Offset,
+ binding->BufferObject->Size - binding->Offset,
&surf_offsets[i],
dword_pitch);
}
@@ -965,7 +965,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw,
binding->Offset,
binding->BufferObject->Size - binding->Offset);
brw_create_buffer_surface(brw, bo, binding->Offset,
- bo->size - binding->Offset,
+ binding->BufferObject->Size - binding->Offset,
&surf_offsets[i],
dword_pitch);
}