Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190003
b: refs/heads/master
c: b73c5f8
h: refs/heads/master
i:
  190001: 431d341
  189999: 4f078d3
v: v3
  • Loading branch information
Marek Olšák authored and Dave Airlie committed Apr 12, 2010
1 parent a8a0792 commit 504bad6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce227c4183a2c18c9e5467b7e92d47140e763ab9
refs/heads/master: b73c5f8b2f85a7041e045e0009d046780416948d
15 changes: 10 additions & 5 deletions trunk/drivers/gpu/drm/radeon/r100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2890,7 +2890,7 @@ static int r100_cs_track_texture_check(struct radeon_device *rdev,
{
struct radeon_bo *robj;
unsigned long size;
unsigned u, i, w, h;
unsigned u, i, w, h, d;
int ret;

for (u = 0; u < track->num_texture; u++) {
Expand Down Expand Up @@ -2922,20 +2922,25 @@ static int r100_cs_track_texture_check(struct radeon_device *rdev,
h = h / (1 << i);
if (track->textures[u].roundup_h)
h = roundup_pow_of_two(h);
if (track->textures[u].tex_coord_type == 1) {
d = (1 << track->textures[u].txdepth) / (1 << i);
if (!d)
d = 1;
} else {
d = 1;
}
if (track->textures[u].compress_format) {

size += r100_track_compress_size(track->textures[u].compress_format, w, h);
size += r100_track_compress_size(track->textures[u].compress_format, w, h) * d;
/* compressed textures are block based */
} else
size += w * h;
size += w * h * d;
}
size *= track->textures[u].cpp;

switch (track->textures[u].tex_coord_type) {
case 0:
break;
case 1:
size *= (1 << track->textures[u].txdepth);
break;
case 2:
if (track->separate_cube) {
Expand Down

0 comments on commit 504bad6

Please sign in to comment.