This is still broken in the same way as the first version: fixme:d3d_shader:print_glsl_info_log error: interpolation modifier mismatch for varying parameter (named ps_link1) between shader stages
On Sun, Nov 20, 2016 at 6:36 PM, Andrew Wesie awesie@gmail.com wrote:
Signed-off-by: Andrew Wesie awesie@gmail.com
dlls/wined3d/glsl_shader.c | 47 ++++++++++++++++++++++++++++++------------ dlls/wined3d/shader.c | 7 +++++++ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 42 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 9e9c83b..5df1827 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -2162,7 +2162,14 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont UINT in_count = min(vec4_varyings(version->major, gl_info), shader->limits->packed_input);
if (ps_args->vp_mode == vertexshader)
declare_in_varying(gl_info, buffer, FALSE, "vec4 %s_link[%u];\n", prefix, in_count);
{
unsigned int j;
for (j = 0; j < in_count; j++)
{
declare_in_varying(gl_info, buffer, shader->u.ps.input_reg_flags[j] == WINED3DSIM_CONSTANT,
"vec4 %s_link%u;\n", prefix, j);
}
}
We should add a FIXME() message for other unsupported interpolation modes. We do not want to hide that those are still not implemented. Currently, we have a FIXME() for the dcl_input_ps instruction.
else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS)
{
unsigned int reg_idx = ins.declaration.dst.reg.idx[0].offset;
reg_maps->input_registers |= 1u << reg_idx;
/* We can assume we are in the pixel shader */
shader->u.ps.input_reg_flags[reg_idx] = ins.flags;
}
We tend to check the shader type and print a FIXME() message in similar cases instead of adding a comment. See WINED3DSIH_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_OUTPUT_TOPOLOGY and WINED3DSIH_DCL_VERTICES_OUT.
/* Pixel shader input semantics */ DWORD input_reg_map[MAX_REG_INPUT]; BOOL input_reg_used[MAX_REG_INPUT];
- enum wined3d_shader_interpolation_mode input_reg_flags[MAX_REG_INPUT];
I think we could use better name for this variable, e.g. "input_reg_interpolation_mode" or "interpolation_mode".