gallivm: add mask api to force mask

For per-sample shading the mask needs to be forced for each
iteration of the fragment shader.

Just adds the API for now.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
This commit is contained in:
Dave Airlie 2020-03-19 14:10:31 +10:00 committed by Marge Bot
parent d89499063b
commit 28cc2ed79c
2 changed files with 14 additions and 0 deletions

View File

@ -200,6 +200,16 @@ lp_build_mask_update(struct lp_build_mask_context *mask,
LLVMBuildStore(mask->skip.gallivm->builder, value, mask->var);
}
/*
* Update boolean mask with given value.
* Used for per-sample shading to force per-sample execution masks.
*/
void
lp_build_mask_force(struct lp_build_mask_context *mask,
LLVMValueRef value)
{
LLVMBuildStore(mask->skip.gallivm->builder, value, mask->var);
}
/**
* End section of code which is predicated on a mask.

View File

@ -94,6 +94,10 @@ void
lp_build_mask_update(struct lp_build_mask_context *mask,
LLVMValueRef value);
void
lp_build_mask_force(struct lp_build_mask_context *mask,
LLVMValueRef value);
void
lp_build_mask_check(struct lp_build_mask_context *mask);