Mesa (master): radv/gfx10: account for the subpass view for the NGG GS storage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 6 15:29:45 UTC 2019


Module: Mesa
Branch: master
Commit: b1a872f0c0f03abfeb63773b509d633bb4879d24
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1a872f0c0f03abfeb63773b509d633bb4879d24

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Sep  6 10:32:13 2019 +0200

radv/gfx10: account for the subpass view for the NGG GS storage

If the fragment shader needs the layer index, we have to allocate
one more dword in the NGG GS storage. Found by inspection. This
doesn't fix anything known.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_nir_to_llvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index 92fcec9015a..10cc82eb8d9 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2981,6 +2981,9 @@ ngg_gs_get_vertex_storage(struct radv_shader_context *ctx)
 {
 	unsigned num_outputs = util_bitcount64(ctx->output_mask);
 
+	if (ctx->options->key.has_multiview_view_index)
+		num_outputs++;
+
 	LLVMTypeRef elements[2] = {
 		LLVMArrayType(ctx->ac.i32, 4 * num_outputs),
 		LLVMArrayType(ctx->ac.i8, 4),




More information about the mesa-commit mailing list