Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / gallium / drivers / softpipe / sp_texture.c
index 9c64397d0b9763e48abf49ee20bc09a866ba05fe..c9a22a97891ae0ea4ddd35efc0be32e11f6eac81 100644 (file)
 #include "pipe/p_defines.h"
 #include "util/u_inlines.h"
 
-#include "util/u_format.h"
+#include "util/format/u_format.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "util/u_transfer.h"
+#include "util/u_surface.h"
 
 #include "sp_context.h"
 #include "sp_flush.h"
 #include "sp_texture.h"
 #include "sp_screen.h"
 
-#include "state_tracker/sw_winsys.h"
+#include "frontend/sw_winsys.h"
 
 
 /**
@@ -111,7 +112,7 @@ softpipe_resource_layout(struct pipe_screen *screen,
  * Check the size of the texture specified by 'res'.
  * \return TRUE if OK, FALSE if too large.
  */
-static boolean
+static bool
 softpipe_can_create_resource(struct pipe_screen *screen,
                              const struct pipe_resource *res)
 {
@@ -165,9 +166,9 @@ softpipe_resource_create_front(struct pipe_screen *screen,
    pipe_reference_init(&spr->base.reference, 1);
    spr->base.screen = screen;
 
-   spr->pot = (util_is_power_of_two(templat->width0) &&
-               util_is_power_of_two(templat->height0) &&
-               util_is_power_of_two(templat->depth0));
+   spr->pot = (util_is_power_of_two_or_zero(templat->width0) &&
+               util_is_power_of_two_or_zero(templat->height0) &&
+               util_is_power_of_two_or_zero(templat->depth0));
 
    if (spr->base.bind & (PIPE_BIND_DISPLAY_TARGET |
                         PIPE_BIND_SCANOUT |
@@ -230,9 +231,9 @@ softpipe_resource_from_handle(struct pipe_screen *screen,
    pipe_reference_init(&spr->base.reference, 1);
    spr->base.screen = screen;
 
-   spr->pot = (util_is_power_of_two(templat->width0) &&
-               util_is_power_of_two(templat->height0) &&
-               util_is_power_of_two(templat->depth0));
+   spr->pot = (util_is_power_of_two_or_zero(templat->width0) &&
+               util_is_power_of_two_or_zero(templat->height0) &&
+               util_is_power_of_two_or_zero(templat->depth0));
 
    spr->dt = winsys->displaytarget_from_handle(winsys,
                                                templat,
@@ -249,8 +250,9 @@ softpipe_resource_from_handle(struct pipe_screen *screen,
 }
 
 
-static boolean
+static bool
 softpipe_resource_get_handle(struct pipe_screen *screen,
+                             struct pipe_context *ctx,
                              struct pipe_resource *pt,
                              struct winsys_handle *whandle,
                              unsigned usage)
@@ -260,7 +262,7 @@ softpipe_resource_get_handle(struct pipe_screen *screen,
 
    assert(spr->dt);
    if (!spr->dt)
-      return FALSE;
+      return false;
 
    return winsys->displaytarget_get_handle(winsys, spr->dt, whandle);
 }
@@ -519,6 +521,7 @@ softpipe_init_texture_funcs(struct pipe_context *pipe)
 
    pipe->create_surface = softpipe_create_surface;
    pipe->surface_destroy = softpipe_surface_destroy;
+   pipe->clear_texture = util_clear_texture;
 }