summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-06-15 17:49:08 +0100
committerDylan Baker <[email protected]>2018-06-18 10:43:57 -0700
commit9b8c90fc67ee478972955057eda36523be284cfd (patch)
tree5b33f0b90ca0f772b17c005a8f7b1e6289fbefc0
parentc86a99adeff3ff3c1d3f2c9ce3ccfa122c54d7c7 (diff)
radv: fix reported number of available VGPRs
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 <[email protected]> Reviewed-by: Alex Smith <[email protected]> (cherry picked from commit d85fef1e34657fc082b9a763de9499d324fbeebf)
-rw-r--r--src/amd/vulkan/radv_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 97133b295dc..70069b677d0 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];