{
struct gl_linked_shader *sh = shader_prog->_LinkedShaders[stage];
- nir_shader *shader = nir_shader_create(NULL, stage, options, NULL);
+ nir_shader *shader = nir_shader_create(NULL, stage, options,
+ &sh->Program->info);
nir_visitor v1(shader);
nir_function_visitor v2(&v1);
#include "glapi/glapi.h"
#include "math/m_matrix.h" /* GLmatrix */
#include "compiler/shader_enums.h"
+#include "compiler/shader_info.h"
#include "main/formats.h" /* MESA_FORMAT_COUNT */
#include "compiler/glsl/list.h"
#include "util/bitscan.h"
struct nir_shader *nir;
+ struct shader_info info;
+
GLbitfield64 InputsRead; /**< Bitmask of which input regs are read */
GLbitfield64 DoubleInputsRead; /**< Bitmask of which input regs are read and are doubles */
GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
c->prog = prog;
nir_builder_init_simple_shader(&c->build, NULL, stage, options);
+
+ /* Use the shader_info from gl_program rather than the one nir_builder
+ * created for us. nir_sweep should clean up the other one for us.
+ */
+ c->build.shader->info = (shader_info *) &prog->info;
+
s = c->build.shader;
if (prog->Parameters->NumParameters > 0) {