diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-05-03 19:52:12 +0200 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-05-04 10:38:14 +1000 |
commit | 33ad6226a056e727eb44aba3126ceed6e889dc7b (patch) | |
tree | 4076d018f4570885b9006157602119a0b3444950 /src | |
parent | 91ab1ccbfeec9ac0a068cadc858a9e1d61d10aee (diff) |
radv: Don't use FLAT_SHADE for constants.
Setting both offset to 0x20 and flat shade results in passthrough
mode instead of the constant.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Fixes: f205e19e4f8 "radv/ac: eliminate unused vertex shader outputs. (v2)"
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index f3cba198e46..2992df6ed43 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1886,9 +1886,11 @@ static void calculate_pa_cl_vs_out_cntl(struct radv_pipeline *pipeline) static uint32_t offset_to_ps_input(uint32_t offset, bool flat_shade) { uint32_t ps_input_cntl; - if (offset <= AC_EXP_PARAM_OFFSET_31) + if (offset <= AC_EXP_PARAM_OFFSET_31) { ps_input_cntl = S_028644_OFFSET(offset); - else { + if (flat_shade) + ps_input_cntl |= S_028644_FLAT_SHADE(1); + } else { /* The input is a DEFAULT_VAL constant. */ assert(offset >= AC_EXP_PARAM_DEFAULT_VAL_0000 && offset <= AC_EXP_PARAM_DEFAULT_VAL_1111); @@ -1896,8 +1898,6 @@ static uint32_t offset_to_ps_input(uint32_t offset, bool flat_shade) ps_input_cntl = S_028644_OFFSET(0x20) | S_028644_DEFAULT_VAL(offset); } - if (flat_shade) - ps_input_cntl |= S_028644_FLAT_SHADE(1); return ps_input_cntl; } |