summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
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/svga
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/svga')
-rw-r--r--src/gallium/drivers/svga/svga_screen_texture.c14
-rw-r--r--src/gallium/drivers/svga/svga_state_vs.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_texture.c b/src/gallium/drivers/svga/svga_screen_texture.c
index ab93dab2239..2224c2d3945 100644
--- a/src/gallium/drivers/svga/svga_screen_texture.c
+++ b/src/gallium/drivers/svga/svga_screen_texture.c
@@ -159,8 +159,8 @@ svga_transfer_dma_band(struct svga_transfer *st,
st->base.x + st->base.width,
y + h,
st->base.zslice + 1,
- pf_get_blocksize(texture->base.format)*8/
- (pf_get_blockwidth(texture->base.format)*pf_get_blockheight(texture->base.format)));
+ util_format_get_blocksize(texture->base.format)*8/
+ (util_format_get_blockwidth(texture->base.format)*util_format_get_blockheight(texture->base.format)));
box.x = st->base.x;
box.y = y;
@@ -210,7 +210,7 @@ svga_transfer_dma(struct svga_transfer *st,
}
else {
unsigned y, h, srcy;
- unsigned blockheight = pf_get_blockheight(st->base.texture->format);
+ unsigned blockheight = util_format_get_blockheight(st->base.texture->format);
h = st->hw_nblocksy * blockheight;
srcy = 0;
for(y = 0; y < st->base.height; y += h) {
@@ -772,8 +772,8 @@ svga_get_tex_transfer(struct pipe_screen *screen,
struct svga_screen *ss = svga_screen(screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_transfer *st;
- unsigned nblocksx = pf_get_nblocksx(texture->format, w);
- unsigned nblocksy = pf_get_nblocksy(texture->format, h);
+ unsigned nblocksx = util_format_get_nblocksx(texture->format, w);
+ unsigned nblocksy = util_format_get_nblocksy(texture->format, h);
/* We can't map texture storage directly */
if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
@@ -787,7 +787,7 @@ svga_get_tex_transfer(struct pipe_screen *screen,
st->base.y = y;
st->base.width = w;
st->base.height = h;
- st->base.stride = nblocksx*pf_get_blocksize(texture->format);
+ st->base.stride = nblocksx*util_format_get_blocksize(texture->format);
st->base.usage = usage;
st->base.face = face;
st->base.level = level;
@@ -1071,7 +1071,7 @@ svga_screen_buffer_from_texture(struct pipe_texture *texture,
svga_translate_format(texture->format),
stex->handle);
- *stride = pf_get_stride(texture->format, texture->width0);
+ *stride = util_format_get_stride(texture->format, texture->width0);
return *buffer != NULL;
}
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index 9e339577c75..44b7ceb4fa4 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -211,7 +211,7 @@ static int update_zero_stride( struct svga_context *svga,
mapped_buffer = pipe_buffer_map_range(svga->pipe.screen,
vbuffer->buffer,
vel->src_offset,
- util_format_get_size(vel->src_format),
+ util_format_get_blocksize(vel->src_format),
PIPE_BUFFER_USAGE_CPU_READ);
translate->set_buffer(translate, vel->vertex_buffer_index,
mapped_buffer,