Module: Mesa Branch: master Commit: 81ff38947a4556d693abaf162394ed77b7608eed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=81ff38947a4556d693abaf162394ed77b7608eed
Author: Duncan Hopkins <[email protected]> Date: Tue Apr 9 17:22:53 2019 +0100 zink: clamped maxPerStageDescriptorUniformBuffers limits to INT_MAX when stored as uint32_t. This stops issues if a driver returns a value that is greater than a signed int. Also make it match many of the other limit versions conversions. Seen on Radeon drivers, IIRC. gpuinfo.org also reports many GPUs returning 4GB values. Reviewed-By: Mike Blumenkrantz <[email protected]> Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7402> --- src/gallium/drivers/zink/zink_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index ec2f9000f22..144aa33df5a 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -447,7 +447,7 @@ zink_get_shader_param(struct pipe_screen *pscreen, return 65536; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: - return screen->info.props.limits.maxPerStageDescriptorUniformBuffers; + return MIN2(screen->info.props.limits.maxPerStageDescriptorUniformBuffers, INT_MAX); case PIPE_SHADER_CAP_MAX_TEMPS: return INT_MAX; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
