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

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Mon Oct 28 14:41:13 2019 +0100

radv: declare NGG scratch for VS or TES and only on GFX10

Do not need to declare it for other stages because this is for
streamout.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>

---

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

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
b/src/amd/vulkan/radv_nir_to_llvm.c
index 85b452719f0..b1168b941b9 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -4822,11 +4822,9 @@ LLVMModuleRef ac_translate_nir_to_llvm(struct 
ac_llvm_compiler *ac_llvm,
            shaders[shader_count - 1]->info.stage == MESA_SHADER_TESS_CTRL)
                ac_nir_fixup_ls_hs_input_vgprs(&ctx);
 
-       if (shaders[shader_count - 1]->info.stage != MESA_SHADER_GEOMETRY &&
-           (ctx.options->key.vs_common_out.as_ngg &&
-            !ctx.options->key.vs_common_out.as_es)) {
-               /* Unconditionally declare scratch space base for streamout and
-                * vertex compaction. Whether space is actually allocated is
+       if (is_ngg) {
+               /* Declare scratch space base for streamout and vertex
+                * compaction. Whether space is actually allocated is
                 * determined during linking / PM4 creation.
                 *
                 * Add an extra dword per vertex to ensure an odd stride, which

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to