Open Bug 743419 Opened 13 years ago Updated 11 months ago

Tegra driver bug workaround applied unconditionally, potentially harming performance

Categories

(Core :: Graphics, defect)

defect

Tracking

()

People

(Reporter: bjacob, Unassigned)

References

Details

Attachments

(1 obsolete file)

In GLContext.cpp we have this: void GLContext::TexSubImage2DWithUnpackSubimageGLES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLsizei stride, GLint pixelsize, GLenum format, GLenum type, const GLvoid* pixels) { fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, NS_MIN(GetAddressAlignment((ptrdiff_t)pixels), GetAddressAlignment((ptrdiff_t)stride))); // When using GL_UNPACK_ROW_LENGTH, we need to work around a Tegra // driver crash where the driver apparently tries to read // (stride - width * pixelsize) bytes past the end of the last input // row. We only upload the first height-1 rows using GL_UNPACK_ROW_LENGTH, // and then we upload the final row separately. See bug 697990. int rowLength = stride/pixelsize; fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, rowLength); fTexSubImage2D(target, level, xoffset, yoffset, width, height-1, format, type, pixels); fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0); fTexSubImage2D(target, level, xoffset, yoffset+height-1, width, 1, format, type, (const unsigned char *)pixels+(height-1)*stride); fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4); } This seems to come from bug 724094.
Note: I'm soon attaching a patch to bug 686375, adding no-driver-workarounds mode. Please make a patch checking for mWorkAroundDriverBugs.
Severity: normal → S3
Attachment #9382786 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: