radv/gfx10: fix VS input VGPRs with the legacy path

Submitted by Samuel Pitoiset on July 23, 2019, 11:33 a.m.

Details

Message ID 20190723113320.20346-1-samuel.pitoiset@gmail.com
State New
Headers show
Series "radv/gfx10: fix VS input VGPRs with the legacy path" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset July 23, 2019, 11:33 a.m.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/vulkan/radv_nir_to_llvm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index 336bae28614..9cea92e8a69 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -851,7 +851,8 @@  declare_vs_input_vgprs(struct radv_shader_context *ctx, struct arg_info *args)
 				add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* unused */
 			}
 		} else {
-			if (ctx->ac.chip_class >= GFX10) {
+			if (ctx->ac.chip_class >= GFX10 &&
+			    ctx->options->key.vs_common_out.as_ngg) {
 				add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* user vgpr */
 				add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* user vgpr */
 				add_arg(args, ARG_VGPR, ctx->ac.i32, &ctx->abi.instance_id);

Comments

So does this work with tests that use multiple instances?

If so, r-b.

On Tue, Jul 23, 2019 at 1:29 PM Samuel Pitoiset
<samuel.pitoiset@gmail.com> wrote:
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> ---
>  src/amd/vulkan/radv_nir_to_llvm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
> index 336bae28614..9cea92e8a69 100644
> --- a/src/amd/vulkan/radv_nir_to_llvm.c
> +++ b/src/amd/vulkan/radv_nir_to_llvm.c
> @@ -851,7 +851,8 @@ declare_vs_input_vgprs(struct radv_shader_context *ctx, struct arg_info *args)
>                                 add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* unused */
>                         }
>                 } else {
> -                       if (ctx->ac.chip_class >= GFX10) {
> +                       if (ctx->ac.chip_class >= GFX10 &&
> +                           ctx->options->key.vs_common_out.as_ngg) {
>                                 add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* user vgpr */
>                                 add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* user vgpr */
>                                 add_arg(args, ARG_VGPR, ctx->ac.i32, &ctx->abi.instance_id);
> --
> 2.22.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On 7/23/19 1:37 PM, Bas Nieuwenhuizen wrote:
> So does this work with tests that use multiple instances?
Apparently no.
>
> If so, r-b.
>
> On Tue, Jul 23, 2019 at 1:29 PM Samuel Pitoiset
> <samuel.pitoiset@gmail.com> wrote:
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
>> ---
>>   src/amd/vulkan/radv_nir_to_llvm.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
>> index 336bae28614..9cea92e8a69 100644
>> --- a/src/amd/vulkan/radv_nir_to_llvm.c
>> +++ b/src/amd/vulkan/radv_nir_to_llvm.c
>> @@ -851,7 +851,8 @@ declare_vs_input_vgprs(struct radv_shader_context *ctx, struct arg_info *args)
>>                                  add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* unused */
>>                          }
>>                  } else {
>> -                       if (ctx->ac.chip_class >= GFX10) {
>> +                       if (ctx->ac.chip_class >= GFX10 &&
>> +                           ctx->options->key.vs_common_out.as_ngg) {
>>                                  add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* user vgpr */
>>                                  add_arg(args, ARG_VGPR, ctx->ac.i32, NULL); /* user vgpr */
>>                                  add_arg(args, ARG_VGPR, ctx->ac.i32, &ctx->abi.instance_id);
>> --
>> 2.22.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev