radv: don't export NULL layer.
authorDave Airlie <airlied@redhat.com>
Mon, 19 Mar 2018 20:02:58 +0000 (20:02 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 19 Mar 2018 21:36:48 +0000 (21:36 +0000)
commit32791a05024d54736eab21379e849480fea78559
treecad531d5f8a9b9c99163939601df6b8942d230e0
parentf674b50d0ead3fc3f67e2579f2854dae991e9b78
radv: don't export NULL layer.

We have some cases where in subpass we want the layer but having
it be 0 and loaded in the frag shader without the vertex shader
exporting it is fine.

So don't export the layer if we don't have a value to put in it.

Fixes: d4c74aed7a8 (radv/multiview: mark layer_input if we have input attachments.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_nir_to_llvm.c