[Mesa-dev] [PATCH] i965: Remove spurious mutex frobbing around call to intel_miptree_blit
Kristian H. Kristensen
krh at bitplanet.net
Wed Jun 21 18:56:52 UTC 2017
Ian Romanick <idr at freedesktop.org> writes:
> On 06/20/2017 01:33 PM, Kristian Høgsberg wrote:
>> On Mon, Jun 19, 2017 at 2:33 PM, Ian Romanick <idr at freedesktop.org> wrote:
>>> From: Ian Romanick <ian.d.romanick at intel.com>
>>>
>>> These locks were added in 2f28a0dc, but I don't see anything in the
>>> intel_miptree_blit path that should make this necessary.
>>
>> I doubt it's needed now with the new blorp. If I remember correctly, I
>> had to drop the lock there since intel_miptree_blit() could hit the XY
>> blit path that requires a fast clear resolve. The fast resolve being
>> meta, would then try to lock the texture again.
>
> I figured it was something like that. If I add that commentary to the
> commit message, can I call that a Reviewed-by?
Certainly.
Kristian
>> Kristian
>>
>>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>>> Cc: Kristian Høgsberg <krh at bitplanet.net>
>>> ---
>>> src/mesa/drivers/dri/i965/intel_tex_copy.c | 19 ++++++-------------
>>> 1 file changed, 6 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/src/mesa/drivers/dri/i965/intel_tex_copy.c b/src/mesa/drivers/dri/i965/intel_tex_copy.c
>>> index 9c255ae..e0d5cad 100644
>>> --- a/src/mesa/drivers/dri/i965/intel_tex_copy.c
>>> +++ b/src/mesa/drivers/dri/i965/intel_tex_copy.c
>>> @@ -51,7 +51,6 @@ intel_copy_texsubimage(struct brw_context *brw,
>>> GLint x, GLint y, GLsizei width, GLsizei height)
>>> {
>>> const GLenum internalFormat = intelImage->base.Base.InternalFormat;
>>> - bool ret;
>>>
>>> /* No pixel transfer operations (zoom, bias, mapping), just a blit */
>>> if (brw->ctx._ImageTransferState)
>>> @@ -83,19 +82,13 @@ intel_copy_texsubimage(struct brw_context *brw,
>>> int dst_slice = slice + intelImage->base.Base.Face +
>>> intelImage->base.Base.TexObject->MinLayer;
>>>
>>> - _mesa_unlock_texture(&brw->ctx, intelImage->base.Base.TexObject);
>>> -
>>> /* blit from src buffer to texture */
>>> - ret = intel_miptree_blit(brw,
>>> - irb->mt, irb->mt_level, irb->mt_layer,
>>> - x, y, irb->Base.Base.Name == 0,
>>> - intelImage->mt, dst_level, dst_slice,
>>> - dstx, dsty, false,
>>> - width, height, GL_COPY);
>>> -
>>> - _mesa_lock_texture(&brw->ctx, intelImage->base.Base.TexObject);
>>> -
>>> - return ret;
>>> + return intel_miptree_blit(brw,
>>> + irb->mt, irb->mt_level, irb->mt_layer,
>>> + x, y, irb->Base.Base.Name == 0,
>>> + intelImage->mt, dst_level, dst_slice,
>>> + dstx, dsty, false,
>>> + width, height, GL_COPY);
>>> }
>>>
>>>
>>> --
>>> 2.9.4
>>>
More information about the mesa-dev
mailing list