vc4: Use cl_f() instead of cl_u32(fui())
authorEric Anholt <eric@anholt.net>
Wed, 13 Aug 2014 21:46:06 +0000 (14:46 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 15 Aug 2014 19:01:32 +0000 (12:01 -0700)
src/gallium/drivers/vc4/vc4_program.c

index a836e130a48e7fd7e64f0a2612e3460e1904d9c8..98785c2056af9e6d90d203f79f0c728576cd7896 100644 (file)
@@ -1304,19 +1304,19 @@ vc4_write_uniforms(struct vc4_context *vc4, struct vc4_compiled_shader *shader,
                                gallium_uniforms[uinfo->data[i]]);
                         break;
                 case QUNIFORM_VIEWPORT_X_SCALE:
-                        cl_u32(&vc4->uniforms, fui(vc4->framebuffer.width *
-                                                   16.0f / 2.0f));
+                        cl_f(&vc4->uniforms,
+                             vc4->framebuffer.width * 16.0f / 2.0f);
                         break;
                 case QUNIFORM_VIEWPORT_Y_SCALE:
-                        cl_u32(&vc4->uniforms, fui(vc4->framebuffer.height *
-                                                   -16.0f / 2.0f));
+                        cl_f(&vc4->uniforms,
+                             vc4->framebuffer.height * -16.0f / 2.0f);
                         break;
 
                 case QUNIFORM_VIEWPORT_Z_OFFSET:
-                        cl_u32(&vc4->uniforms, fui(vc4->viewport.translate[2]));
+                        cl_f(&vc4->uniforms, vc4->viewport.translate[2]);
                         break;
                 case QUNIFORM_VIEWPORT_Z_SCALE:
-                        cl_u32(&vc4->uniforms, fui(vc4->viewport.scale[2]));
+                        cl_f(&vc4->uniforms, vc4->viewport.scale[2]);
                         break;
 
                 case QUNIFORM_TEXTURE_CONFIG_P0: