summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2016-05-05 22:25:01 +0200
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2016-05-06 21:40:17 +0200
commit6291f19f71d660b82cc16ca6af9da66f8fa33956 (patch)
treefdf3d4cb56d626f387bf36067daa871f28878f1f
parenta1f698881e13a4993e958815b79f8150d48e2739 (diff)
radeonsi: Compute correct LDS size for fragment shaders.
No sure where the 36 came from, but we clearly need at least 48 bytes per attribute per primitive. Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 49c498da61..211db9f6f2 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -5640,15 +5640,18 @@ static void si_shader_dump_stats(struct si_screen *sscreen,
/* Compute LDS usage for PS. */
if (processor == PIPE_SHADER_FRAGMENT) {
- /* The minimum usage per wave is (num_inputs * 36). The maximum
- * usage is (num_inputs * 36 * 16).
+ /* 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.
+ *
* Other stages don't know the size at compile time or don't
* allocate LDS per wave, but instead they do it per thread group.
*/
lds_per_wave = conf->lds_size * lds_increment +
- align(num_inputs * 36, lds_increment);
+ align(num_inputs * 48, lds_increment);
}
/* Compute the per-SIMD wave counts. */