Bug 89026

Summary: Renderbuffer layered state used for framebuffer completeness test
Product: Mesa Reporter: James Legg <lankyleggy>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch
Reproducer
Apitrace trace from reproducer

Description James Legg 2015-02-07 23:45:56 UTC
Created attachment 113255 [details]
Patch

When binding a layered texture to a framebuffer, the framebuffer is marked as layered. When a renderbuffer is bound to the same attachment point, it replaces the texture, but mesa doesn't clear the layered state. When checking for framebuffer completeness, the left over layered state is used, even though renderbuffers don't have layered state. This can result in framebuffer incompleteness with GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS when there are no layered attachment points.

This occurs on the 10.4 branch at 54da987baec25fbaf6975c93f197ddbfe65a303c and the master branch at 49299ef6fa0cf88e7101512400a4e74efa300941.
Comment 1 James Legg 2015-02-07 23:46:59 UTC
Created attachment 113256 [details]
Reproducer
Comment 2 James Legg 2015-02-07 23:48:45 UTC
Created attachment 113257 [details]
Apitrace trace from reproducer
Comment 3 Chris Forbes 2015-02-08 01:02:33 UTC
James,

I've confirmed that your patch fixes the test case provided, and push it to master.

- Chris

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.