softpipe: simplify an assertion
[mesa.git] / src / gallium / drivers / softpipe / sp_tile_cache.c
index b50c9845133a4bd7605c828a5fb155c31b327360..ab76009375c9d62156b80e0c75f6acf903fb9bbd 100644 (file)
@@ -369,7 +369,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe,
    struct pipe_surface *ps = tc->surface;
    int inuse = 0, pos;
 
-   if (ps && ps->buffer) {
+   if (ps) {
       /* caching a drawing surface */
       for (pos = 0; pos < NUM_ENTRIES; pos++) {
          struct softpipe_cached_tile *tile = tc->entries + pos;
@@ -494,11 +494,11 @@ tex_cache_pos(int x, int y, int z, int face, int level)
  * Tiles are read-only and indexed with more params.
  */
 const struct softpipe_cached_tile *
-sp_get_cached_tile_tex(struct pipe_context *pipe,
+sp_get_cached_tile_tex(struct softpipe_context *sp,
                        struct softpipe_tile_cache *tc, int x, int y, int z,
                        int face, int level)
 {
-   struct pipe_screen *screen = pipe->screen;
+   struct pipe_screen *screen = sp->pipe.screen;
    /* tile pos in framebuffer: */
    const int tile_x = x & ~(TILE_SIZE - 1);
    const int tile_y = y & ~(TILE_SIZE - 1);