@ -1525,12 +1525,18 @@ static struct vrend_linked_shader_program *add_shader_program(struct vrend_conte
if ( fs - > sel - > sinfo . num_outputs > 1 ) {
if ( fs - > sel - > sinfo . num_outputs > 1 ) {
if ( util_blend_state_is_dual ( & ctx - > sub - > blend_state , 0 ) ) {
if ( util_blend_state_is_dual ( & ctx - > sub - > blend_state , 0 ) ) {
glBindFragDataLocationIndexed ( prog_id , 0 , 0 , " fsout_c0 " ) ;
if ( has_feature ( feat_dual_src_blend ) ) {
glBindFragDataLocationIndexed ( prog_id , 0 , 1 , " fsout_c1 " ) ;
glBindFragDataLocationIndexed ( prog_id , 0 , 0 , " fsout_c0 " ) ;
glBindFragDataLocationIndexed ( prog_id , 0 , 1 , " fsout_c1 " ) ;
} else {
report_context_error ( ctx , VIRGL_ERROR_CTX_ILLEGAL_DUAL_SRC_BLEND , 0 ) ;
}
sprog - > dual_src_linked = true ;
sprog - > dual_src_linked = true ;
} else {
} else {
glBindFragDataLocationIndexed ( prog_id , 0 , 0 , " fsout_c0 " ) ;
if ( has_feature ( feat_dual_src_blend ) ) {
glBindFragDataLocationIndexed ( prog_id , 1 , 0 , " fsout_c1 " ) ;
glBindFragDataLocationIndexed ( prog_id , 0 , 0 , " fsout_c0 " ) ;
glBindFragDataLocationIndexed ( prog_id , 1 , 0 , " fsout_c1 " ) ;
}
sprog - > dual_src_linked = false ;
sprog - > dual_src_linked = false ;
}
}
} else
} else