[Mesa-dev] [PATCH] radeonsi/nir: add FRAG_RESULT_COLOR to scan pass

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Feb 9 13:07:05 UTC 2018



On 02/09/2018 10:49 AM, Timothy Arceri wrote:
> Fixes a numer of draw buffers piglit tests.

number

> ---
>   src/gallium/drivers/radeonsi/si_shader_nir.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
> index 4eda3f3c18..d42ed5edcc 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_nir.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
> @@ -517,6 +517,12 @@ void si_nir_scan_shader(const struct nir_shader *nir,
>   				info->reads_pervertex_outputs = true;
>   			}
>   		}
> +
> +		unsigned loc = variable->data.location;
> +		if (loc == FRAG_RESULT_COLOR &&
> +		    nir->info.outputs_written & ((uint64_t)1 << loc)) {

1ull?

With that,

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

> +			info->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] = true;
> +		}
>   	}
>   
>   	info->num_outputs = num_outputs;
> 


More information about the mesa-dev mailing list