diff options
author | James Legg <[email protected]> | 2017-03-16 17:48:13 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-03-17 17:08:26 +0000 |
commit | 06bdbe9f89fcbc1f59612da5658ff492ddb2c62a (patch) | |
tree | ca841f98e73d58b4a6da1310326e67307203de25 /src/amd | |
parent | 74c39635b8a9341c2607c11373fac590eca0f689 (diff) |
radv: Fix using more than 4 bound descriptor sets
Avoid a buffer overflow in ac_nir_to_llvm.c's create_function when
using more than 4 descriptor sets. radv claims support for 8.
Cc: 17.0 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
(cherry picked from commit e88cac1df03d01a9e8a1de1a4a2ee888149e727a)
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h index a57558e38ff..2fc3efd4090 100644 --- a/src/amd/common/ac_nir_to_llvm.h +++ b/src/amd/common/ac_nir_to_llvm.h @@ -27,6 +27,7 @@ #include "llvm-c/Core.h" #include "llvm-c/TargetMachine.h" #include "amd_family.h" +#include "../vulkan/radv_descriptor_set.h" struct ac_shader_binary; struct ac_shader_config; @@ -76,7 +77,8 @@ enum ac_ud_index { AC_UD_MAX_UD = AC_UD_VS_MAX_UD, }; -#define AC_UD_MAX_SETS 4 +// Match MAX_SETS from radv_descriptor_set.h +#define AC_UD_MAX_SETS MAX_SETS struct ac_userdata_locations { struct ac_userdata_info descriptor_sets[AC_UD_MAX_SETS]; |