summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-03 10:52:47 +0100
committerMichal Krol <michal@vmware.com>2009-12-03 10:52:47 +0100
commit6df42d80234d13676fc3207cf44f0e371e3372b5 (patch)
tree7ab6d37b68aeae719167900f7daa7d9addf86a95 /src/gallium/state_trackers
parent0bed834be4a174d20b31a6cbcf066774bf749929 (diff)
downloadexternal_mesa3d-6df42d80234d13676fc3207cf44f0e371e3372b5.zip
external_mesa3d-6df42d80234d13676fc3207cf44f0e371e3372b5.tar.gz
external_mesa3d-6df42d80234d13676fc3207cf44f0e371e3372b5.tar.bz2
Move pf_get_block() to u_format auxiliary module.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c3
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c3
-rw-r--r--src/gallium/state_trackers/python/p_device.i2
-rw-r--r--src/gallium/state_trackers/python/st_softpipe_winsys.c3
-rw-r--r--src/gallium/state_trackers/vega/api_filters.c3
-rw-r--r--src/gallium/state_trackers/vega/image.c3
-rw-r--r--src/gallium/state_trackers/vega/mask.c3
-rw-r--r--src/gallium/state_trackers/vega/paint.c3
-rw-r--r--src/gallium/state_trackers/vega/renderer.c3
-rw-r--r--src/gallium/state_trackers/vega/vg_tracker.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c5
-rw-r--r--src/gallium/state_trackers/xorg/xorg_renderer.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_xv.c4
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c2
16 files changed, 31 insertions, 17 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 45a6059..2749cde 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -44,6 +44,7 @@
#include "state_tracker/st_context.h"
#include "state_tracker/st_cb_fbo.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_rect.h"
@@ -66,7 +67,7 @@ dri_surface_from_handle(struct drm_api *api,
templat.format = format;
templat.width0 = width;
templat.height0 = height;
- pf_get_block(templat.format, &templat.block);
+ util_format_get_block(templat.format, &templat.block);
texture = api->texture_from_shared_handle(api, screen, &templat,
"dri2 buffer", pitch, handle);
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index ddd9b04..35c8b10 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -12,6 +12,7 @@
#include "state_tracker/drm_api.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
/*
@@ -118,7 +119,7 @@ drm_create_texture(_EGLDisplay *dpy,
templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
templat.width0 = w;
templat.height0 = h;
- pf_get_block(templat.format, &templat.block);
+ util_format_get_block(templat.format, &templat.block);
texture = screen->texture_create(dev->screen,
&templat);
diff --git a/src/gallium/state_trackers/python/p_device.i b/src/gallium/state_trackers/python/p_device.i
index a83bcc7..bfe3f05 100644
--- a/src/gallium/state_trackers/python/p_device.i
+++ b/src/gallium/state_trackers/python/p_device.i
@@ -112,7 +112,7 @@ struct st_device {
struct pipe_texture templat;
memset(&templat, 0, sizeof(templat));
templat.format = format;
- pf_get_block(templat.format, &templat.block);
+ util_format_get_block(templat.format, &templat.block);
templat.width0 = width;
templat.height0 = height;
templat.depth0 = depth;
diff --git a/src/gallium/state_trackers/python/st_softpipe_winsys.c b/src/gallium/state_trackers/python/st_softpipe_winsys.c
index f0abd12..010a5de 100644
--- a/src/gallium/state_trackers/python/st_softpipe_winsys.c
+++ b/src/gallium/state_trackers/python/st_softpipe_winsys.c
@@ -40,6 +40,7 @@
#include "pipe/p_format.h"
#include "pipe/p_context.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "softpipe/sp_winsys.h"
@@ -179,7 +180,7 @@ st_softpipe_surface_buffer_create(struct pipe_winsys *winsys,
struct pipe_format_block block;
unsigned nblocksx, nblocksy;
- pf_get_block(format, &block);
+ util_format_get_block(format, &block);
nblocksx = pf_get_nblocksx(&block, width);
nblocksy = pf_get_nblocksy(&block, height);
*stride = round_up(nblocksx * block.size, alignment);
diff --git a/src/gallium/state_trackers/vega/api_filters.c b/src/gallium/state_trackers/vega/api_filters.c
index faf396d..4787ae3 100644
--- a/src/gallium/state_trackers/vega/api_filters.c
+++ b/src/gallium/state_trackers/vega/api_filters.c
@@ -38,6 +38,7 @@
#include "pipe/p_screen.h"
#include "pipe/p_shader_tokens.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
@@ -71,7 +72,7 @@ static INLINE struct pipe_texture *create_texture_1d(struct vg_context *ctx,
templ.width0 = color_data_len;
templ.height0 = 1;
templ.depth0 = 1;
- pf_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &templ.block);
+ util_format_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &templ.block);
templ.tex_usage = PIPE_TEXTURE_USAGE_SAMPLER;
tex = screen->texture_create(screen, &templ);
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 4684a57..24ca911 100644
--- a/src/gallium/state_trackers/vega/image.c
+++ b/src/gallium/state_trackers/vega/image.c
@@ -39,6 +39,7 @@
#include "pipe/p_screen.h"
#include "pipe/p_inlines.h"
#include "util/u_blit.h"
+#include "util/u_format.h"
#include "util/u_tile.h"
#include "util/u_memory.h"
#include "util/u_math.h"
@@ -270,7 +271,7 @@ struct vg_image * image_create(VGImageFormat format,
memset(&pt, 0, sizeof(pt));
pt.target = PIPE_TEXTURE_2D;
pt.format = pformat;
- pf_get_block(pformat, &pt.block);
+ util_format_get_block(pformat, &pt.block);
pt.last_level = 0;
pt.width0 = width;
pt.height0 = height;
diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c
index b84103f..6e93e25 100644
--- a/src/gallium/state_trackers/vega/mask.c
+++ b/src/gallium/state_trackers/vega/mask.c
@@ -36,6 +36,7 @@
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
struct vg_mask_layer {
@@ -491,7 +492,7 @@ struct vg_mask_layer * mask_layer_create(VGint width, VGint height)
memset(&pt, 0, sizeof(pt));
pt.target = PIPE_TEXTURE_2D;
pt.format = PIPE_FORMAT_A8R8G8B8_UNORM;
- pf_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &pt.block);
+ util_format_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &pt.block);
pt.last_level = 0;
pt.width0 = width;
pt.height0 = height;
diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c
index e8ca7d9..b88322f 100644
--- a/src/gallium/state_trackers/vega/paint.c
+++ b/src/gallium/state_trackers/vega/paint.c
@@ -34,6 +34,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_math.h"
@@ -154,7 +155,7 @@ static INLINE struct pipe_texture *create_gradient_texture(struct vg_paint *p)
templ.width0 = 1024;
templ.height0 = 1;
templ.depth0 = 1;
- pf_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &templ.block);
+ util_format_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &templ.block);
templ.tex_usage = PIPE_TEXTURE_USAGE_SAMPLER;
tex = screen->texture_create(screen, &templ);
diff --git a/src/gallium/state_trackers/vega/renderer.c b/src/gallium/state_trackers/vega/renderer.c
index 9085ed1..1706ed8 100644
--- a/src/gallium/state_trackers/vega/renderer.c
+++ b/src/gallium/state_trackers/vega/renderer.c
@@ -35,6 +35,7 @@
#include "pipe/p_shader_tokens.h"
#include "util/u_draw_quad.h"
+#include "util/u_format.h"
#include "util/u_simple_shaders.h"
#include "util/u_memory.h"
#include "util/u_rect.h"
@@ -448,7 +449,7 @@ void renderer_copy_surface(struct renderer *ctx,
texTemp.width0 = srcW;
texTemp.height0 = srcH;
texTemp.depth0 = 1;
- pf_get_block(src->format, &texTemp.block);
+ util_format_get_block(src->format, &texTemp.block);
tex = screen->texture_create(screen, &texTemp);
if (!tex)
diff --git a/src/gallium/state_trackers/vega/vg_tracker.c b/src/gallium/state_trackers/vega/vg_tracker.c
index d28463d..e7b04a8 100644
--- a/src/gallium/state_trackers/vega/vg_tracker.c
+++ b/src/gallium/state_trackers/vega/vg_tracker.c
@@ -31,6 +31,7 @@
#include "pipe/p_context.h"
#include "pipe/p_inlines.h"
#include "pipe/p_screen.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_math.h"
@@ -50,7 +51,7 @@ create_texture(struct pipe_context *pipe, enum pipe_format format,
}
templ.target = PIPE_TEXTURE_2D;
- pf_get_block(templ.format, &templ.block);
+ util_format_get_block(templ.format, &templ.block);
templ.width0 = width;
templ.height0 = height;
templ.depth0 = 1;
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 9e8c14d..fe994d1 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -50,6 +50,7 @@
#endif
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
#ifdef HAVE_LIBKMS
@@ -200,7 +201,7 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
templat.width0 = 64;
templat.height0 = 64;
- pf_get_block(templat.format, &templat.block);
+ util_format_get_block(templat.format, &templat.block);
crtcp->cursor_tex = ms->screen->texture_create(ms->screen,
&templat);
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index 3671160..fe2e0f6 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -109,7 +109,7 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
else
template.format = ms->ds_depth_bits_last ?
PIPE_FORMAT_S8Z24_UNORM : PIPE_FORMAT_Z24S8_UNORM;
- pf_get_block(template.format, &template.block);
+ util_format_get_block(template.format, &template.block);
template.width0 = pDraw->width;
template.height0 = pDraw->height;
template.depth0 = 1;
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index aa46cd4..f79e1ef 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -43,6 +43,7 @@
#include "pipe/p_state.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
#include "util/u_math.h"
#include "util/u_debug.h"
@@ -899,7 +900,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
memset(&template, 0, sizeof(template));
template.target = PIPE_TEXTURE_2D;
exa_get_pipe_format(depth, &template.format, &bitsPerPixel, &priv->picture_format);
- pf_get_block(template.format, &template.block);
+ util_format_get_block(template.format, &template.block);
if (ROUND_UP_TEXTURES && priv->flags == 0) {
template.width0 = util_next_power_of_two(width);
template.height0 = util_next_power_of_two(height);
@@ -985,7 +986,7 @@ xorg_exa_create_root_texture(ScrnInfoPtr pScrn,
memset(&template, 0, sizeof(template));
template.target = PIPE_TEXTURE_2D;
exa_get_pipe_format(depth, &template.format, &bitsPerPixel, &dummy);
- pf_get_block(template.format, &template.block);
+ util_format_get_block(template.format, &template.block);
template.width0 = width;
template.height0 = height;
template.depth0 = 1;
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c
index f777395..7cac91e 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -5,6 +5,7 @@
#include "cso_cache/cso_context.h"
#include "util/u_draw_quad.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "util/u_rect.h"
@@ -512,7 +513,7 @@ renderer_clone_texture(struct xorg_renderer *r,
templ.width0 = src->width0;
templ.height0 = src->height0;
templ.depth0 = 1;
- pf_get_block(format, &templ.block);
+ util_format_get_block(format, &templ.block);
templ.tex_usage = PIPE_TEXTURE_USAGE_SAMPLER;
pt = screen->texture_create(screen, &templ);
diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
index b8eca8c..8c491c0 100644
--- a/src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/src/gallium/state_trackers/xorg/xorg_xv.c
@@ -13,6 +13,8 @@
#include "pipe/p_screen.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
+
/*XXX get these from pipe's texture limits */
#define IMAGE_MAX_WIDTH 2048
#define IMAGE_MAX_HEIGHT 2048
@@ -170,7 +172,7 @@ create_component_texture(struct pipe_context *pipe,
templ.width0 = width;
templ.height0 = height;
templ.depth0 = 1;
- pf_get_block(PIPE_FORMAT_L8_UNORM, &templ.block);
+ util_format_get_block(PIPE_FORMAT_L8_UNORM, &templ.block);
templ.tex_usage = PIPE_TEXTURE_USAGE_SAMPLER;
tex = screen->texture_create(screen, &templ);
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index 8cb73f4..5059424 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -106,7 +106,7 @@ CreateOrResizeBackBuffer(struct pipe_video_context *vpipe, unsigned int width, u
template.width0 = width;
template.height0 = height;
template.depth0 = 1;
- pf_get_block(template.format, &template.block);
+ util_format_get_block(template.format, &template.block);
template.tex_usage = PIPE_TEXTURE_USAGE_DISPLAY_TARGET;
tex = vpipe->screen->texture_create(vpipe->screen, &template);