intel/fs: Implement the sample_pos_or_center system value

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14198>
This commit is contained in:
Jason Ekstrand
2021-12-02 14:16:02 -06:00
committed by Marge Bot
parent a580fd55e1
commit 3c89dbdbfe
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -179,6 +179,7 @@ emit_system_values_block(nir_block *block, fs_visitor *v)
break;
case nir_intrinsic_load_sample_pos:
case nir_intrinsic_load_sample_pos_or_center:
assert(v->stage == MESA_SHADER_FRAGMENT);
reg = &v->nir_system_values[SYSTEM_VALUE_SAMPLE_POS];
if (reg->file == BAD_FILE)
@@ -3444,7 +3445,8 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
emit_frontfacing_interpolation());
break;
case nir_intrinsic_load_sample_pos: {
case nir_intrinsic_load_sample_pos:
case nir_intrinsic_load_sample_pos_or_center: {
fs_reg sample_pos = nir_system_values[SYSTEM_VALUE_SAMPLE_POS];
assert(sample_pos.file != BAD_FILE);
dest.type = sample_pos.type;