If we fail to compile the normal VS or FS we fall back to a simple/
dummy shader. We need to rescan the the shader to update the shader
info. Otherwise, this can lead to further translations failures
because the shader info doesn't match the actual shader.
Found by adding some extra debug assertions in the state-update code
while debugging something else.
v2: also update shader generic_inputs/outputs, etc. per Charmaine
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
FREE((void *) fs->base.tokens);
fs->base.tokens = dummy;
+ tgsi_scan_shader(fs->base.tokens, &fs->base.info);
+ fs->generic_inputs = svga_get_generic_inputs_mask(&fs->base.info);
+ svga_remap_generics(fs->generic_inputs, fs->generic_remap_table);
+
variant = translate_fragment_program(svga, fs, key);
return variant;
}
FREE((void *) vs->base.tokens);
vs->base.tokens = dummy;
+ tgsi_scan_shader(vs->base.tokens, &vs->base.info);
+ vs->generic_outputs = svga_get_generic_outputs_mask(&vs->base.info);
+
variant = translate_vertex_program(svga, vs, key);
return variant;
}