[Bug 33265] HoMM 3 fails to create wgl context

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Mar 24 05:20:09 CDT 2013


http://bugs.winehq.org/show_bug.cgi?id=33265

--- Comment #4 from Ken Thomases <ken at codeweavers.com> 2013-03-24 05:20:09 CDT ---
There seem to be a couple of issues.  First, although the Mac driver's OpenGL
code finds the pixel format when it's enumerating them, it can't use it later. 
Second, the order of the formats causes the logic in
dlls/wined3d/context.c:context_choose_pixel_format() to pick a format with much
bigger color buffers than strictly necessary.  The first is a real problem; the
second is probably just suboptimal.

As near as I can tell, the array of pixel format attributes built by
enum_renderer_pixel_formats() is very similar to the one built by
create_context().  The main differences are:

a) enum_renderer_pixel_formats() includes kCGLPFARendererID,
renderer.renderer_id, kCGLPFASingleRenderer while create_context() doesn't
b) enum_renderer_pixel_formats() includes kCGLPFANoRecovery for accelerated
formats while create_context() doesn't

In both cases, I would expect that enum_renderer_pixel_formats() would be more
restrictive than create_context(), meaning that create_context() should never
fail.  But it is.

I'm pretty sure we want to keep kCGLPFARendererID, renderer.renderer_id. 
enum_renderer_pixel_formats() is, after all, enumerating just those pixel
formats for a specific renderer while create_context() can use any renderer.

The docs do discourage the use of kCGLPFASingleRenderer, though.

Can you try three experiments for me?

1) Remove kCGLPFASingleRenderer from the attribute array in
enum_renderer_pixel_formats().  Be sure to also change the initial value of
"n", too.

2) Remove the use of kCGLPFANoRecovery in enum_renderer_pixel_formats().

3) Use kCGLPFANoRecovery in create_context() when the pixel format is
accelerated.

(These are separate experiments, so back out the changes for one before trying
the next.)

For experiments 1 and 2, I'm wondering if the 64/16 formats cease being
enumerated because enum_renderer_pixel_formats() is now failing in the same way
as create_context() has been.  For experiment 3, I'm wondering if
create_context() now succeeds for the pixel format just as
enum_renderer_pixel_formats() has been.

Thanks.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list