Skip to content

shader: Remove duplicate vertex/fragment shader compiles

Ryan Neph requested to merge ryanneph/virglrenderer:dup_shader into master

vrend_shader_key contains params that are irrelevant to fragment shaders, but cause their recompilation anyway. Since 0f5cb454, the downstream effects of recompiling the fragment shader on the vrend_draw_vbo() call immediately following its original compilation are subsequent vertex shader recompilation and shader program relinking. Shader compilation and shader program linking calls are observed at 2x the intended amount, leading to degraded rendering performance.

This CL is an attempt to conditionally remove unnecessary, but changing vrend_shader_key params for fragment shaders to avoid these extraneous recompilations/links.

Merge request reports