[Mesa-dev] [PATCH 2/2] radv: improve a comment in si_emit_set_predication_state()
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Sep 13 21:28:15 UTC 2018
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
for the series.
On Wed, Sep 12, 2018 at 11:19 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/si_cmd_buffer.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
> index 435878c372..1464c913cd 100644
> --- a/src/amd/vulkan/si_cmd_buffer.c
> +++ b/src/amd/vulkan/si_cmd_buffer.c
> @@ -1004,21 +1004,19 @@ si_emit_cache_flush(struct radv_cmd_buffer *cmd_buffer)
> /* sets the CP predication state using a boolean stored at va */
> void
> si_emit_set_predication_state(struct radv_cmd_buffer *cmd_buffer,
> - bool inverted, uint64_t va)
> + bool draw_visible, uint64_t va)
> {
> uint32_t op = 0;
>
> if (va) {
> op = PRED_OP(PREDICATION_OP_BOOL64);
>
> - /* By default, our internal rendering commands are discarded
> - * only if the predicate is non-zero (ie. DRAW_VISIBLE). But
> - * VK_EXT_conditional_rendering also allows to discard commands
> - * when the predicate is zero, which means we have to use a
> - * different flag.
> + /* PREDICATION_DRAW_VISIBLE means that if the 32-bit value is
> + * zero, all rendering commands are discarded. Otherwise, they
> + * are discarded if the value is non zero.
> */
> - op |= inverted ? PREDICATION_DRAW_VISIBLE :
> - PREDICATION_DRAW_NOT_VISIBLE;
> + op |= draw_visible ? PREDICATION_DRAW_VISIBLE :
> + PREDICATION_DRAW_NOT_VISIBLE;
> }
> if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9) {
> radeon_emit(cmd_buffer->cs, PKT3(PKT3_SET_PREDICATION, 2, 0));
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list