On Mon, 2016-01-04 at 20:01 -0500, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> > Cc: Samuel Iglesias Gonsálvez <sigles...@igalia.com> > Cc: Marta Lofstedt <marta.lofst...@intel.com> > --- > > I have not tested whether this fixes your CTS tests (as I don't have > access > to them). But it should... and if it doesn't, it'll be a variation of > the > logic used here. >
It fixes both CTS tests: ES31-CTS.shader_storage_buffer_object.advanced-unsizedArrayLength-cs- std430-vec-bindrangeOffset ES31-CTS.shader_storage_buffer_object.advanced-unsizedArrayLength-cs- std430-vec-bindrangeSize This series is: Reviewed-by: Samuel Iglesias Gonsálvez <sigles...@igalia.com> Thanks a lot for fixing this, Sam > src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 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 76dc577..5ab2f7f 100644 > --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c > +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c > @@ -946,12 +946,15 @@ brw_upload_ubo_surfaces(struct brw_context > *brw, > } else { > struct intel_buffer_object *intel_bo = > intel_buffer_object(binding->BufferObject); > + GLsizeiptr size = binding->BufferObject->Size - binding- > >Offset; > + if (!binding->AutomaticSize) > + size = MIN2(size, binding->Size); > drm_intel_bo *bo = > intel_bufferobj_buffer(brw, intel_bo, > binding->Offset, > - binding->BufferObject->Size - > binding->Offset); > + size); > brw_create_constant_surface(brw, bo, binding->Offset, > - binding->BufferObject->Size - > binding->Offset, > + size, > &ubo_surf_offsets[i]); > } > } > @@ -968,12 +971,15 @@ brw_upload_ubo_surfaces(struct brw_context > *brw, > } else { > struct intel_buffer_object *intel_bo = > intel_buffer_object(binding->BufferObject); > + GLsizeiptr size = binding->BufferObject->Size - binding- > >Offset; > + if (!binding->AutomaticSize) > + size = MIN2(size, binding->Size); > drm_intel_bo *bo = > intel_bufferobj_buffer(brw, intel_bo, > binding->Offset, > - binding->BufferObject->Size - > binding->Offset); > + size); > brw_create_buffer_surface(brw, bo, binding->Offset, > - binding->BufferObject->Size - > binding->Offset, > + size, > &ssbo_surf_offsets[i]); > } > } _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev