diff options
| -rw-r--r-- | shared-core/radeon_state.c | 16 | ||||
| -rw-r--r-- | shared/radeon_state.c | 16 | 
2 files changed, 14 insertions, 18 deletions
| diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c index 4211b233..d9bc948c 100644 --- a/shared-core/radeon_state.c +++ b/shared-core/radeon_state.c @@ -1073,7 +1073,7 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  	u32 *buffer;  	const u8 *data;  	int size, dwords, tex_width, blit_width; -	u32 y, height; +	u32 height;  	int i;  	RING_LOCALS; @@ -1138,10 +1138,9 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  			   tex->offset >> 10, tex->pitch, tex->format,  			   image->x, image->y, image->width, image->height ); -		/* Make a copy of the parameters in case we have to +		/* Make a copy of some parameters in case we have to  		 * update them for a multi-pass texture blit.  		 */ -		y = image->y;  		height = image->height;  		data = (const u8 *)image->data; @@ -1156,11 +1155,6 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  			return 0;  		} -		/* Update the input parameters for next time */ -		image->y += height; -		image->height -= height; -		image->data = (const u8 *)image->data + size; -  		buf = radeon_freelist_get( dev );  		if ( 0 && !buf ) {  			radeon_do_cp_idle( dev_priv ); @@ -1190,7 +1184,7 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  		buffer[2] = (tex->pitch << 22) | (tex->offset >> 10);  		buffer[3] = 0xffffffff;  		buffer[4] = 0xffffffff; -		buffer[5] = (y << 16) | image->x; +		buffer[5] = (image->y << 16) | image->x;  		buffer[6] = (height << 16) | image->width;  		buffer[7] = dwords;  		buffer += 8; @@ -1227,6 +1221,10 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  		radeon_cp_dispatch_indirect( dev, buf, 0, buf->used );  		radeon_cp_discard_buffer( dev, buf ); +		/* Update the input parameters for next time */ +		image->y += height; +		image->height -= height; +		(const u8 *)image->data += size;  	} while (image->height > 0);  	/* Flush the pixel cache after the blit completes.  This ensures diff --git a/shared/radeon_state.c b/shared/radeon_state.c index 4211b233..d9bc948c 100644 --- a/shared/radeon_state.c +++ b/shared/radeon_state.c @@ -1073,7 +1073,7 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  	u32 *buffer;  	const u8 *data;  	int size, dwords, tex_width, blit_width; -	u32 y, height; +	u32 height;  	int i;  	RING_LOCALS; @@ -1138,10 +1138,9 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  			   tex->offset >> 10, tex->pitch, tex->format,  			   image->x, image->y, image->width, image->height ); -		/* Make a copy of the parameters in case we have to +		/* Make a copy of some parameters in case we have to  		 * update them for a multi-pass texture blit.  		 */ -		y = image->y;  		height = image->height;  		data = (const u8 *)image->data; @@ -1156,11 +1155,6 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  			return 0;  		} -		/* Update the input parameters for next time */ -		image->y += height; -		image->height -= height; -		image->data = (const u8 *)image->data + size; -  		buf = radeon_freelist_get( dev );  		if ( 0 && !buf ) {  			radeon_do_cp_idle( dev_priv ); @@ -1190,7 +1184,7 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  		buffer[2] = (tex->pitch << 22) | (tex->offset >> 10);  		buffer[3] = 0xffffffff;  		buffer[4] = 0xffffffff; -		buffer[5] = (y << 16) | image->x; +		buffer[5] = (image->y << 16) | image->x;  		buffer[6] = (height << 16) | image->width;  		buffer[7] = dwords;  		buffer += 8; @@ -1227,6 +1221,10 @@ static int radeon_cp_dispatch_texture( drm_device_t *dev,  		radeon_cp_dispatch_indirect( dev, buf, 0, buf->used );  		radeon_cp_discard_buffer( dev, buf ); +		/* Update the input parameters for next time */ +		image->y += height; +		image->height -= height; +		(const u8 *)image->data += size;  	} while (image->height > 0);  	/* Flush the pixel cache after the blit completes.  This ensures | 
