commit | bf51b11c04fcf9c5f2f86c74ca53ec2ae3fcf4d6 | [log] [tgz] |
---|---|---|
author | Tony Wasserka <tony.wasserka@gmx.de> | Mon Oct 12 19:05:14 2020 +0200 |
committer | Marge Bot <eric+marge@anholt.net> | Wed Oct 14 16:22:51 2020 +0000 |
tree | d552a9306c951ca5673338e5ca42e2365be66b11 | |
parent | f29c81f863c9879a6a87724cbdae1e1818f3f6b4 [diff] |
aco/isel: Always export position data from VS/NGG AMD ISA docs explicitly require this for VS, and this likely extends to NGG too. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3615 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7102>
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 0ebb753..54bf8b4 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -10203,6 +10203,11 @@ ctx->outputs.temps[VARYING_SLOT_LAYER * 4u] = as_vgpr(ctx, get_arg(ctx, ctx->args->ac.view_index)); } + /* Hardware requires position data to always be exported, even if the + * application did not write gl_Position. + */ + ctx->outputs.mask[VARYING_SLOT_POS] = 0xf; + /* the order these position exports are created is important */ int next_pos = 0; bool exported_pos = export_vs_varying(ctx, VARYING_SLOT_POS, true, &next_pos);