summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-08-06 11:51:16 -0600
committerBrian <brian@i915.localnet.net>2007-08-06 11:51:16 -0600
commite6c8691b1a3b8bd44206b9aaa8d75c7c5ea819ed (patch)
treed2cffb586b85ad92abca6789244359f53b79f2b3
parentd9605cdf7cbbd3c81c506d01eb8e88a11ccfc09b (diff)
checkpoint: move some texture layout code
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_context.c2
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.c47
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.h17
3 files changed, 1 insertions, 65 deletions
diff --git a/src/mesa/drivers/dri/i915pipe/intel_context.c b/src/mesa/drivers/dri/i915pipe/intel_context.c
index df34c360e5..e267135973 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_context.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_context.c
@@ -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"
diff --git a/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.c b/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.c
index 50e830281c..990e5c0e40 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.c
@@ -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.
diff --git a/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.h b/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.h
index 94fb21372c..f453462f51 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i915pipe/intel_mipmap_tree.h
@@ -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