wined3d: Call the shader_load_np2fixup_constants() handler directly from inside the shader backend.

This commit is contained in:
Henri Verbeet 2009-08-06 08:12:21 +02:00 committed by Alexandre Julliard
parent 03686cb6bd
commit 4c1b3de936
2 changed files with 4 additions and 3 deletions

View File

@ -4260,7 +4260,7 @@ static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
}
/* Force constant reloading for the NP2 fixup (see comment in shader_glsl_select for more info) */
if (compiled->np2fixup_info.super.active) This->shader_backend->shader_load_np2fixup_constants(iface, usePS, useVS);
if (compiled->np2fixup_info.super.active) shader_arb_load_np2fixup_constants(iface, usePS, useVS);
} else if(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && !priv->use_arbfp_fixed_func) {
/* Disable only if we're not using arbfp fixed function fragment processing. If this is used,
* keep GL_FRAGMENT_PROGRAM_ARB enabled, and the fixed function pipeline will bind the fixed function

View File

@ -4281,8 +4281,9 @@ static void shader_glsl_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
/* In case that NP2 texcoord fixup data is found for the selected program, trigger a reload of the
* constants. This has to be done because it can't be guaranteed that sampler() (from state.c) is
* called between selecting the shader and using it, which results in wrong fixup for some frames. */
if (priv->glsl_program && priv->glsl_program->np2Fixup_info) {
This->shader_backend->shader_load_np2fixup_constants(iface, usePS, useVS);
if (priv->glsl_program && priv->glsl_program->np2Fixup_info)
{
shader_glsl_load_np2fixup_constants(iface, usePS, useVS);
}
}