radv: declare NGG scratch for VS or TES and only on GFX10
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 28 Oct 2019 13:41:13 +0000 (14:41 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 31 Oct 2019 06:51:01 +0000 (06:51 +0000)
Do not need to declare it for other stages because this is for
streamout.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_nir_to_llvm.c

index 85b452719f0966a68d47f037b8795d3a0eaa7319..b1168b941b96686da541a029b164e99faffa9b8d 100644 (file)
@@ -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