mesa: propagate FragDepthLayout to gl_program
authorChia-I Wu <olv@lunarg.com>
Tue, 18 Feb 2014 04:25:06 +0000 (12:25 +0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 10 May 2014 00:21:53 +0000 (17:21 -0700)
The information was lost during linking, causing the layout to be treated as
FRAG_DEPTH_LAYOUT_NONE.

Signed-off-by: Chia-I Wu <olv@lunarg.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/shaderapi.c

index 6f84acd01f6587fee80fb1a6292b2076e5babb21..28739daeb97ffaf7d0d1f941894ead44a364841d 100644 (file)
@@ -1879,6 +1879,11 @@ _mesa_copy_linked_program_data(gl_shader_stage type,
       dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;
    }
       break;
+   case MESA_SHADER_FRAGMENT: {
+      struct gl_fragment_program *dst_fp = (struct gl_fragment_program *) dst;
+      dst_fp->FragDepthLayout = src->FragDepthLayout;
+   }
+      break;
    case MESA_SHADER_COMPUTE: {
       struct gl_compute_program *dst_cp = (struct gl_compute_program *) dst;
       int i;