diff options
author | Dave Airlie <[email protected]> | 2017-06-20 13:59:33 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-06-26 08:45:14 +1000 |
commit | 4042892cee83cb04ca50908926d95215d7ab1d42 (patch) | |
tree | 994f0ba09bae9ade488901b3715ae2452a9817b5 /src/amd | |
parent | afb8f2d4a346041adf54d45729963a55a625ac1f (diff) |
radv: set use_prim_id for tess shaders correctly.
Just noticed in passing.
Reviewed-by: Kenneth Graunke <[email protected]>
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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 49117d21bd2..4d9c070dabe 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3869,11 +3869,13 @@ static void visit_intrinsic(struct nir_to_llvm_context *ctx, case nir_intrinsic_load_primitive_id: if (ctx->stage == MESA_SHADER_GEOMETRY) result = ctx->gs_prim_id; - else if (ctx->stage == MESA_SHADER_TESS_CTRL) + else if (ctx->stage == MESA_SHADER_TESS_CTRL) { + ctx->shader_info->tcs.uses_prim_id = true; result = ctx->tcs_patch_id; - else if (ctx->stage == MESA_SHADER_TESS_EVAL) + } else if (ctx->stage == MESA_SHADER_TESS_EVAL) { + ctx->shader_info->tcs.uses_prim_id = true; result = ctx->tes_patch_id; - else + } else fprintf(stderr, "Unknown primitive id intrinsic: %d", ctx->stage); break; case nir_intrinsic_load_sample_id: |