Commit d8fcb504 authored by Haihao Xiang's avatar Haihao Xiang

i965: update RefCount when using Vertex/Fragment program.

It makes quake4-demo works well on 965.
parent 16099c15
......@@ -70,12 +70,14 @@ static void brwUseProgram(GLcontext *ctx, GLuint program)
if (sh_prog) {
if (sh_prog->VertexProgram) {
brw->attribs.VertexProgram->Current = sh_prog->VertexProgram;
sh_prog->VertexProgram->Base.RefCount++;
ctx->VertexProgram.Enabled = GL_TRUE;
}else
ctx->VertexProgram.Enabled = GL_FALSE;
if (sh_prog->FragmentProgram) {
brw->attribs.FragmentProgram->Current = sh_prog->FragmentProgram;
sh_prog->FragmentProgram->Base.RefCount++;
ctx->FragmentProgram.Enabled = GL_TRUE;
} else
ctx->FragmentProgram.Enabled = GL_FALSE;
......
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