radv: fix reported number of available VGPRs
authorEric Engestrom <eric.engestrom@intel.com>
Fri, 15 Jun 2018 16:49:08 +0000 (17:49 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Mon, 18 Jun 2018 16:08:22 +0000 (17:08 +0100)
It's a bit late to round up after an integer division.

Fixes: de889794134e6245e08a2 "radv: Implement VK_AMD_shader_info"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Alex Smith <asmith@feralinteractive.com>
src/amd/vulkan/radv_shader.c

index a68e1d0254586d9d2a99fe3a7403858a1fa9f48c..7a5ade9ec7f0e72bed691cc097d293e472e907e2 100644 (file)
@@ -809,7 +809,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];