Skip to content
  • Paul Berry's avatar
    glsl: Assign transform feedback varying slots in linker. · 871ddb91
    Paul Berry authored
    
    
    This patch modifies the GLSL linker to assign additional slots for
    varying variables used by transform feedback, and record the varying
    slots used by transform feedback for use by the driver back-end.
    
    This required modifying assign_varying_locations() so that it assigns
    a varying location if either (a) the varying is used by the next stage
    of the GL pipeline, or (b) the varying is required by transform
    feedback.  In order to avoid duplicating the code to assign a single
    varying location, I moved it into its own function,
    assign_varying_location().
    
    In addition, to support transform feedback in the case where there is
    no fragment shader, it is now possible to call
    assign_varying_locations() with a consumer of NULL.
    
    Reviewed-by: default avatarMarek Olšák <maraeo@gmail.com>
    Tested-by: default avatarMarek Olšák <maraeo@gmail.com>
    871ddb91