[Bug 14762] GeforceFX series: fullscreen PP effect issues / RECT texcoord fixup

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 30 17:52:44 CST 2008


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





--- Comment #27 from Tobias Jakobi <liquid.acid at gmx.net>  2008-11-30 17:52:43 ---
Created an attachment (id=17576)
 --> (http://bugs.winehq.org/attachment.cgi?id=17576)
IRC discussion with Stefan and Henri about the issue

Just some material for me, so I don't forget what I should do to cleanly
implement a fix for this problem.

What I have understood so far:
1) Add new BOOL texrect_fixup to ps_compile_args (in wined3d_private.h) so we
can device whether fixup is needed or not.

Question: Where do I "configure" / initialize the ps_compile_args structure?

2) Add code to sampler() (in state.c) to trigger fixup uniform reloading when
pshaders and rect textures are used.

So I think this is the correct check:
use_ps(stateblock->wineD3DDevice) &&
IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[sampler]) ==
GL_TEXTURE_RECTANGLE_ARB)

Question: What do I call then? I don't think I can simply call a method from
glsl_shader.c since in the end this whole fix should also kill the issue when
ARB mode is used (and not GLSL).

I suspect I should call shader_backend->load_constants there?
However isn't that call kinda "heavy"? (since I "only" wanna reload the fixup
uniforms).

3) For each sampler2DRect also generate a vec2 uniform containing the texture
dimensions. This is probably going into shader_generate_glsl_declarations
(glsl_shader.c)

Question: Currently I have put this into the texture samplers declaration, but
from the discussion on IRC I assume this has to move into a separate loop.

4) Disable the (now) superfluous texcoord fixup in transform_texture()
(state.c) in case pshaders are used.

What's also a mystery to me is the "register a handler for STATE_SAMPLER(0-16)"
thing, which supposedly located in state.c and arb_program_shader.c. I don't
think that kind of code is found somewhere in sampler() (state.c)

Does this "register"-thing mean adding stuff to the large xxx_template
structures?

Sorry if I'm asking dumb question :(

Greets,
Tobias


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