Skip to content
  • Rob Clark's avatar
    freedreno/a3xx: fix const/rel/const-rel encoding · 4317c4e6
    Rob Clark authored
    
    
    The encoding of constant, relative, and relative-const src registers is
    a bit more complex than originally thought, which gives an extra bit to
    encode const reg # at expense of taking a bit from relative offset.
    
    In most cases a3xx seems to actually use a scheme whereby it can encode
    an extra bit for const register.  You have three possible encodings in
    thirteen bits:
    
       register:  (11 bits for N.c)
         00........... rN.c
    
       relative:  (10 bits for N)
         010.......... r<a0.x + N>
         011.......... c<a0.x + N>
    
       const:     (12 bits for N.c)
         1............ cN.c
    
    Which means we can deal w/ more consts than previously thought.
    
    Signed-off-by: default avatarRob Clark <robclark@freedesktop.org>
    4317c4e6