WineD3D: glBlend* fixes
Roland Scheidegger
rscheidegger_lists at hispeed.ch
Mon Sep 25 17:53:25 CDT 2006
> Roderick, Mesa calls the extension "GL_EXT_blend_minmax", and so does
> the spec. I don't know what exactly uses the min_max form. Is this a
> typo?
Apart from the blend_minmax typo, it appears to be me this patch has
some other problems.
>> This patch changes the detection extension detection for
>> glBlendColor/glBlendEquation. The function glBlendColor is part of
>> OpenGL 1.1 and is supported on all OpenGL implementations.
No, it's not. Calls to it are ONLY legal on opengl up to 1.3 if either
ARB_imaging or EXT_blend_color are supported (the spec says "Blend Color
is an imaging subset feature, and is only allowed when the imaging
subset is supported"). It is however part of OpenGL 1.4.
So, a really correct detection would be to check for ogl version 1.4,
EXT_blend_color, ARB_imaging. Maybe the check for ARB_imaging could be
omitted, but it is possible there are drivers out there which only
announce support for ARB_imaging but not EXT_blend_color, according to
www.delphi3d.net there are indeed some tnt2's out there which claim
support for ARB_imaging but not EXT_blend_color - if I'd have to guess
I'd suspect the call to glBlendColor results in a sw fallback.
>> Further glBlendEquation is part of GL_ARB_imaging aswell. For the
>> same reason GL_ARB_imaging can't be used to detect glBlendEquation.
>> This call isn't supported on all OpenGL implementations. Luckily it
>> is part of 'GL_EXT_blend_min_max' so that is used now.
This is not quite so simple. If OGL 1.4 is supported, or the version is
lower but ARB_imaging itself is supported, all the blend function stuff
from ARB_imaging is ok. If only either EXT_blend_minmax or
EXT_blend_subtract is supported, then glBlendEquation is supported, but
only different modes are valid (FUNC_ADD, MIN, MAX for EXT_blend_minmax,
FUNC_ADD, FUNC_SUBTRACT, FUNC_REVERSE_SUBTRACT for EXT_blend_subtract).
But if all you care is that glBlendEquation is available, you should
probably detect ogl 1.4, and EXT_blend_subtract (some cards only support
EXT_blend_subtract but not EXT_blend_minmax), but really for correctness
EXT_blend_minmax and ARB_imaging should be checked too.
Roland
(not subscribed to wine-devel - include me in cc for answers)
More information about the wine-devel
mailing list