[Mesa-dev] [PATCH v4 (part2) 19/59] i965/wm: surfaces should have the API buffer size, not the drm buffer size

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Sep 7 02:32:28 PDT 2015



On 29/08/15 00:59, Jordan Justen wrote:
> On 2015-08-05 01:30:16, Iago Toral Quiroga wrote:
>> 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.
> 
> Would the only API where this would be visible be unsized array
> length? If so, maybe you could just mention it directly in the commit
> message.
> 

Yeah, it is only visible when getting the buffer size from the HW. The
other APIs are not affected.

We will add it to the commit log.

> Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
> 

Thanks,

Sam

>> 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 08ad8e8..ac820af 100644
>> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
>> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
>> @@ -941,7 +941,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);
>>           }
>> @@ -958,7 +958,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