summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Wasserka <tony.wasserka@gmx.de>2020-10-12 19:05:14 +0200
committerEric Engestrom <eric@engestrom.ch>2020-10-14 19:29:35 +0200
commit830dc7c72222c16fcf1e3d11f89eecd07c610eb2 (patch)
treec248eafd89a5eadb2d6cf14ad2c26f45e5936ff2
parent8e6aa247c197e518b84ef85f16e103d51030f3fb (diff)
downloadmesa-830dc7c72222c16fcf1e3d11f89eecd07c610eb2.tar.gz
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> (cherry picked from commit bf51b11c04fcf9c5f2f86c74ca53ec2ae3fcf4d6)
-rw-r--r--.pick_status.json2
-rw-r--r--src/amd/compiler/aco_instruction_selection.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 67d7c21919c..e842296330d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -67,7 +67,7 @@
"description": "aco/isel: Always export position data from VS/NGG",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 72fb92f1f06..64ae07f459e 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -9764,6 +9764,11 @@ static void create_vs_exports(isel_context *ctx)
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);