[Mesa-dev] [PATCH] i965: Fix z_offset computation in intel_miptree_unmap_depthstencil()
Anuj Phogat
anuj.phogat at gmail.com
Wed Aug 6 12:39:12 PDT 2014
On Wed, Aug 6, 2014 at 9:50 AM, Neil Roberts <neil at linux.intel.com> wrote:
> I'd just liked to point out that I made a nearly identical patch before
> this patch was posted but I didn't get any review despite prodding
> people a few times on #dri-devel. Maybe we should try to get into the
> habit of searching patchwork for existing patches before posting to the
> list. Does anyone have any suggestions for how I can get my patches more
> noticed?
>
I'm sorry Neil. I should've looked first on the mailing list to avoid this
duplication of efforts. I'll try to look more often in patchwork for the
patches pending review. I would also request everyone to keep the status
of their patches on patchwork updated. That'll make it easier to go through
pending patches. I usually send out a reminder on the mailing list to attract
wider attention for my patches.
> http://patchwork.freedesktop.org/patch/27168/
>
> I also made a piglit test for the problem here:
>
> http://cgit.freedesktop.org/piglit/commit/?id=108a17a4d78bcc7480754d2104b4
>
> Regards,
> - Neil
>
> Jordan Justen <jljusten at gmail.com> writes:
>
>> Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
>>
>> On Wed, Jul 16, 2014 at 3:32 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>> The bug is triggered by using glTexSubImage2d() with GL_DEPTH_STENCIL
>>> as base internal format and non-zero x, y offsets. Currently x, y
>>> offsets are ignored while updating the texture image.
>>>
>>> Fixes Khronos GLES3 CTS tests:
>>> npot_tex_sub_image_2d
>>> npot_tex_sub_image_3d
>>> npot_pbo_tex_sub_image_2d
>>> npot_pbo_tex_sub_image_2d
>>>
>>> Cc: <mesa-stable at lists.freedesktop.org>
>>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>>> ---
>>> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>> index 2ab0faa..b36ffc7 100644
>>> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>>> @@ -2129,9 +2129,9 @@ intel_miptree_unmap_depthstencil(struct brw_context *brw,
>>> x + s_image_x + map->x,
>>> y + s_image_y + map->y,
>>> brw->has_swizzling);
>>> - ptrdiff_t z_offset = ((y + z_image_y) *
>>> + ptrdiff_t z_offset = ((y + z_image_y + map->y) *
>>> (z_mt->pitch / 4) +
>>> - (x + z_image_x));
>>> + (x + z_image_x + map->x));
>>>
>>> if (map_z32f_x24s8) {
>>> z_map[z_offset] = packed_map[(y * map->w + x) * 2 + 0];
>>> --
>>> 1.9.3
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list