Summary: | [i965 bisected] Stencil read fail | ||
---|---|---|---|
Product: | Mesa | Reporter: | Ian Romanick <idr> |
Component: | Drivers/DRI/i965 | Assignee: | Eric Anholt <eric> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | jfonseca |
Version: | git | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ian Romanick
2011-05-19 03:06:58 UTC
I take some of the previous comment back. Further bisecting shows that: commit 6ab9889a2704304a45b4da5b28840af08f6f42c5 Author: Eric Anholt <eric@anholt.net> Date: Fri Apr 15 12:58:17 2011 -0700 mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_* Reviewed-by: Brian Paul <brianp@vmware.com> is the real problem. Of course, it's still not clear to me why this fails. (gdb) print *dsrb $2 = {Magic = -1430532899, Mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = { __prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, ClassID = 305419896, Name = 0, RefCount = 4, Width = 100, Height = 100, RowStride = -128, Purgeable = 0 '\000', InternalFormat = 34041, _BaseFormat = 34041, Format = 34, NumSamples = 0 '\000', DataType = 34042, Data = 0x7ffff2e40600, Wrapped = 0x9c3600, Delete = 0x7ffff60f5463 <intel_delete_renderbuffer>, AllocStorage = 0x7ffff60f5a19 <intel_alloc_window_storage>, GetPointer = 0x7ffff61f0cd8 <get_pointer_generic>, GetRow = 0x7ffff61f16f2 <get_row_uint>, GetValues = 0x7ffff61f1797 <get_values_uint>, PutRow = 0x7ffff61f1866 <put_row_uint>, PutRowRGB = 0, PutMonoRow = 0x7ffff61f195a <put_mono_row_uint>, PutValues = 0x7ffff61f1a4b <put_values_uint>, PutMonoValues = 0x7ffff61f1b2f <put_mono_values_uint>} (gdb) print format_info[34] $3 = {Name = MESA_FORMAT_S8_Z24, StrName = 0x7ffff6416896 "MESA_FORMAT_S8_Z24", BaseFormat = 34041, DataType = 5125, RedBits = 0 '\000', GreenBits = 0 '\000', BlueBits = 0 '\000', AlphaBits = 0 '\000', LuminanceBits = 0 '\000', IntensityBits = 0 '\000', IndexBits = 0 '\000', DepthBits = 24 '\030', StencilBits = 8 '\b', BlockWidth = 1 '\001', BlockHeight = 1 '\001', BytesPerBlock = 4 '\004'} So get_pointer_generic should produce the same result as the old get_pointer_uint. *** Bug 37425 has been marked as a duplicate of this bug. *** commit e8b1c6d6f55f5be3bef25084fdd8b6127517e137 Author: Adam Jackson <ajax@redhat.com> Date: Fri May 20 18:21:15 2011 -0400 mesa: Fix return type of _mesa_get_format_bytes() (#37351) Despite that negative values aren't sensible here, making this unsigned is dangerous. Consider get_pointer_generic, which computes a value of the form: void *base + (int x * int stride + int y) * unsigned bpp The usual arithmetic conversions will coerce the (x*stride + y) subexpression to unsigned. Since stride can be negative, this is disastrous. Fixes at least the following piglit tests on Ironlake: fbo/fbo-blit-d24s8 spec/ARB_depth_texture/fbo-clear-formats spec/EXT_packed_depth_stencil/fbo-clear-formats NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Chad Versace <chad.versace@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com> |
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.