summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c2
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_buffer.c5
-rw-r--r--src/gallium/winsys/egl_xlib/sw_winsys.c4
-rw-r--r--src/gallium/winsys/g3dvl/xlib/xsp_winsys.c4
-rw-r--r--src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c4
-rw-r--r--src/gallium/winsys/gdi/gdi_softpipe_winsys.c8
-rw-r--r--src/gallium/winsys/xlib/xlib_cell.c4
-rw-r--r--src/gallium/winsys/xlib/xlib_llvmpipe.c10
-rw-r--r--src/gallium/winsys/xlib/xlib_softpipe.c10
9 files changed, 26 insertions, 25 deletions
diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
index 6fd402cee4..7106a06492 100644
--- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
+++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
@@ -247,7 +247,7 @@ nouveau_drm_handle_from_pt(struct drm_api *api, struct pipe_screen *pscreen,
return false;
*handle = mt->bo->handle;
- *stride = pf_get_stride(mt->base.format, mt->base.width0);
+ *stride = util_format_get_stride(mt->base.format, mt->base.width0);
return true;
}
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
index 76acc99ad7..dfecb8a728 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
@@ -35,6 +35,7 @@
#include "radeon_bo_gem.h"
#include "softpipe/sp_texture.h"
#include "r300_context.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include <X11/Xutil.h>
@@ -121,8 +122,8 @@ static struct pipe_buffer *radeon_surface_buffer_create(struct pipe_winsys *ws,
const unsigned alignment = 64;
unsigned nblocksy, size;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), alignment);
size = *stride * nblocksy;
return radeon_buffer_create(ws, 64, usage, size);
diff --git a/src/gallium/winsys/egl_xlib/sw_winsys.c b/src/gallium/winsys/egl_xlib/sw_winsys.c
index a36a9e52a6..6ee3ede38c 100644
--- a/src/gallium/winsys/egl_xlib/sw_winsys.c
+++ b/src/gallium/winsys/egl_xlib/sw_winsys.c
@@ -163,8 +163,8 @@ surface_buffer_create(struct pipe_winsys *winsys,
const unsigned alignment = 64;
unsigned nblocksy;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), alignment);
return winsys->buffer_create(winsys, alignment,
usage,
diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
index 3fc44925a8..f15bcd37b5 100644
--- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
+++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
@@ -141,8 +141,8 @@ static struct pipe_buffer* xsp_surface_buffer_create
const unsigned int ALIGNMENT = 1;
unsigned nblocksy;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), ALIGNMENT);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), ALIGNMENT);
return pws->buffer_create(pws, ALIGNMENT, usage,
*stride * nblocksy);
diff --git a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c b/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
index 7122365027..7d076be3a3 100644
--- a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
+++ b/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
@@ -137,8 +137,8 @@ gdi_llvmpipe_displaytarget_create(struct llvmpipe_winsys *winsys,
gdt->width = width;
gdt->height = height;
- bpp = util_format_get_bits(format);
- cpp = util_format_get_size(format);
+ bpp = util_format_get_blocksizebits(format);
+ cpp = util_format_get_blocksize(format);
gdt->stride = align(width * cpp, alignment);
gdt->size = gdt->stride * height;
diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
index 40f612e893..2ad794c3f0 100644
--- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
+++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
@@ -163,8 +163,8 @@ gdi_softpipe_surface_buffer_create(struct pipe_winsys *winsys,
const unsigned alignment = 64;
unsigned nblocksy;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), alignment);
return winsys->buffer_create(winsys, alignment,
usage,
@@ -271,10 +271,10 @@ gdi_softpipe_present(struct pipe_screen *screen,
memset(&bmi, 0, sizeof(BITMAPINFO));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- bmi.bmiHeader.biWidth = texture->stride[surface->level] / util_format_get_size(surface->format);
+ bmi.bmiHeader.biWidth = texture->stride[surface->level] / util_format_get_blocksize(surface->format);
bmi.bmiHeader.biHeight= -(long)surface->height;
bmi.bmiHeader.biPlanes = 1;
- bmi.bmiHeader.biBitCount = util_format_get_bits(surface->format);
+ bmi.bmiHeader.biBitCount = util_format_get_blocksizebits(surface->format);
bmi.bmiHeader.biCompression = BI_RGB;
bmi.bmiHeader.biSizeImage = 0;
bmi.bmiHeader.biXPelsPerMeter = 0;
diff --git a/src/gallium/winsys/xlib/xlib_cell.c b/src/gallium/winsys/xlib/xlib_cell.c
index cd838e7322..47ae0519a4 100644
--- a/src/gallium/winsys/xlib/xlib_cell.c
+++ b/src/gallium/winsys/xlib/xlib_cell.c
@@ -289,8 +289,8 @@ xm_surface_buffer_create(struct pipe_winsys *winsys,
const unsigned alignment = 64;
unsigned nblocksy;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), alignment);
return winsys->buffer_create(winsys, alignment,
usage,
diff --git a/src/gallium/winsys/xlib/xlib_llvmpipe.c b/src/gallium/winsys/xlib/xlib_llvmpipe.c
index d96311e452..2a434b5fd2 100644
--- a/src/gallium/winsys/xlib/xlib_llvmpipe.c
+++ b/src/gallium/winsys/xlib/xlib_llvmpipe.c
@@ -262,10 +262,10 @@ xm_llvmpipe_display(struct xmesa_buffer *xm_buffer,
{
if (xm_dt->tempImage == NULL)
{
- assert(pf_get_blockwidth(xm_dt->format) == 1);
- assert(pf_get_blockheight(xm_dt->format) == 1);
+ assert(util_format_get_blockwidth(xm_dt->format) == 1);
+ assert(util_format_get_blockheight(xm_dt->format) == 1);
alloc_shm_ximage(xm_dt, xm_buffer,
- xm_dt->stride / pf_get_blocksize(xm_dt->format),
+ xm_dt->stride / util_format_get_blocksize(xm_dt->format),
xm_dt->height);
}
@@ -331,8 +331,8 @@ xm_displaytarget_create(struct llvmpipe_winsys *winsys,
xm_dt->width = width;
xm_dt->height = height;
- nblocksy = pf_get_nblocksy(format, height);
- xm_dt->stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ xm_dt->stride = align(util_format_get_stride(format, width), alignment);
size = xm_dt->stride * nblocksy;
#ifdef USE_XSHM
diff --git a/src/gallium/winsys/xlib/xlib_softpipe.c b/src/gallium/winsys/xlib/xlib_softpipe.c
index 48cee0a41d..f7c0099584 100644
--- a/src/gallium/winsys/xlib/xlib_softpipe.c
+++ b/src/gallium/winsys/xlib/xlib_softpipe.c
@@ -255,10 +255,10 @@ xlib_softpipe_display_surface(struct xmesa_buffer *b,
{
if (xm_buf->tempImage == NULL)
{
- assert(pf_get_blockwidth(surf->texture->format) == 1);
- assert(pf_get_blockheight(surf->texture->format) == 1);
+ assert(util_format_get_blockwidth(surf->texture->format) == 1);
+ assert(util_format_get_blockheight(surf->texture->format) == 1);
alloc_shm_ximage(xm_buf, b, spt->stride[surf->level] /
- pf_get_blocksize(surf->texture->format), surf->height);
+ util_format_get_blocksize(surf->texture->format), surf->height);
}
ximage = xm_buf->tempImage;
@@ -363,8 +363,8 @@ xm_surface_buffer_create(struct pipe_winsys *winsys,
const unsigned alignment = 64;
unsigned nblocksy, size;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), alignment);
size = *stride * nblocksy;
#ifdef USE_XSHM