diff options
author | Dave Airlie <[email protected]> | 2017-03-30 08:26:28 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-04-01 07:16:37 +1000 |
commit | 5ab1289b485b660fbf21cddae9e28d0358072a70 (patch) | |
tree | e8264bf11f7ac856d2dc1a893a1fd9536f3f74c6 /src/amd | |
parent | 326b9bc6dc43b1fe58ee95ad0022c1005cb756ea (diff) |
radv/ac: add clip support for tess eval shader.
As this may be the last shader to emit clip distances.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 1666de4081b..32f5f6564dc 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4320,6 +4320,7 @@ handle_shader_output_decl(struct nir_to_llvm_context *ctx, mask_attribs = ((1ull << attrib_count) - 1) << idx; if (ctx->stage == MESA_SHADER_VERTEX || + ctx->stage == MESA_SHADER_TESS_EVAL || ctx->stage == MESA_SHADER_GEOMETRY) { if (idx == VARYING_SLOT_CLIP_DIST0) { int length = ctx->num_output_clips + ctx->num_output_culls; @@ -4327,6 +4328,10 @@ handle_shader_output_decl(struct nir_to_llvm_context *ctx, ctx->shader_info->vs.outinfo.clip_dist_mask = (1 << ctx->num_output_clips) - 1; ctx->shader_info->vs.outinfo.cull_dist_mask = (1 << ctx->num_output_culls) - 1; } + if (ctx->stage == MESA_SHADER_TESS_EVAL) { + ctx->shader_info->tes.outinfo.clip_dist_mask = (1 << ctx->num_output_clips) - 1; + ctx->shader_info->tes.outinfo.cull_dist_mask = (1 << ctx->num_output_culls) - 1; + } if (length > 4) attrib_count = 2; |