Bug 74960 - [PNV Bisected]Piglit/spec/ARB_map_buffer_range/MAP_INVALIDATE_RANGE_BIT offset=0 fails
Summary: [PNV Bisected]Piglit/spec/ARB_map_buffer_range/MAP_INVALIDATE_RANGE_BIT offse...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-14 04:53 UTC by lu hua
Modified: 2014-03-03 03:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2014-02-14 04:53:47 UTC
System Environment:
--------------------------
Platform: Pineview
Libdrm:		(master)libdrm-2.4.52-3-g128e74cf6492025e63e035566bd6e2203e8da5e1
Mesa:		(master)18caef953f2de134077bfa6e46f8616f68ff1b1b
Xserver:	(master)xorg-server-1.15.0-624-g30c3852bda7f60b0ffb1bb2f6ed8ba8800001b32
Xf86_video_intel:(master)2.99.910-21-g1c5ccf5d9d8beb7e8343eb2d07bbf97f53c1a224
Cairo:		(master)4144307dbfbe7b297135d9ea4b080cae7e06b997
Libva:		(staging)1325ad0901a97ef7f88edb6cf61cf5f9ddbe2835
Libva_intel_driver:(staging)bd630edd844b88ea543a027654db296ff7da16cd
Kernel:	(drm-intel-nightly) 164a4cb4c1431a0689f85507868356fae24da638

Bug detailed description:
-----------------------------
It segfault on Pineview with mesa master branch. It doesn't happen on mesa 10.0 branch.
Following cases also fail with same bisect commit:
spec_ARB_map_buffer_range_MAP_INVALIDATE_BUFFER_BIT_decrement-offset
spec_ARB_map_buffer_range_MAP_INVALIDATE_BUFFER_BIT_increment-offset
spec_ARB_map_buffer_range_MAP_INVALIDATE_BUFFER_BIT_offset=0
spec_ARB_map_buffer_range_MAP_INVALIDATE_RANGE_BIT_decrement-offset
spec_ARB_map_buffer_range_MAP_INVALIDATE_RANGE_BIT_increment-offset

Bisect shows: 7fd6ad7adcf8a1c0fc1b2746d47ba5f05b8a3c7f is the first bad commit.
commit 7fd6ad7adcf8a1c0fc1b2746d47ba5f05b8a3c7f
Author:     Siavash Eliasi <siavashserver@gmail.com>
AuthorDate: Thu Nov 28 12:26:42 2013 +0330
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Wed Jan 29 09:11:39 2014 -0700

    mesa: GL_ARB_map_buffer_alignment is not optional

    Every driver supports it.  All current and future Gallium drivers always
    support it, and all existing classic drivers support it.

    v2: Making GL_ARB_map_buffer_alignment a desktop OpenGL extension only.

    v3: Squash two commits together.

    v4 (idr): MIN_MAP_BUFFER_ALIGNMENT queries don't have any dependencies.
    In previous versions of the patch it depended on EXTRA_API_GL which
    would prevent the query from working in core profile contexts.

    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

output:
Testing GL_MAP_INVALIDATE_RANGE_BIT. 
Offset = 0. 
glMapBufferRange returned a pointer not aligned to GL_MIN_MAP_BUFFER_ALIGNMENT. 
PIGLIT: {'result': 'fail' }

Reproduce steps:
----------------------------
1. xinit
2. ./bin/map_buffer_range-invalidate MAP_INVALIDATE_RANGE_BIT offset=0 -fbo -auto
Comment 1 lu hua 2014-02-17 05:23:19 UTC
It also fails on Mesa 10.1 branch.
Comment 2 Ian Romanick 2014-02-26 21:51:04 UTC
Fix on the mailing list for review:

http://lists.freedesktop.org/archives/mesa-dev/2014-February/055000.html
Comment 3 Ian Romanick 2014-02-28 23:50:46 UTC
commit ff2cbf9e0ca0ee46a15add1a42cd48705c84e0de
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Wed Feb 26 12:48:56 2014 -0800

    i915: Allocate the sys_buffer using _mesa_align_malloc
    
    Though it won't matter on Linux, use _mesa_align_free to release it.
    Since i965 doesn't have sys_buffer, I overlooked this in the
    GL_ARB_map_buffer_alignment work a few months ago.  Fixes i915 (and
    presumably i830) regressions in ARB_map_buffer_range tests and the
    failure in arb_map_buffer_alignment-sanity_test.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74960
    Cc: "10.1" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
Comment 4 lu hua 2014-03-03 03:31:45 UTC
Verified.Fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.