[Mesa-dev] [PATCH v2 43/82] i965/wm: surfaces should have the API buffer size, not the drm buffer size

Iago Toral Quiroga itoral at igalia.com
Wed Jun 3 00:01:33 PDT 2015


From: Samuel Iglesias Gonsalvez <siglesias at igalia.com>

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.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 ++--
 1 file 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 05fe8f9..d362605 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -939,7 +939,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);
          }
@@ -956,7 +956,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);
          }
-- 
1.9.1



More information about the mesa-dev mailing list