mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
aco: Fix multiview view index for mesh shaders.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15034>
This commit is contained in:
parent
082b691141
commit
9cc9cf77a8
1 changed files with 9 additions and 2 deletions
|
|
@ -10747,8 +10747,8 @@ create_vs_exports(isel_context* ctx)
|
|||
get_arg(ctx, ctx->args->ac.vs_prim_id);
|
||||
}
|
||||
|
||||
if (ctx->options->key.has_multiview_view_index) {
|
||||
assert(!outinfo->writes_layer_per_primitive);
|
||||
if (ctx->options->key.has_multiview_view_index &&
|
||||
!outinfo->writes_layer_per_primitive) {
|
||||
ctx->outputs.mask[VARYING_SLOT_LAYER] |= 0x1;
|
||||
ctx->outputs.temps[VARYING_SLOT_LAYER * 4u] =
|
||||
as_vgpr(ctx, get_arg(ctx, ctx->args->ac.view_index));
|
||||
|
|
@ -10802,6 +10802,13 @@ create_primitive_exports(isel_context *ctx, Temp prim_ch1)
|
|||
|
||||
Builder bld(ctx->program, ctx->block);
|
||||
|
||||
if (ctx->options->key.has_multiview_view_index &&
|
||||
outinfo->writes_layer_per_primitive) {
|
||||
ctx->outputs.mask[VARYING_SLOT_LAYER] |= 0x1;
|
||||
ctx->outputs.temps[VARYING_SLOT_LAYER * 4u] =
|
||||
as_vgpr(ctx, get_arg(ctx, ctx->args->ac.view_index));
|
||||
}
|
||||
|
||||
/* Use zeroes if the shader doesn't write these but they are needed by eg. PS. */
|
||||
if (outinfo->writes_layer_per_primitive && !ctx->outputs.mask[VARYING_SLOT_LAYER])
|
||||
ctx->outputs.temps[VARYING_SLOT_LAYER * 4u] = bld.copy(bld.def(v1), Operand::c32(0));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue