[Bug 12736] d3d:sampler GL_INVALID_ENUM from glActiveTextureARB @ state.c

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Apr 8 04:17:27 CDT 2009


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





--- Comment #3 from Jörg Höhle <hoehle at users.sourceforge.net>  2009-04-08 04:17:27 ---
>Is this still an issue in current (1.1.18 or newer) wine?
Bug #17253 prevents Luka from starting since 1.1.13, so I've not checked again.
I didn't try git-revert -n.

Yet when you look at wined3d/sample.c, you'll notice a questionable use of 4
different GL_LIMITS (GL spec 2.1 section 2.11 mentions only 2 and 1 "for
compatibility"):

state_texfactor:
while idx < GL_LIMITS(texture_stages)
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + idx));

tex_colorop, tex_alphaop, transform_texture:
if mapped_stage >= GL_LIMITS(textures)
    return;
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));

tex_coordindex:
if(mapped_stage >= GL_LIMITS(fragment_samplers)) {
    return;
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));

sampler:
if (mapped_stage >= GL_LIMITS(combined_samplers)) {
    return;
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
That's the one causing the original error, still present in 1.1.18.


>So if you do that change to wine source and recompile, does the bug disappear?
>You seem to have diagnosed it...
It's not what I'd call diagnosis. I was just pointing at an error and showing
snippets of manual pages, in the hope that somebody knowledgeable would pick it
up.

My knowledge of OpenGL and especially OpenGL compatibility programming is near
0.  E.g. How to write code that works with OpenGL 2.0, 2.1, 1.x, with or
without ARB extension X?
Does Wine expect OpenGL 2.1 and the XOrg Intel driver is only 2.0?

So I wouldn't dare to change a limit in sampler() to silence a warning without
understanding what this limit affects and whether other portions of code (in
wine) expect a particular behaviour.
E.g. I don't even understand why it's safe to simply "return" from the
functions without performing the job obviously requested by another entity in
the program.  Why were they called at all?


-- 
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