<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Aug 24, 2017 10:17 AM, "Nicolai Hähnle" <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On 23.08.2017 22:44, Marek Olšák wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>><br>
<br>
---<br>
src/gallium/drivers/radeonsi/s<wbr>i_shader.c | 17 ++++++++++++++++-<br>
1 file changed, 16 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/gallium/drivers/radeonsi<wbr>/si_shader.c b/src/gallium/drivers/radeonsi<wbr>/si_shader.c<br>
index f02fc9e..186a3dd 100644<br>
--- a/src/gallium/drivers/radeonsi<wbr>/si_shader.c<br>
+++ b/src/gallium/drivers/radeonsi<wbr>/si_shader.c<br>
@@ -5029,21 +5029,36 @@ static void si_shader_dump_stats(struct si_screen *sscreen,<br>
struct pipe_debug_callback *debug,<br>
unsigned processor,<br>
FILE *file,<br>
bool check_debug_option)<br>
{<br>
const struct si_shader_config *conf = &shader->config;<br>
unsigned num_inputs = shader->selector ? shader->selector->info.num_inp<wbr>uts : 0;<br>
unsigned code_size = si_get_shader_binary_size(shad<wbr>er);<br>
unsigned lds_increment = sscreen->b.chip_class >= CIK ? 512 : 256;<br>
unsigned lds_per_wave = 0;<br>
- unsigned max_simd_waves = 10;<br>
+ unsigned max_simd_waves;<br>
+<br>
+ switch (sscreen->b.family) {<br>
+ /* SGPR initialization bug workaround on Tonga and Iceland reduces<br>
+ * the wave count to 8. */<br>
+ case CHIP_TONGA:<br>
+ case CHIP_ICELAND:<br>
+ /* These always have 8 waves: */<br>
+ case CHIP_POLARIS10:<br>
+ case CHIP_POLARIS11:<br>
+ case CHIP_POLARIS12:<br>
+ max_simd_waves = 8;<br>
</blockquote>
<br></div>
This should be implied by the num_sgprs set by LLVM, though.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I have no idea what you mean or why it's relevant.</div><div dir="auto"><br></div><div dir="auto">Marek</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Nicolai<div class="quoted-text"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ break;<br>
+ default:<br>
+ max_simd_waves = 10;<br>
+ }<br>
/* Compute LDS usage for PS. */<br>
switch (processor) {<br>
case PIPE_SHADER_FRAGMENT:<br>
/* The minimum usage per wave is (num_inputs * 48). The maximum<br>
* usage is (num_inputs * 48 * 16).<br>
* We can get anything in between and it varies between waves.<br>
*<br>
* The 48 bytes per input for a single primitive is equal to<br>
* 4 bytes/component * 4 components/input * 3 points.<br>
<br>
</blockquote>
<br>
<br>
-- <br></div>
Lerne, wie die Welt wirklich ist,<br>
Aber vergiss niemals, wie sie sein sollte.<br>
</blockquote></div><br></div></div></div>