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: d4c74aed7a
(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>
This commit is contained in:
parent
f674b50d0e
commit
32791a0502
|
@ -2363,7 +2363,7 @@ handle_vs_outputs_post(struct radv_shader_context *ctx,
|
||||||
outinfo->export_prim_id = true;
|
outinfo->export_prim_id = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (export_layer_id) {
|
if (export_layer_id && layer_value) {
|
||||||
LLVMValueRef values[4];
|
LLVMValueRef values[4];
|
||||||
|
|
||||||
values[0] = layer_value;
|
values[0] = layer_value;
|
||||||
|
|
Loading…
Reference in New Issue