• Kenneth Graunke's avatar
    i965: Implement ARB_fragment_layer_viewport. · 8c902a58
    Kenneth Graunke authored
    Normally, we could read gl_Layer from bits 26:16 of R0.0.  However, the
    specification requires that bogus out-of-range 32-bit values written by
    previous stages need to appear in the fragment shader as-written.
    
    Instead, we pass in the full 32-bit value from the VUE header as an
    extra flat-shaded varying.  We have the SF override the value to 0
    when the previous stage didn't actually write a value (it's actually
    defined to return 0).
    Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Chris Forbes's avatarChris Forbes <chrisf@ijw.co.nz>
    8c902a58
intel_extensions.c 13.7 KB