radv: Use 16-bits to store push constant indices.
Otherwise things horrible go wrong when we get 256 bytes of push constants. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14485>
This commit is contained in:

committed by
Marge Bot

parent
3a36d0b787
commit
43f8e07765
@@ -231,8 +231,8 @@ struct gfx10_ngg_info {
|
||||
struct radv_shader_info {
|
||||
bool loads_push_constants;
|
||||
bool loads_dynamic_offsets;
|
||||
uint8_t min_push_constant_used;
|
||||
uint8_t max_push_constant_used;
|
||||
uint16_t min_push_constant_used;
|
||||
uint16_t max_push_constant_used;
|
||||
bool has_only_32bit_push_constants;
|
||||
bool has_indirect_push_constants;
|
||||
uint32_t desc_set_used_mask;
|
||||
|
@@ -155,7 +155,7 @@ allocate_inline_push_consts(const struct radv_shader_info *info,
|
||||
uint8_t remaining_sgprs = user_sgpr_info->remaining_sgprs;
|
||||
|
||||
/* Only supported if shaders use push constants. */
|
||||
if (info->min_push_constant_used == UINT8_MAX)
|
||||
if (info->min_push_constant_used == UINT16_MAX)
|
||||
return;
|
||||
|
||||
/* Only supported if shaders don't have indirect push constants. */
|
||||
|
@@ -619,7 +619,7 @@ void
|
||||
radv_nir_shader_info_init(struct radv_shader_info *info)
|
||||
{
|
||||
/* Assume that shaders only have 32-bit push constants by default. */
|
||||
info->min_push_constant_used = UINT8_MAX;
|
||||
info->min_push_constant_used = UINT16_MAX;
|
||||
info->has_only_32bit_push_constants = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user