mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 05:00:19 +01:00
radv: fix divide by zero with no tesselation params
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7878>
(cherry picked from commit e3f56601e0)
This commit is contained in:
parent
918c550950
commit
c8245aebb5
2 changed files with 5 additions and 3 deletions
|
|
@ -40,7 +40,7 @@
|
|||
"description": "radv: fix divide by zero with no tesselation params",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -573,9 +573,11 @@ get_tcs_num_patches(unsigned tcs_num_input_vertices,
|
|||
if (chip_class >= GFX7 && family != CHIP_STONEY)
|
||||
hardware_lds_size = 65536;
|
||||
|
||||
num_patches = MIN2(num_patches, hardware_lds_size / (input_patch_size + output_patch_size));
|
||||
if (input_patch_size + output_patch_size)
|
||||
num_patches = MIN2(num_patches, hardware_lds_size / (input_patch_size + output_patch_size));
|
||||
/* Make sure the output data fits in the offchip buffer */
|
||||
num_patches = MIN2(num_patches, (tess_offchip_block_dw_size * 4) / output_patch_size);
|
||||
if (output_patch_size)
|
||||
num_patches = MIN2(num_patches, (tess_offchip_block_dw_size * 4) / output_patch_size);
|
||||
/* Not necessary for correctness, but improves performance. The
|
||||
* specific value is taken from the proprietary driver.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue