Summary: | [Bisected IVB]Oglc transform_feedback(advanced.transformFeedback.points) Invalid argument | ||
---|---|---|---|
Product: | Mesa | Reporter: | lu hua <huax.lu> |
Component: | Drivers/DRI/i965 | Assignee: | Kenneth Graunke <kenneth> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | high | CC: | idr, xunx.fang |
Version: | git | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
lu hua
2012-08-10 01:51:58 UTC
Yow! This was actually a nasty bug that's existed for ages and ages, and just happened to get tripped up by this change. Patches on mailing list, awaiting review: http://lists.freedesktop.org/archives/mesa-dev/2012-August/025538.html http://lists.freedesktop.org/archives/mesa-dev/2012-August/025539.html These should also fix some occlusion query issues. Fixed by the following commit: commit 9da50667f490ba2c6240f4c91c9707e3f181adae Author: Kenneth Graunke <kenneth@whitecape.org> Date: Fri Aug 10 10:26:03 2012 -0700 intel: Move finish_batch() call before MI_BATCH_BUFFER_END and padding. On Gen4+, brw_finish_batch() calls brw_emit_query_end(), which emits some extra PIPE_CONTROLs to capture the current occlusion query data. Unfortunately, it was being called *after* _intel_batchbuffer_flush added the MI_BATCH_BUFFER_END, meaning those PIPE_CONTROLs didn't get inside the batch. Not only does this likely cause bogus occlusion query values, it can also cause crashes: with the recent change to use 64-bit depth count writes on Gen6+, we started emitting an odd-length PIPE_CONTROL, which happened after the MI_NOOP padding. This resulted in an odd-length batch buffer, which resulted in execbuf2 returning -EINVAL and the application dying with an intel_do_flush_locked failure. On older generations, finish_batch() doesn't emit any state, so this change shouldn't have any effect. Huge thanks to Chris Wilson for helping me figure this out. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> The commit immediately following that one also should help fix related issues: commit 4e087de51ad0e7ba4a7199d3664e1d096f8dc510 Author: Kenneth Graunke <kenneth@whitecape.org> Date: Fri Aug 10 10:26:04 2012 -0700 intel: Reserve enough space to finish occlusion queries on Gen6. After realizing that brw_finish_batch emitted some final PIPE_CONTROLs to record occlusion queries, Chris noted that we probably hadn't reserved enough space to actually emit them. Reserving a full 60 bytes seems a bit harsh, since we only need that much if occlusion queries are actually active. Plus, 28 bytes would be sufficient for Gen7, and 24 for Gen4-5. We could optimize this in the future, but it doesn't seem too critical. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Verified.Fixed on commit master 4e087de51ad0e7ba4a7199d3664e1d096f8dc510. |
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.