nvfx: rewrite draw code and buffer code
[mesa.git] / src / gallium / drivers / nvfx / nvfx_state_fb.c
index 80b0f21575fc7280ebf67a3f0fb22c02d6e786dd..28bbd36c2e81ae0d0936b6f3014ea85f6360e51f 100644 (file)
@@ -1,6 +1,5 @@
 #include "nvfx_context.h"
 #include "nvfx_resource.h"
-#include "nouveau/nouveau_util.h"
 #include "util/u_format.h"
 
 static inline boolean
@@ -125,8 +124,8 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
                assert(!(fb->width & (fb->width - 1)) && !(fb->height & (fb->height - 1)));
 
                rt_format = NV34TCL_RT_FORMAT_TYPE_SWIZZLED |
-                       (log2i(fb->width) << NV34TCL_RT_FORMAT_LOG2_WIDTH_SHIFT) |
-                       (log2i(fb->height) << NV34TCL_RT_FORMAT_LOG2_HEIGHT_SHIFT);
+                       (util_logbase2(fb->width) << NV34TCL_RT_FORMAT_LOG2_WIDTH_SHIFT) |
+                       (util_logbase2(fb->height) << NV34TCL_RT_FORMAT_LOG2_HEIGHT_SHIFT);
        } else
                rt_format = NV34TCL_RT_FORMAT_TYPE_LINEAR;