summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-08-18 00:32:41 +0200
committerBas Nieuwenhuizen <[email protected]>2017-08-24 19:20:47 +0200
commit64164a1313fcdf1084b0f8a9499165ee22a13aa7 (patch)
tree53545da2e045ee03804e74ea60dcf2979016d9d9 /src/amd/vulkan
parent3d5f29f5f9217149cbeb3022f6bd2004bf98f30a (diff)
radv: Use 0 for the layer id if the vertex shader does not export it.
To use when we have e.g. input attachments, but there is no layer export in the previous shader and hence no layered rendering. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_pipeline.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 23b9e72f92a..477abfe4915 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2119,10 +2119,11 @@ static void calculate_ps_inputs(struct radv_pipeline *pipeline)
if (ps->info.fs.layer_input) {
unsigned vs_offset = outinfo->vs_output_param_offset[VARYING_SLOT_LAYER];
- if (vs_offset != AC_EXP_PARAM_UNDEFINED) {
+ if (vs_offset != AC_EXP_PARAM_UNDEFINED)
pipeline->graphics.ps_input_cntl[ps_offset] = offset_to_ps_input(vs_offset, true);
- ++ps_offset;
- }
+ else
+ pipeline->graphics.ps_input_cntl[ps_offset] = offset_to_ps_input(AC_EXP_PARAM_DEFAULT_VAL_0000, true);
+ ++ps_offset;
}
if (ps->info.fs.has_pcoord) {