lavapipe: add input attachment support for multiview
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>
This commit is contained in:
@@ -70,9 +70,9 @@ try_lower_input_load(nir_function_impl *impl, nir_intrinsic_instr *load,
|
||||
nir_ssa_def *offset = nir_ssa_for_src(&b, load->src[1], 2);
|
||||
nir_ssa_def *pos = nir_iadd(&b, frag_coord, offset);
|
||||
|
||||
nir_ssa_def *layer = nir_imm_int(&b, 0);
|
||||
nir_ssa_def *layer = nir_load_view_index(&b);
|
||||
nir_ssa_def *coord =
|
||||
nir_vec4(&b, nir_channel(&b, pos, 0), nir_channel(&b, pos, 1), layer, layer);
|
||||
nir_vec4(&b, nir_channel(&b, pos, 0), nir_channel(&b, pos, 1), layer, nir_imm_int(&b, 0));
|
||||
|
||||
nir_instr_rewrite_src(&load->instr, &load->src[1], nir_src_for_ssa(coord));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user