-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi
I've given this only a very quick look. My first impression is that a few things can be split out into separate patches, e.g. get_modelview_matrix. That's a fairly minor thing though.
On a somewhat related subject, I think we should check at some point that the state linking still works as intended and doesn't accidentally merge everything together into one huge state that's always updated.
Am 2015-03-17 um 15:52 schrieb Matteo Bruni:
@@ -775,6 +777,15 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context checkGLcall("glUniform4fv"); }
- if (update_mask & WINED3D_SHADER_CONST_FFP_MODELVIEW)
- {
struct wined3d_matrix mat;
get_modelview_matrix(context, state, &mat);
GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location, 1, FALSE, (GLfloat *)&mat));
checkGLcall("glUniformMatrix4fv");
- }
- if (update_mask & WINED3D_SHADER_CONST_PS_F) shader_glsl_load_constantsF(pshader, gl_info, state->ps_consts_f, prog->ps.uniform_f_locations, &priv->pconst_heap, priv->stack, constant_version);
Is it a good idea to put this in shader_glsl_load_constants? It may make sense to split fixed function and shader constants into separate functions. We'll never need shader constants and the modelview matrix in the same program.