[Mesa-dev] [PATCH 2/3] i965: Fix undefined value usage in ABO setup.

Eric Anholt eric at anholt.net
Tue Nov 5 17:35:21 PST 2013


Fixes a compiler warning.
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 46871c7..cbeaa32 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -885,7 +885,7 @@ brw_upload_abo_surfaces(struct brw_context *brw,
       struct intel_buffer_object *intel_bo =
          intel_buffer_object(binding->BufferObject);
       drm_intel_bo *bo = intel_bufferobj_buffer(
-         brw, intel_bo, binding->Offset, bo->size - binding->Offset);
+         brw, intel_bo, binding->Offset, intel_bo->Base.Size - binding->Offset);
 
       brw->vtbl.create_raw_surface(brw, bo, binding->Offset,
                                    bo->size - binding->Offset,
-- 
1.8.4.rc3



More information about the mesa-dev mailing list