Bug 21648

Summary: [radeon-rewrite] TexImage2D, SGIS_generate_mipmap, pixels=NULL
Product: Mesa Reporter: Owen Taylor <otaylor>
Component: Drivers/DRI/R100Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: radeon: Don't crash generating mipmaps when pixels=NULL

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.