aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-10-31 11:16:24 +0100
committerSamuel Pitoiset <[email protected]>2019-11-06 09:20:36 +0100
commitda6c30f9f606541e37dbee11d048732ae2335e6a (patch)
treee282594506e7fe28ecea4ef9c423e4bb1553bc3c /src
parentd3f9957de4f2e1ba5a935caedbcc52222ab2087f (diff)
radv: rely on shader's wavesize when computing NGG info
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_pipeline.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index b239f024cbe..533e8c4b0fe 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1779,9 +1779,18 @@ gfx10_get_ngg_info(const struct radv_pipeline_key *key,
/* Round up towards full wave sizes for better ALU utilization. */
if (!max_vert_out_per_gs_instance) {
- const unsigned wavesize = pipeline->device->physical_device->ge_wave_size;
unsigned orig_max_esverts;
unsigned orig_max_gsprims;
+ unsigned wavesize;
+
+ if (gs_type == MESA_SHADER_GEOMETRY) {
+ wavesize = gs_info->wave_size;
+ } else {
+ wavesize = nir[MESA_SHADER_TESS_CTRL]
+ ? infos[MESA_SHADER_TESS_EVAL].wave_size
+ : infos[MESA_SHADER_VERTEX].wave_size;
+ }
+
do {
orig_max_esverts = max_esverts;
orig_max_gsprims = max_gsprims;