Skip to content
  • Matt Turner's avatar
    mesa: Add missing _mm_mfence() before streaming loads. · 36ea9922
    Matt Turner authored
    
    
    According to the Intel Software Development Manual (Volume 1: Basic
    Architecture, 12.10.3 Streaming Load Hint Instruction):
    
       Streaming loads may be weakly ordered and may appear to software to
       execute out of order with respect to other memory operations.
       Software must explicitly use fences (e.g. MFENCE) if it needs to
       preserve order among streaming loads or between streaming loads and
       other memory operations.
    
    That is, a memory fence is needed to preserve the order between the GPU
    writing the buffer and the streaming loads reading it back.
    
    Reported-by: default avatarJoseph Nuzman <joseph.nuzman@intel.com>
    Reviewed-by: default avatarJordan Justen <jordan.l.justen@intel.com>
    36ea9922