/* Configuration key used to identify a shader variant.. different
* shader variants can be used to implement features not supported
* in hw (two sided color), binning-pass vertex shader, etc.
+ *
+ * When adding to this struct, please update ir3_shader_variant()'s debug
+ * output.
*/
struct ir3_shader_key {
union {
uint32_t id;
uint32_t variant_count;
+ /* Set by freedreno after shader_state_create, so we can emit debug info
+ * when recompiling a shader at draw time.
+ */
+ bool initial_variants_done;
+
struct ir3_compiler *compiler;
struct ir3_ubo_analysis_state ubo_state;
v = ir3_shader_get_variant(shader, &key, binning_pass, &created);
if (created) {
+ if (shader->initial_variants_done) {
+ pipe_debug_message(debug, SHADER_INFO,
+ "%s shader: recompiling at draw time: global 0x%08x, vsats %x/%x/%x, fsats %x/%x/%x, vfsamples %x/%x, astc %x/%x\n",
+ ir3_shader_stage(v),
+ key.global,
+ key.vsaturate_s, key.vsaturate_t, key.vsaturate_r,
+ key.fsaturate_s, key.fsaturate_t, key.fsaturate_r,
+ key.vsamples, key.fsamples,
+ key.vastc_srgb, key.fastc_srgb);
+
+ }
dump_shader_info(v, binning_pass, debug);
}
ir3_shader_variant(shader, key, true, debug);
}
+ shader->initial_variants_done = true;
+
return shader;
}
ir3_shader_variant(shader, key, false, debug);
}
+ shader->initial_variants_done = true;
+
return shader;
}