Bug 11161 - OSMesaMakeCurrent not properly changing contexts
Summary: OSMesaMakeCurrent not properly changing contexts
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/OSMesa (show other bugs)
Version: 6.5
Hardware: All All
: high critical
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-05 15:25 UTC by James Burns
Modified: 2019-09-18 20:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Snippet from context.c with fix (1.69 KB, text/x-csrc)
2007-06-06 10:51 UTC, James Burns
Details

Description James Burns 2007-06-05 15:25:54 UTC
Tracked this down to the check_compatible method in context.c.  The depth bits comparison is failing as the OSMesa context creation is using a default of 31 bits for depth.  The framebuffer/renderbuffer that is being compared against the context is made with 32 bits, and apparently can not be made with 31 bits (reference renderbuffer.c).  

I was able to bypass the depth bit comparison in check_compatible and all works. I am not positive what effect removal of this comparison might have in the bigger scheme, so someone may want to look at this bypass or changing of the OSMESA default depth buffer size.
Comment 1 James Burns 2007-06-06 10:51:39 UTC
Created attachment 10210 [details]
Snippet from context.c with fix

The attached code is the check_comparison method that I modified to allow the make current method work.
Comment 2 Brian Paul 2007-06-08 11:31:23 UTC
I'm wondering where the 31 is coming from.  Are you using an old version of Mesa?  Current Mesa supports full 32-bit depth buffers.

Anyway, I think it's safe to disable the test as your patch does.  I'll check that in.
Comment 3 James Burns 2007-06-08 11:49:56 UTC
This is coming from Mesa 6.5.3.  I have patches a few things related to GLSL shaders, based on bug reports posted.   I never tracked down where 31 was coming from, but it is the depth that was getting assigned to the context.


(In reply to comment #2)
> I'm wondering where the 31 is coming from.  Are you using an old version of
> Mesa?  Current Mesa supports full 32-bit depth buffers.
> 
> Anyway, I think it's safe to disable the test as your patch does.  I'll check
> that in.
> 

Comment 4 GitLab Migration User 2019-09-18 20:12:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/874.


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.