Skip to content
  • Samuel Iglesias Gonsálvez's avatar
    i965/vec4: load dvec3/4 uniforms first in the push constant buffer · 8be7de22
    Samuel Iglesias Gonsálvez authored and Emil Velikov's avatar Emil Velikov committed
    
    
    Reorder the uniforms to load first the dvec4-aligned variables in the
    push constant buffer and then push the vec4-aligned ones. It takes
    into account that the relocated uniforms should be aligned to their
    channel size.
    
    This fixes a bug were the dvec3/4 might be loaded one part on a GRF and
    the rest in next GRF, so the region parameters to read that could break
    the HW rules.
    
    v2:
    - Fix broken logic.
    - Add a comment to explain what should be needed to optimise the usage
      of the push constant buffer slots, as this patch does not pack the
      uniforms.
    
    v3:
    - Implemented the push constant buffer usage optimization.
    
    Signed-off-by: default avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
    Cc: "17.1" <mesa-stable@lists.freedesktop.org>
    Acked-by: default avatarFrancisco Jerez <currojerez@riseup.net>
    (cherry picked from commit e69e5c70)
    8be7de22