radv: fix computing number of user SGPRs for streamout buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 23 Jan 2019 09:29:11 +0000 (10:29 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 25 Jan 2019 14:36:16 +0000 (15:36 +0100)
Streamout buffers are emitted like push constants.

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 40812fa7ffb2336591873f9847dfe3e8b9c19e97..7f1aa17b0d5cc3dba9ead5089f28f87849757750 100644 (file)
@@ -701,6 +701,9 @@ static void allocate_user_sgprs(struct radv_shader_context *ctx,
        if (ctx->shader_info->info.loads_push_constants)
                user_sgpr_count++;
 
+       if (ctx->streamout_buffers)
+               user_sgpr_count++;
+
        uint32_t available_sgprs = ctx->options->chip_class >= GFX9 && stage != MESA_SHADER_COMPUTE ? 32 : 16;
        uint32_t remaining_sgprs = available_sgprs - user_sgpr_count;
        uint32_t num_desc_set =