i965: switch vs over to shared shader_info
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 19 Oct 2016 01:28:14 +0000 (12:28 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 26 Oct 2016 03:29:36 +0000 (14:29 +1100)
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/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_vs.c

index a2e0442..92a500c 100644 (file)
@@ -302,7 +302,7 @@ brw_merge_inputs(struct brw_context *brw,
    }
 
    if (brw->gen < 8 && !brw->is_haswell) {
-      uint64_t mask = ctx->VertexProgram._Current->Base.nir->info->inputs_read;
+      uint64_t mask = ctx->VertexProgram._Current->Base.info.inputs_read;
       /* Prior to Haswell, the hardware can't natively support GL_FIXED or
        * 2_10_10_10_REV vertex formats.  Set appropriate workaround flags.
        */
index f24a2ee..a7f89f3 100644 (file)
@@ -150,9 +150,8 @@ brw_codegen_vs_prog(struct brw_context *brw,
    }
 
    uint64_t outputs_written =
-      brw_vs_outputs_written(brw, key,
-                             vp->program.Base.nir->info->outputs_written);
-   prog_data.inputs_read = vp->program.Base.nir->info->inputs_read;
+      brw_vs_outputs_written(brw, key, vp->program.Base.info.outputs_written);
+   prog_data.inputs_read = vp->program.Base.info.inputs_read;
 
    if (key->copy_edgeflag) {
       prog_data.inputs_read |= VERT_BIT_EDGEFLAG;