i965: disable shadow batches when batch debugging.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_gs.c
index 34e37373999fbe14a98c69ee02f0b723ca3cd7be..c7c0ec0d41eb19b2161f29bff3605a2a9b814d60 100644 (file)
@@ -79,7 +79,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
 
    brw_compute_vue_map(devinfo,
                        &prog_data.base.vue_map, outputs_written,
-                       gp->program.info.separate_shader);
+                       gp->program.info.separate_shader, 1);
 
    int st_index = -1;
    if (INTEL_DEBUG & DEBUG_SHADER_TIME)
@@ -93,7 +93,8 @@ brw_codegen_gs_prog(struct brw_context *brw,
    char *error_str;
    const unsigned *program =
       brw_compile_gs(brw->screen->compiler, brw, mem_ctx, key,
-                     &prog_data, nir, &gp->program, st_index, &error_str);
+                     &prog_data, nir, &gp->program, st_index,
+                     NULL, &error_str);
    if (program == NULL) {
       ralloc_strcat(&gp->program.sh.data->InfoLog, error_str);
       _mesa_problem(NULL, "Failed to compile geometry shader: %s\n", error_str);
@@ -105,7 +106,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
    if (unlikely(brw->perf_debug)) {
       if (gp->compiled_once) {
          brw_debug_recompile(brw, MESA_SHADER_GEOMETRY, gp->program.Id,
-                             key->program_string_id, key);
+                             &key->base);
       }
       if (start_busy && !brw_bo_busy(brw->batch.last_bo)) {
          perf_debug("GS compile took %.03f ms and stalled the GPU\n",
@@ -150,10 +151,7 @@ brw_gs_populate_key(struct brw_context *brw,
 
    memset(key, 0, sizeof(*key));
 
-   key->program_string_id = gp->id;
-
-   /* _NEW_TEXTURE */
-   brw_populate_sampler_prog_key_data(ctx, &gp->program, &key->tex);
+   brw_populate_base_prog_key(ctx, gp, &key->base);
 }
 
 void
@@ -179,9 +177,9 @@ brw_upload_gs_prog(struct brw_context *brw)
       return;
 
    gp = (struct brw_program *) brw->programs[MESA_SHADER_GEOMETRY];
-   gp->id = key.program_string_id;
+   gp->id = key.base.program_string_id;
 
-   MAYBE_UNUSED bool success = brw_codegen_gs_prog(brw, gp, &key);
+   ASSERTED bool success = brw_codegen_gs_prog(brw, gp, &key);
    assert(success);
 }
 
@@ -194,8 +192,8 @@ brw_gs_populate_default_key(const struct brw_compiler *compiler,
 
    memset(key, 0, sizeof(*key));
 
-   brw_setup_tex_for_precompile(devinfo, &key->tex, prog);
-   key->program_string_id = brw_program(prog)->id;
+   brw_populate_default_base_prog_key(devinfo, brw_program(prog),
+                                      &key->base);
 }
 
 bool