[Mesa-dev] [PATCH v2 2/2] radeonsi/nir: set colors_read properly
Marek Olšák
maraeo at gmail.com
Tue Feb 19 23:09:17 UTC 2019
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Mon, Feb 11, 2019 at 7:15 PM Timothy Arceri <tarceri at itsqueeze.com>
wrote:
> shader-db results for VEGA64:
>
> Totals from affected shaders:
> SGPRS: 1976 -> 1976 (0.00 %)
> VGPRS: 1240 -> 1144 (-7.74 %)
> Spilled SGPRs: 145 -> 145 (0.00 %)
> Spilled VGPRs: 0 -> 0 (0.00 %)
> Private memory VGPRs: 0 -> 0 (0.00 %)
> Scratch size: 0 -> 0 (0.00 %) dwords per thread
> Code Size: 34632 -> 34604 (-0.08 %) bytes
> LDS: 0 -> 0 (0.00 %) blocks
> Max Waves: 261 -> 285 (9.20 %)
> Wait states: 0 -> 0 (0.00 %)
> ---
> src/gallium/drivers/radeonsi/si_shader_nir.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c
> b/src/gallium/drivers/radeonsi/si_shader_nir.c
> index 4eec57b406d..55a950a675c 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_nir.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
> @@ -74,9 +74,18 @@ static void gather_intrinsic_load_deref_info(const
> nir_shader *nir,
> }
> break;
> }
> - default:
> + default: {
> + unsigned semantic_name, semantic_index;
> + tgsi_get_gl_varying_semantic(var->data.location, true,
> + &semantic_name,
> &semantic_index);
> +
> + if (semantic_name == TGSI_SEMANTIC_COLOR) {
> + uint8_t mask =
> nir_ssa_def_components_read(&instr->dest.ssa);
> + info->colors_read |= mask << (semantic_index * 4);
> + }
> break;
> }
> + }
> }
>
> static void scan_instruction(const struct nir_shader *nir,
> --
> 2.20.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190219/a92b099a/attachment.html>
More information about the mesa-dev
mailing list