From 17e28a1571b6141368fefc84cc8b0a3b4e52f8ee Mon Sep 17 00:00:00 2001
From: Timothy Arceri <timothy.arceri@collabora.com>
Date: Wed, 19 Oct 2016 13:45:18 +1100
Subject: i965/mesa/st/swrast: set fs shader_info directly and switch to using
 it

Note we access shader_info from the program struct rather than the
nir_shader pointer because shader cache won't create a nir_shader.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
---
 src/mesa/program/ir_to_mesa.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/mesa/program/ir_to_mesa.cpp')

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 00ee3e34bfc..03af1165827 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2926,8 +2926,7 @@ get_mesa_program(struct gl_context *ctx,
 
    /* Set the gl_FragDepth layout. */
    if (target == GL_FRAGMENT_PROGRAM_ARB) {
-      struct gl_fragment_program *fp = (struct gl_fragment_program *)prog;
-      fp->FragDepthLayout = shader_program->FragDepthLayout;
+      prog->info.fs.depth_layout = shader_program->FragDepthLayout;
    }
 
    _mesa_reference_program(ctx, &shader->Program, prog);
-- 
cgit v1.2.3