On Aug 24, 2017 10:17 AM, "Nicolai Hähnle" <nhaeh...@gmail.com> wrote:
On 23.08.2017 22:44, Marek Olšák wrote: > From: Marek Olšák <marek.ol...@amd.com> > > --- > src/gallium/drivers/radeonsi/si_shader.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/radeonsi/si_shader.c > b/src/gallium/drivers/radeonsi/si_shader.c > index f02fc9e..186a3dd 100644 > --- a/src/gallium/drivers/radeonsi/si_shader.c > +++ b/src/gallium/drivers/radeonsi/si_shader.c > @@ -5029,21 +5029,36 @@ static void si_shader_dump_stats(struct si_screen > *sscreen, > struct pipe_debug_callback *debug, > unsigned processor, > FILE *file, > bool check_debug_option) > { > const struct si_shader_config *conf = &shader->config; > unsigned num_inputs = shader->selector ? > shader->selector->info.num_inputs : 0; > unsigned code_size = si_get_shader_binary_size(shader); > unsigned lds_increment = sscreen->b.chip_class >= CIK ? 512 : 256; > unsigned lds_per_wave = 0; > - unsigned max_simd_waves = 10; > + unsigned max_simd_waves; > + > + switch (sscreen->b.family) { > + /* SGPR initialization bug workaround on Tonga and Iceland reduces > + * the wave count to 8. */ > + case CHIP_TONGA: > + case CHIP_ICELAND: > + /* These always have 8 waves: */ > + case CHIP_POLARIS10: > + case CHIP_POLARIS11: > + case CHIP_POLARIS12: > + max_simd_waves = 8; > This should be implied by the num_sgprs set by LLVM, though. I have no idea what you mean or why it's relevant. Marek Cheers, Nicolai + break; > + default: > + max_simd_waves = 10; > + } > /* Compute LDS usage for PS. */ > switch (processor) { > case PIPE_SHADER_FRAGMENT: > /* The minimum usage per wave is (num_inputs * 48). The > maximum > * usage is (num_inputs * 48 * 16). > * We can get anything in between and it varies between > waves. > * > * The 48 bytes per input for a single primitive is equal > to > * 4 bytes/component * 4 components/input * 3 points. > > -- Lerne, wie die Welt wirklich ist, Aber vergiss niemals, wie sie sein sollte.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev