mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Revert "Only call glUniformMatrix4fv if needed"
This commit is contained in:
parent
7d64fdabf9
commit
7672288fcd
@ -1256,7 +1256,6 @@ static void gl_glsl_set_params(void *data, void *shader_data,
|
||||
|
||||
static bool gl_glsl_set_mvp(void *data, void *shader_data, const math_matrix_4x4 *mat)
|
||||
{
|
||||
static float current_mat_data[GFX_MAX_SHADERS];
|
||||
int loc;
|
||||
glsl_shader_data_t *glsl = (glsl_shader_data_t*)shader_data;
|
||||
|
||||
@ -1266,12 +1265,9 @@ static bool gl_glsl_set_mvp(void *data, void *shader_data, const math_matrix_4x4
|
||||
goto fallback;
|
||||
|
||||
loc = glsl->uniforms[glsl->active_idx].mvp;
|
||||
if (loc >= 0) {
|
||||
if (*mat->data != current_mat_data[loc]) {
|
||||
glUniformMatrix4fv(loc, 1, GL_FALSE, mat->data);
|
||||
current_mat_data[loc] = *mat->data;
|
||||
}
|
||||
}
|
||||
if (loc >= 0)
|
||||
glUniformMatrix4fv(loc, 1, GL_FALSE, mat->data);
|
||||
|
||||
return true;
|
||||
|
||||
fallback:
|
||||
|
Loading…
Reference in New Issue
Block a user