intel/fs: Fix IsHelperInvocation for the case no discard/demote are used
Use emit_predicate_on_sample_mask() helper that does check where to
get the correct mask depending on whether discard/demote was used or
not.
Fixes: 45f5db5a84 ("intel/fs: Implement "demote to helper invocation"")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15400>
This commit is contained in:
@@ -3458,22 +3458,9 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
|
||||
bld.MOV(dest, fetch_render_target_array_index(bld));
|
||||
break;
|
||||
|
||||
case nir_intrinsic_is_helper_invocation: {
|
||||
/* Unlike the regular gl_HelperInvocation, that is defined at dispatch,
|
||||
* the helperInvocationEXT() (aka SpvOpIsHelperInvocationEXT) takes into
|
||||
* consideration demoted invocations. That information is stored in
|
||||
* f0.1.
|
||||
*/
|
||||
dest.type = BRW_REGISTER_TYPE_UD;
|
||||
|
||||
bld.MOV(dest, brw_imm_ud(0));
|
||||
|
||||
fs_inst *mov = bld.MOV(dest, brw_imm_ud(~0));
|
||||
mov->predicate = BRW_PREDICATE_NORMAL;
|
||||
mov->predicate_inverse = true;
|
||||
mov->flag_subreg = sample_mask_flag_subreg(this);
|
||||
case nir_intrinsic_is_helper_invocation:
|
||||
emit_is_helper_invocation(dest);
|
||||
break;
|
||||
}
|
||||
|
||||
case nir_intrinsic_load_helper_invocation:
|
||||
case nir_intrinsic_load_sample_mask_in:
|
||||
|
||||
Reference in New Issue
Block a user