intel/fs: Use helper for discard sample mask flag subregister number.
Use it instead of hard-coding f0.1 for the sample mask of programs that use discard. This will make the task easier when we replace f0.1 with another flag register location in order to support discard with SIMD32 shaders. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -417,6 +417,17 @@ private:
|
||||
unsigned workgroup_size() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the flag register used in fragment shaders to keep track of live
|
||||
* samples.
|
||||
*/
|
||||
static inline unsigned
|
||||
sample_mask_flag_subreg(const fs_visitor *shader)
|
||||
{
|
||||
assert(shader->stage == MESA_SHADER_FRAGMENT);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* The fragment shader code generator.
|
||||
*
|
||||
|
Reference in New Issue
Block a user