diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-01-11 16:19:21 +0000 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-01-11 16:19:21 +0000 |
commit | e37a3aed95ea91a7ddbabc4bed1fac7c451fe695 (patch) | |
tree | 9efa59fb8015a58146d7a50a3b6039e5fbe3a60d /src/mesa/shader/slang/slang_link.c | |
parent | 61e843ff4bf9b9e8c4a7a8a485cee852a4f1dd86 (diff) | |
parent | 83a525af95bbb8012b9d7ee6b766621d6bb2d701 (diff) |
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-rw-r--r-- | src/mesa/shader/slang/slang_link.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 3f953d86e7..a68cafc086 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -644,6 +644,17 @@ _slang_link(GLcontext *ctx, } } + /* check that gl_FragColor and gl_FragData are not both written to */ + if (shProg->FragmentProgram) { + GLbitfield outputsWritten = shProg->FragmentProgram->Base.OutputsWritten; + if ((outputsWritten & ((1 << FRAG_RESULT_COLR))) && + (outputsWritten >= (1 << FRAG_RESULT_DATA0))) { + link_error(shProg, "Fragment program cannot write both gl_FragColor" + " and gl_FragData[].\n"); + return; + } + } + if (fragProg && shProg->FragmentProgram) { /* Compute initial program's TexturesUsed info */ |