Add support for GL_EXT_blend_[func|equation]_separate. Fix GL_EXT_blend_color. Remove...
[mesa.git] / src / mesa / drivers / dri / r200 / r200_texmem.c
index ed0ca5869034c1ef77eaaa16bdfc2a66e55239f1..05ef16e7be81a498786860a33b5baf45b2a6549f 100644 (file)
@@ -231,7 +231,7 @@ static void r200UploadRectSubImage( r200ContextPtr rmesa,
         tex = (char *)texImage->Data + done * src_pitch;
 
         memset(&region, 0, sizeof(region));
-        r200AllocDmaRegion( rmesa, &region, lines * dstPitch, 64 );
+        r200AllocDmaRegion( rmesa, &region, lines * dstPitch, 1024 );
 
         /* Copy texdata to dma:
          */
@@ -240,10 +240,10 @@ static void r200UploadRectSubImage( r200ContextPtr rmesa,
                    __FUNCTION__, src_pitch, dstPitch);
 
         if (src_pitch == dstPitch) {
-           memcpy( region.address, tex, lines * src_pitch );
+           memcpy( region.address + region.start, tex, lines * src_pitch );
         } 
         else {
-           char *buf = region.address;
+           char *buf = region.address + region.start;
            int i;
            for (i = 0 ; i < lines ; i++) {
               memcpy( buf, tex, src_pitch );
@@ -286,8 +286,8 @@ static void uploadSubImage( r200ContextPtr rmesa, r200TexObjPtr t,
    GLuint offset;
    GLint imageWidth, imageHeight;
    GLint ret;
-   drmRadeonTexture tex;
-   drmRadeonTexImage tmp;
+   drm_radeon_texture_t tex;
+   drm_radeon_tex_image_t tmp;
    const int level = hwlevel + t->base.firstLevel;
 
    if ( R200_DEBUG & DEBUG_TEXTURE ) {
@@ -361,7 +361,7 @@ static void uploadSubImage( r200ContextPtr rmesa, r200TexObjPtr t,
 
    t->image[face][hwlevel].data = texImage->Data;
 
-   /* Init the DRM_RADEON_TEXTURE command / drmRadeonTexture struct.
+   /* Init the DRM_RADEON_TEXTURE command / drm_radeon_texture_t struct.
     * NOTE: we're always use a 1KB-wide blit and I8 texture format.
     * We used to use 1, 2 and 4-byte texels and used to use the texture
     * width to dictate the blit width - but that won't work for compressed
@@ -383,12 +383,12 @@ static void uploadSubImage( r200ContextPtr rmesa, r200TexObjPtr t,
    tex.image = &tmp;
 
    /* copy (x,y,width,height,data) */
-   memcpy( &tmp, &t->image[face][hwlevel], sizeof(drmRadeonTexImage) );
+   memcpy( &tmp, &t->image[face][hwlevel], sizeof(tmp) );
 
    LOCK_HARDWARE( rmesa );
    do {
       ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_TEXTURE,
-                                 &tex, sizeof(drmRadeonTexture) );
+                                 &tex, sizeof(drm_radeon_texture_t) );
       if (ret) {
         if (R200_DEBUG & DEBUG_IOCTL)
            fprintf(stderr, "DRM_RADEON_TEXTURE:  again!\n");