summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-24 18:29:57 -0700
committerBrian <brian@yutani.localnet.net>2007-02-24 18:29:57 -0700
commit9d8df479961a6ee21a4848bbcd44f0bd63c0ed44 (patch)
treeaed160f698feec1c30c195ce953e1c1bcdbd0d12 /src/mesa/drivers
parent53bcdedc329807b4d77f0c8b3e23282e204103a7 (diff)
parentd9fb113e0571dba9ac29576015cb5816c53ac467 (diff)
Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i915tex/i915_tex_layout.c12
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c9
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_regions.c5
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_regions.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c4
5 files changed, 23 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
index 333fefef85..c844f5351d 100644
--- a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
@@ -62,15 +62,23 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
case GL_TEXTURE_CUBE_MAP:{
const GLuint dim = mt->width0;
GLuint face;
+ GLuint lvlWidth = mt->width0, lvlHeight = mt->height0;
+
+ assert(lvlWidth == lvlHeight); /* cubemap images are square */
/* double pitch for cube layouts */
mt->pitch = ((dim * mt->cpp * 2 + 3) & ~3) / mt->cpp;
mt->total_height = dim * 4;
- for (level = mt->first_level; level <= mt->last_level; level++)
+ for (level = mt->first_level; level <= mt->last_level; level++) {
intel_miptree_set_level_info(mt, level, 6,
0, 0,
- mt->pitch, mt->total_height, 1);
+ /*OLD: mt->pitch, mt->total_height,*/
+ lvlWidth, lvlHeight,
+ 1);
+ lvlWidth /= 2;
+ lvlHeight /= 2;
+ }
for (face = 0; face < 6; face++) {
GLuint x = initial_offsets[face][0] * dim;
diff --git a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c
index 2b1077aee0..93372f4dcc 100644
--- a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c
@@ -309,8 +309,13 @@ intel_miptree_image_data(struct intel_context *intel,
height = dst->level[level].height;
if(dst->compressed)
height /= 4;
- intel_region_data(intel->intelScreen, dst->region, dst_offset + dst_depth_offset[i], 0, 0, src, src_row_pitch, 0, 0, /* source x,y */
- dst->level[level].width, height);
+ intel_region_data(intel->intelScreen, dst->region,
+ dst_offset + dst_depth_offset[i], /* dst_offset */
+ 0, 0, /* dstx, dsty */
+ src,
+ src_row_pitch,
+ 0, 0, /* source x, y */
+ dst->level[level].width, height); /* width, height */
src += src_image_pitch;
}
diff --git a/src/mesa/drivers/dri/i915tex/intel_regions.c b/src/mesa/drivers/dri/i915tex/intel_regions.c
index 1205b180ca..a114bdf896 100644
--- a/src/mesa/drivers/dri/i915tex/intel_regions.c
+++ b/src/mesa/drivers/dri/i915tex/intel_regions.c
@@ -217,7 +217,8 @@ _mesa_copy_rect(GLubyte * dst,
GLuint dst_y,
GLuint width,
GLuint height,
- GLubyte * src, GLuint src_pitch, GLuint src_x, GLuint src_y)
+ const GLubyte * src,
+ GLuint src_pitch, GLuint src_x, GLuint src_y)
{
GLuint i;
@@ -253,7 +254,7 @@ intel_region_data(intelScreenPrivate *intelScreen,
struct intel_region *dst,
GLuint dst_offset,
GLuint dstx, GLuint dsty,
- void *src, GLuint src_pitch,
+ const void *src, GLuint src_pitch,
GLuint srcx, GLuint srcy, GLuint width, GLuint height)
{
struct intel_context *intel = intelScreenContext(intelScreen);
diff --git a/src/mesa/drivers/dri/i915tex/intel_regions.h b/src/mesa/drivers/dri/i915tex/intel_regions.h
index 1415bace69..d938c107a4 100644
--- a/src/mesa/drivers/dri/i915tex/intel_regions.h
+++ b/src/mesa/drivers/dri/i915tex/intel_regions.h
@@ -103,7 +103,7 @@ void intel_region_data(intelScreenPrivate *intelScreen,
struct intel_region *dest,
GLuint dest_offset,
GLuint destx, GLuint desty,
- void *src, GLuint src_stride,
+ const void *src, GLuint src_stride,
GLuint srcx, GLuint srcy, GLuint width, GLuint height);
/* Copy rectangular sub-regions
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 6a6c30a2b0..3162b508c2 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -420,14 +420,14 @@ void r200EmitArrays( GLcontext *ctx, GLubyte *vimap_rev )
if (!rmesa->tcl.vertex_data[i].buf) {
if (ctx->VertexProgram._Enabled)
emit_vector( ctx,
- &(rmesa->tcl.vertex_data[attrib]),
+ &(rmesa->tcl.vertex_data[i]),
(char *)VB->AttribPtr[attrib]->data,
1,
VB->AttribPtr[attrib]->stride,
count);
else
emit_vecfog( ctx,
- &(rmesa->tcl.vertex_data[attrib]),
+ &(rmesa->tcl.vertex_data[i]),
(char *)VB->AttribPtr[attrib]->data,
VB->AttribPtr[attrib]->stride,
count);