mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
iris: Limit max_shader_buffer_size to INT32_MAX
GLSL arrays are sized by signed integers. Other places in the Mesa treat this value is int32_t. Having the value larger than (uint32_t)INT32_MAX causes assertion failures in many piglit tests. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Closes: #13873 Fixes:2f8b8649f0("iris: Increase max_shader_buffer_size to max_buffer_size") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37282> (cherry picked from commit1eb4a2f5cd)
This commit is contained in:
parent
8ec6872fe3
commit
838d3c13cc
2 changed files with 2 additions and 2 deletions
|
|
@ -5384,7 +5384,7 @@
|
|||
"description": "iris: Limit max_shader_buffer_size to INT32_MAX",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "2f8b8649f015720fd1ac08f779accbfb4701c074",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ iris_init_screen_caps(struct iris_screen *screen)
|
|||
caps->constant_buffer_offset_alignment = 32;
|
||||
caps->min_map_buffer_alignment = IRIS_MAP_BUFFER_ALIGNMENT;
|
||||
caps->shader_buffer_offset_alignment = 4;
|
||||
caps->max_shader_buffer_size = (unsigned)MIN2(screen->isl_dev.max_buffer_size, UINT32_MAX);
|
||||
caps->max_shader_buffer_size = (unsigned)MIN2(screen->isl_dev.max_buffer_size, INT32_MAX); // INT32_MAX is correct.
|
||||
caps->texture_buffer_offset_alignment = 16; // XXX: u_screen says 256 is the minimum value...
|
||||
caps->linear_image_pitch_alignment = 1;
|
||||
caps->linear_image_base_address_alignment = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue