intel/fs/gen7+: Swap sample mask flag register and FIND_LIVE_CHANNEL temporary.
FIND_LIVE_CHANNEL was using f1.0-f1.1 as temporary flag register on Gen7, instead use f0.0-f0.1. In order to avoid collision with the discard sample mask, move the latter to f1.0-f1.1. This makes room for keeping track of the sample mask of the second half of SIMD32 programs that use discard. Note that some MOVs of the sample mask into f1.0 become redundant now in lower_surface_logical_send() and lower_a64_logical_send(). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>x
This commit is contained in:
@@ -419,13 +419,15 @@ private:
|
||||
|
||||
/**
|
||||
* Return the flag register used in fragment shaders to keep track of live
|
||||
* samples.
|
||||
* samples. On Gen7+ we use f1.0-f1.1 to allow discard jumps in SIMD32
|
||||
* dispatch mode, while earlier generations are constrained to f0.1, which
|
||||
* limits the dispatch width to SIMD16 for fragment shaders that use discard.
|
||||
*/
|
||||
static inline unsigned
|
||||
sample_mask_flag_subreg(const fs_visitor *shader)
|
||||
{
|
||||
assert(shader->stage == MESA_SHADER_FRAGMENT);
|
||||
return 1;
|
||||
return shader->devinfo->gen >= 7 ? 2 : 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user