checkpoint: move some texture layout code
authorBrian <brian@i915.localnet.net>
Mon, 6 Aug 2007 17:51:16 +0000 (11:51 -0600)
committerBrian <brian@i915.localnet.net>
Mon, 6 Aug 2007 17:51:16 +0000 (11:51 -0600)
src/mesa/drivers/dri/i915pipe/intel_context.c
src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.c
src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.h

index df34c360e57956d292e390df271c402badb99ffd..e267135973da07a3296587644b3aa56e64f21da8 100644 (file)
@@ -53,7 +53,7 @@
 #include "intel_blit.h"
 #include "intel_buffer_objects.h"
 #include "intel_fbo.h"
-#include "intel_mipmap_tree.h"
+#include "intel_tex_layout.h"
 
 #include "state_tracker/st_public.h"
 #include "state_tracker/st_context.h"
index 50e830281c4f71ac1f9cd5a896063c5f261e55af..990e5c0e40bc87e8869bb3b16336d6a2e6a8b48f 100644 (file)
@@ -161,53 +161,6 @@ intel_miptree_match_image(struct pipe_mipmap_tree *mt,
 }
 
 
-void
-intel_miptree_set_level_info(struct pipe_mipmap_tree *mt,
-                             GLuint level,
-                             GLuint nr_images,
-                             GLuint x, GLuint y, GLuint w, GLuint h, GLuint d)
-{
-
-   mt->level[level].width = w;
-   mt->level[level].height = h;
-   mt->level[level].depth = d;
-   mt->level[level].level_offset = (x + y * mt->pitch) * mt->cpp;
-   mt->level[level].nr_images = nr_images;
-
-   DBG("%s level %d size: %d,%d,%d offset %d,%d (0x%x)\n", __FUNCTION__,
-       level, w, h, d, x, y, mt->level[level].level_offset);
-
-   /* Not sure when this would happen, but anyway: 
-    */
-   if (mt->level[level].image_offset) {
-      free(mt->level[level].image_offset);
-      mt->level[level].image_offset = NULL;
-   }
-
-   assert(nr_images);
-
-   mt->level[level].image_offset = malloc(nr_images * sizeof(GLuint));
-   mt->level[level].image_offset[0] = 0;
-}
-
-
-
-void
-intel_miptree_set_image_offset(struct pipe_mipmap_tree *mt,
-                               GLuint level, GLuint img, GLuint x, GLuint y)
-{
-   if (img == 0 && level == 0)
-      assert(x == 0 && y == 0);
-
-   assert(img < mt->level[level].nr_images);
-
-   mt->level[level].image_offset[img] = (x + y * mt->pitch);
-
-   DBG("%s level %d img %d pos %d,%d image_offset %x\n",
-       __FUNCTION__, level, img, x, y, mt->level[level].image_offset[img]);
-}
-
-
 /* Although we use the image_offset[] array to store relative offsets
  * to cube faces, Mesa doesn't know anything about this and expects
  * each cube face to be treated as a separate image.
index 94fb21372c5a20244cad903fc1eff6514a4ece5f..f453462f517ad24b24080a92909534a39d80dfb2 100644 (file)
@@ -83,17 +83,6 @@ const GLuint *intel_miptree_depth_offsets(struct pipe_mipmap_tree *mt,
                                           GLuint level);
 
 
-void intel_miptree_set_level_info(struct pipe_mipmap_tree *mt,
-                                  GLuint level,
-                                  GLuint nr_images,
-                                  GLuint x, GLuint y,
-                                  GLuint w, GLuint h, GLuint d);
-
-void intel_miptree_set_image_offset(struct pipe_mipmap_tree *mt,
-                                    GLuint level,
-                                    GLuint img, GLuint x, GLuint y);
-
-
 /* Upload an image into a tree
  */
 void intel_miptree_image_data(struct intel_context *intel,
@@ -110,11 +99,5 @@ void intel_miptree_image_copy(struct intel_context *intel,
                               GLuint face, GLuint level,
                               struct pipe_mipmap_tree *src);
 
-/* i915_mipmap_tree.c:
- */
-GLboolean i915_miptree_layout(struct pipe_context *, struct pipe_mipmap_tree *);
-GLboolean i945_miptree_layout(struct pipe_context *, struct pipe_mipmap_tree *);
-
-
 
 #endif