aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-07-16 08:37:32 +0200
committerSamuel Pitoiset <[email protected]>2019-07-16 10:09:37 +0200
commit1b2bfeaaaacbc8a0fbab1e7221d1f2e0ae2a7017 (patch)
tree209da92aef72b8e7ea0fc8d19b83fd4754191047
parent361d549f8762e36bca787ec7ec237f7827b0a4a5 (diff)
radv: fix gathering clip/cull distance masks for GS
For NGG, the driver relies on the VS outinfo struct. This fixes dEQP-VK.clipping.user_defined.clip_*_vert_tess_geom_* Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r--src/amd/vulkan/radv_nir_to_llvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index 7573292f5c8..aa50b91d8c0 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2407,6 +2407,11 @@ scan_shader_output_decl(struct radv_shader_context *ctx,
ctx->shader_info->tes.outinfo.cull_dist_mask = (1 << shader->info.cull_distance_array_size) - 1;
ctx->shader_info->tes.outinfo.cull_dist_mask <<= shader->info.clip_distance_array_size;
}
+ if (stage == MESA_SHADER_GEOMETRY) {
+ ctx->shader_info->vs.outinfo.clip_dist_mask = (1 << shader->info.clip_distance_array_size) - 1;
+ ctx->shader_info->vs.outinfo.cull_dist_mask = (1 << shader->info.cull_distance_array_size) - 1;
+ ctx->shader_info->vs.outinfo.cull_dist_mask <<= shader->info.clip_distance_array_size;
+ }
}
}