i965: Switch to roundf in HS/DS URB code.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 15 Nov 2016 10:00:59 +0000 (02:00 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 19 Nov 2016 19:39:59 +0000 (11:39 -0800)
Matt intentionally switched the VS calculation to be float-based in
commit c1da15709a0c0c2775bd9e534f67c60f7dc95ce8.  Tessellation support
was written before this and rebased forward, and missed the change.

Now it's consistent.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/gen7_urb.c

index 983078837acfe52193e0414ae18b4d16dce220d5..eca03366f24b90397ec03ad7abd744a4a037ba1f 100644 (file)
@@ -356,7 +356,7 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
 
       if (total_wants > 0) {
          unsigned hs_additional = (unsigned)
-            round(hs_wants * (((double) remaining_space) / total_wants));
+            roundf(hs_wants * (((float) remaining_space) / total_wants));
          hs_chunks += hs_additional;
          remaining_space -= hs_additional;
          total_wants -= hs_wants;
@@ -364,7 +364,7 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
 
       if (total_wants > 0) {
          unsigned ds_additional = (unsigned)
-            round(ds_wants * (((double) remaining_space) / total_wants));
+            roundf(ds_wants * (((float) remaining_space) / total_wants));
          ds_chunks += ds_additional;
          remaining_space -= ds_additional;
          total_wants -= ds_wants;