summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-07-09 08:43:58 +0200
committerSamuel Pitoiset <[email protected]>2019-07-09 09:54:21 +0200
commitf240147cf71f0df4d0ea85c3797e6ac88e3dbc59 (patch)
tree96322efe302c8d6bbe09c34c4ed4e1cbecc8b16f
parent63e0675d986744a9ed2d9a15b7cba84ff4a24fc2 (diff)
radv: emit the geometry shader as NGG if enabled on GFX10
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r--src/amd/vulkan/radv_pipeline.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 419263c63b6..26406930b86 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3618,7 +3618,8 @@ static void
radv_pipeline_generate_geometry_shader(struct radeon_cmdbuf *ctx_cs,
struct radeon_cmdbuf *cs,
struct radv_pipeline *pipeline,
- const struct radv_gs_state *gs_state)
+ const struct radv_gs_state *gs_state,
+ const struct radv_ngg_state *ngg_state)
{
struct radv_shader_variant *gs;
@@ -3626,7 +3627,10 @@ radv_pipeline_generate_geometry_shader(struct radeon_cmdbuf *ctx_cs,
if (!gs)
return;
- radv_pipeline_generate_hw_gs(ctx_cs, cs, pipeline, gs, gs_state);
+ if (gs->info.is_ngg)
+ radv_pipeline_generate_hw_ngg(ctx_cs, cs, pipeline, gs, ngg_state);
+ else
+ radv_pipeline_generate_hw_gs(ctx_cs, cs, pipeline, gs, gs_state);
}
static uint32_t offset_to_ps_input(uint32_t offset, bool flat_shade, bool float16)
@@ -3949,7 +3953,7 @@ radv_pipeline_generate_pm4(struct radv_pipeline *pipeline,
radv_pipeline_generate_vgt_gs_mode(ctx_cs, pipeline);
radv_pipeline_generate_vertex_shader(ctx_cs, cs, pipeline, tess, ngg);
radv_pipeline_generate_tess_shaders(ctx_cs, cs, pipeline, tess, ngg);
- radv_pipeline_generate_geometry_shader(ctx_cs, cs, pipeline, gs);
+ radv_pipeline_generate_geometry_shader(ctx_cs, cs, pipeline, gs, ngg);
radv_pipeline_generate_fragment_shader(ctx_cs, cs, pipeline);
radv_pipeline_generate_ps_inputs(ctx_cs, pipeline);
radv_pipeline_generate_vgt_vertex_reuse(ctx_cs, pipeline);