Commit a6fa6a4a authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Use gl_Color and gl_SecondaryColor to support more varyings in SM3.0 shaders.

SM3.0 requires 10 4 component float varyings for passing stuff between vertex and pixel shaders. GF7 and earlier report 8 generic varyings + gl_Color and gl_SecondaryColor in GLSL. This patch allows us to use gl_Color and gl_SecondaryColor to get 2 extra varyings, which some games, like C&C3 with highest gfx settings, require.
parent 4a4ab5f2
......@@ -359,6 +359,7 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
for(i = 0; i < MAX_REG_INPUT; i++) {
This->input_reg_map[i] = i;
}
This->declared_in_count = highest_reg_used + 1;
} else {
j = 0;
for(i = 0; i < MAX_REG_INPUT; i++) {
......@@ -369,6 +370,7 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
This->input_reg_map[i] = -1;
}
}
This->declared_in_count = j;
}
}
This->baseShader.load_local_constsF = FALSE;
......
......@@ -1830,6 +1830,7 @@ struct glsl_shader_prog_link {
GLhandleARB srgb_comparison_location;
GLhandleARB srgb_mul_low_location;
GLhandleARB ycorrection_location;
GLenum vertex_color_clamp;
GLhandleARB vshader;
GLhandleARB pshader;
};
......@@ -2343,6 +2344,7 @@ typedef struct IWineD3DPixelShaderImpl {
semantic semantics_in [MAX_REG_INPUT];
DWORD input_reg_map[MAX_REG_INPUT];
BOOL input_reg_used[MAX_REG_INPUT];
int declared_in_count;
/* run time data */
PSHADERDATA *data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment