Move program validation from link-time to draw-time to compy with spec

This commit is contained in:
kd-11 2016-02-02 21:41:39 +03:00
parent e6d2e05b6e
commit 137821c866
2 changed files with 7 additions and 1 deletions

View File

@ -583,6 +583,13 @@ void GLGSRender::end()
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, GL_FLOAT, false, 0, 0);
/**
* Validate fails if called right after linking a program because the VS and FS both use textures bound using different
* samplers. So far only sampler2D has been largely used, hiding the problem. This call shall also degrade performance further
* if used every draw call. Fixes shader validation issues on AMD.
*/
m_program->validate();
if (draw_command == rsx::draw_command::indexed)
{
m_ebo.data(vertex_index_array.size(), vertex_index_array.data());

View File

@ -2096,7 +2096,6 @@ namespace gl
void make()
{
link();
validate();
}
uint id() const