Skip to content
  • Kenneth Graunke's avatar
    i965: Write a scalar TCS backend that runs in SINGLE_PATCH mode. · 7d9143ad
    Kenneth Graunke authored
    
    
    Unlike most shader stages, the Hull Shader hardware makes us explicitly
    tell it how many threads to dispatch and manually configure the channel
    mask.  One perk of this is that we have a lot of flexibility - we can
    run it in either SIMD4x2 or SIMD8 mode.
    
    Treating it as SIMD8 means that shaders with 8 or fewer output vertices
    (which is overwhemingly the common case) can be handled by a single
    thread.  This has several intriguing properties:
    
    - Accessing input arrays with gl_InvocationID as the index is a simple
      SIMD8 URB read with g1 as the header.  No indirect addressing required.
    - Barriers are no-ops.
    - We could potentially do output shadowing to combine writes, as the
      concurrency concerns are gone.  (We don't do this yet, though.)
    
    v2: Drop first_non_payload_grf change, as it was always adding 0
        (caught by Jordan Justen).
    
    Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: default avatarJordan Justen <jordan.l.justen@intel.com>
    7d9143ad