Bug 21648 - [radeon-rewrite] TexImage2D, SGIS_generate_mipmap, pixels=NULL
Summary: [radeon-rewrite] TexImage2D, SGIS_generate_mipmap, pixels=NULL
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-09 12:23 UTC by Owen Taylor
Modified: 2009-05-13 16:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
radeon: Don't crash generating mipmaps when pixels=NULL (1.81 KB, patch)
2009-05-09 12:26 UTC, Owen Taylor
Details | Splinter Review

Description Owen Taylor 2009-05-09 12:23:13 UTC
When mipmap generation is enabled, if NULL is passed for pixels to TexImage2D, then then a crash occurs because the code attempts to generate a mipmap but there is no source data for the image yet.

Note: I updated TexSubImage2D correspondingly, even though pixels=NULL is not allowed for TexSubImage2D, for code consistency and because it appears that pixels=NULL is not currently caught by the wrapper code and is otherwise a no-op, so it's better not to crash just for this.
Comment 1 Owen Taylor 2009-05-09 12:26:40 UTC
Created attachment 25673 [details] [review]
radeon: Don't crash generating mipmaps when pixels=NULL
Comment 2 Alex Deucher 2009-05-13 16:45:56 UTC
pushed:
ca792be42b238bd1c8f8a99ad72ea8558cbbfc32


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.