I don't think this is the right approach as we shouldn't be getting 0
in the first place. At least for LDS the output size shoudl be at
least 2 as we load the inner & outer tess factors while writing them
to the tessellation factor ring.

We could just do
num_tcs_patch_outputs = MAX2(num_tcs_patch_outputs, 2);

but I am curious what the CTS expects, as I suspect we are essentially
writing bogus tess factors.

 - Bas

On Fri, May 27, 2016 at 8:21 AM, Dave Airlie <[email protected]> wrote:
> From: Dave Airlie <[email protected]>
>
> The CTS test:
> GL45-CTS.shader_image_load_store.multiple-uniforms
> regressed recently with the new offchip support.
>
> Signed-off-by: Dave Airlie <[email protected]>
> ---
>  src/gallium/drivers/radeonsi/si_state_draw.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c 
> b/src/gallium/drivers/radeonsi/si_state_draw.c
> index 788869e..bff2a26 100644
> --- a/src/gallium/drivers/radeonsi/si_state_draw.c
> +++ b/src/gallium/drivers/radeonsi/si_state_draw.c
> @@ -143,12 +143,14 @@ static void si_emit_derived_tess_state(struct 
> si_context *sctx,
>          * use LDS for the inputs and outputs.
>          */
>         hardware_lds_size = sctx->b.chip_class >= CIK ? 65536 : 32768;
> -       *num_patches = MIN2(*num_patches, hardware_lds_size / 
> (input_patch_size +
> -                                                              
> output_patch_size));
> +       if (input_patch_size || output_patch_size)
> +               *num_patches = MIN2(*num_patches, hardware_lds_size / 
> (input_patch_size +
> +                                                                     
> output_patch_size));
>
>         /* Make sure the output data fits in the offchip buffer */
> -       *num_patches = MIN2(*num_patches, SI_TESS_OFFCHIP_BLOCK_SIZE /
> -                                         output_patch_size);
> +       if (output_patch_size)
> +               *num_patches = MIN2(*num_patches, SI_TESS_OFFCHIP_BLOCK_SIZE /
> +                                                  output_patch_size);
>
>         /* Not necessary for correctness, but improves performance. The
>          * specific value is taken from the proprietary driver.
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to