summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_miptree.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-17 23:41:57 +0100
committerMichal Krol <[email protected]>2009-12-17 23:41:57 +0100
commitb1ed72ebe2599ec178f51d86fd42f26486b9a19b (patch)
treeb49428bb48d81bf1396ef14ee8a0a462f89d2d8e /src/gallium/drivers/nv50/nv50_miptree.c
parentec5577a83da18890a4f334af2241aca41b6ed31b (diff)
Move the remaining format pf_get_* functions to u_format.h.
Previously they depended on format blocks, but after removing those they started depending on format encoding.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_miptree.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index 9e083b662dd..3f1edf0a139 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -23,6 +23,7 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "nv50_context.h"
@@ -105,10 +106,10 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
for (l = 0; l <= pt->last_level; l++) {
struct nv50_miptree_level *lvl = &mt->level[l];
- unsigned nblocksy = pf_get_nblocksy(pt->format, height);
+ unsigned nblocksy = util_format_get_nblocksy(pt->format, height);
lvl->image_offset = CALLOC(mt->image_nr, sizeof(int));
- lvl->pitch = align(pf_get_stride(pt->format, width), 64);
+ lvl->pitch = align(util_format_get_stride(pt->format, width), 64);
lvl->tile_mode = get_tile_mode(nblocksy, depth);
width = u_minify(width, 1);
@@ -130,7 +131,7 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
unsigned tile_d = get_tile_depth(lvl->tile_mode);
size = lvl->pitch;
- size *= align(pf_get_nblocksy(pt->format, u_minify(pt->height0, l)), tile_h);
+ size *= align(util_format_get_nblocksy(pt->format, u_minify(pt->height0, l)), tile_h);
size *= align(u_minify(pt->depth0, l), tile_d);
lvl->image_offset[i] = mt->total_size;
@@ -222,7 +223,7 @@ nv50_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ps->offset = lvl->image_offset[img];
if (pt->target == PIPE_TEXTURE_3D) {
- unsigned nb_h = pf_get_nblocksy(pt->format, ps->height);
+ unsigned nb_h = util_format_get_nblocksy(pt->format, ps->height);
ps->offset += get_zslice_offset(lvl->tile_mode, zslice,
lvl->pitch, nb_h);
}