summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-04-03 00:18:55 +0200
committerChristoph Bumiller <[email protected]>2013-04-03 12:54:44 +0200
commit8e1dd58a7e76834c1fb6d117b6ea5755e05cfb77 (patch)
tree5332b79c7af6d65cedc8139fd7f55414db35a9ab /src/gallium/drivers/nv50
parentba9b0b682f51222752ac56e7a0615f9bbb686089 (diff)
nvc0: place staging textures in GART and map them directly
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c6
-rw-r--r--src/gallium/drivers/nv50/nv50_resource.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index ed0f8c2b2f1..fe481887570 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -213,7 +213,7 @@ nv50_miptree_init_ms_mode(struct nv50_miptree *mt)
}
boolean
-nv50_miptree_init_layout_linear(struct nv50_miptree *mt)
+nv50_miptree_init_layout_linear(struct nv50_miptree *mt, unsigned pitch_align)
{
struct pipe_resource *pt = &mt->base.base;
const unsigned blocksize = util_format_get_blocksize(pt->format);
@@ -227,7 +227,7 @@ nv50_miptree_init_layout_linear(struct nv50_miptree *mt)
if (mt->ms_x | mt->ms_y)
return FALSE;
- mt->level[0].pitch = align(pt->width0 * blocksize, 64);
+ mt->level[0].pitch = align(pt->width0 * blocksize, pitch_align);
/* Account for very generous prefetch (allocate size as if tiled). */
h = MAX2(h, 8);
@@ -314,7 +314,7 @@ nv50_miptree_create(struct pipe_screen *pscreen,
if (bo_config.nv50.memtype != 0) {
nv50_miptree_init_layout_tiled(mt);
} else
- if (!nv50_miptree_init_layout_linear(mt)) {
+ if (!nv50_miptree_init_layout_linear(mt, 64)) {
FREE(mt);
return NULL;
}
diff --git a/src/gallium/drivers/nv50/nv50_resource.h b/src/gallium/drivers/nv50/nv50_resource.h
index a2bc9803fbe..469d812098f 100644
--- a/src/gallium/drivers/nv50/nv50_resource.h
+++ b/src/gallium/drivers/nv50/nv50_resource.h
@@ -67,7 +67,7 @@ nv50_miptree(struct pipe_resource *pt)
/* Internal functions:
*/
boolean
-nv50_miptree_init_layout_linear(struct nv50_miptree *mt);
+nv50_miptree_init_layout_linear(struct nv50_miptree *mt, unsigned pitch_align);
struct pipe_resource *
nv50_miptree_create(struct pipe_screen *pscreen,