[Mesa-dev] [PATCH mesa] radv: fix reported number of available VGPRs

Alex Smith asmith at feralinteractive.com
Mon Jun 18 15:54:00 UTC 2018


Reviewed-by: Alex Smith <asmith at feralinteractive.com>

On 15 June 2018 at 17:52, Eric Engestrom <eric.engestrom at intel.com> wrote:

> It's a bit late to round up after an integer division.
>
> Fixes: de889794134e6245e08a2 "radv: Implement VK_AMD_shader_info"
> Cc: Alex Smith <asmith at feralinteractive.com>
> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
>  src/amd/vulkan/radv_shader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
> index 76790a19047a86abdad5..b31eb9bfda5e9e29e115 100644
> --- a/src/amd/vulkan/radv_shader.c
> +++ b/src/amd/vulkan/radv_shader.c
> @@ -808,7 +808,7 @@ radv_GetShaderInfoAMD(VkDevice _device,
>                                 unsigned workgroup_size = local_size[0] *
> local_size[1] * local_size[2];
>
>                                 statistics.numAvailableVgprs =
> statistics.numPhysicalVgprs /
> -
> ceil(workgroup_size / statistics.numPhysicalVgprs);
> +
> ceil((double)workgroup_size / statistics.numPhysicalVgprs);
>
>                                 statistics.computeWorkGroupSize[0] =
> local_size[0];
>                                 statistics.computeWorkGroupSize[1] =
> local_size[1];
> --
> Cheers,
>   Eric
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180618/009d4249/attachment.html>


More information about the mesa-dev mailing list