summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsapountzis@gmail.com>2010-03-25 14:35:26 +0200
committerGeorge Sapountzis <gsapountzis@gmail.com>2010-03-25 17:07:03 +0200
commit8eef77d0c96e0b94faf63d469527bb919dc5e7a8 (patch)
tree0690659bf685ca0938824f6b2b982b48ef8a325c
parent5b6f492274683122fbf9c482d7847ab5a0f5badc (diff)
st/dri: update for pipe_resources (after drisw merge) [PICK]gallium-resources-merge-drisw
-rw-r--r--src/gallium/state_trackers/dri/dri1.c16
-rw-r--r--src/gallium/state_trackers/dri/dri1_helper.c2
-rw-r--r--src/gallium/state_trackers/dri/dri1_helper.h2
-rw-r--r--src/gallium/state_trackers/dri/dri2.c10
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.h2
-rw-r--r--src/gallium/state_trackers/dri/dri_st_api.c6
-rw-r--r--src/gallium/state_trackers/dri/drisw.c22
7 files changed, 30 insertions, 30 deletions
diff --git a/src/gallium/state_trackers/dri/dri1.c b/src/gallium/state_trackers/dri/dri1.c
index 98bdb2936a1..9e3e19c4429 100644
--- a/src/gallium/state_trackers/dri/dri1.c
+++ b/src/gallium/state_trackers/dri/dri1.c
@@ -172,7 +172,7 @@ dri1_swap_copy(struct pipe_context *pipe,
static void
dri1_present_texture_locked(__DRIdrawable * dPriv,
- struct pipe_texture *ptex,
+ struct pipe_resource *ptex,
const struct drm_clip_rect *sub_box,
struct pipe_fence_handle **fence)
{
@@ -216,7 +216,7 @@ dri1_present_texture_locked(__DRIdrawable * dPriv,
static void
dri1_copy_to_front(struct dri_context *ctx,
- struct pipe_texture *ptex,
+ struct pipe_resource *ptex,
__DRIdrawable * dPriv,
const struct drm_clip_rect *sub_box,
struct pipe_fence_handle **fence)
@@ -254,7 +254,7 @@ dri1_flush_frontbuffer(struct dri_drawable *draw,
struct dri_screen *screen = dri_screen(draw->sPriv);
struct pipe_screen *pipe_screen = screen->pipe_screen;
struct pipe_fence_handle *dummy_fence;
- struct pipe_texture *ptex;
+ struct pipe_resource *ptex;
if (!ctx)
return; /* For now */
@@ -278,7 +278,7 @@ dri1_swap_buffers(__DRIdrawable * dPriv)
struct dri_screen *screen = dri_screen(draw->sPriv);
struct pipe_screen *pipe_screen = screen->pipe_screen;
struct pipe_fence_handle *fence;
- struct pipe_texture *ptex;
+ struct pipe_resource *ptex;
assert(__dri1_api_hooks != NULL);
@@ -308,7 +308,7 @@ dri1_copy_sub_buffer(__DRIdrawable * dPriv, int x, int y, int w, int h)
struct drm_clip_rect sub_bbox;
struct dri_drawable *draw = dri_drawable(dPriv);
struct pipe_fence_handle *dummy_fence;
- struct pipe_texture *ptex;
+ struct pipe_resource *ptex;
assert(__dri1_api_hooks != NULL);
@@ -340,7 +340,7 @@ dri1_allocate_textures(struct dri_drawable *drawable,
unsigned mask)
{
struct dri_screen *screen = dri_screen(drawable->sPriv);
- struct pipe_texture templ;
+ struct pipe_resource templ;
unsigned width, height;
boolean resized;
int i;
@@ -354,7 +354,7 @@ dri1_allocate_textures(struct dri_drawable *drawable,
/* remove outdated textures */
if (resized) {
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
- pipe_texture_reference(&drawable->textures[i], NULL);
+ pipe_resource_reference(&drawable->textures[i], NULL);
}
memset(&templ, 0, sizeof(templ));
@@ -396,7 +396,7 @@ dri1_allocate_textures(struct dri_drawable *drawable,
templ.tex_usage = tex_usage;
drawable->textures[i] =
- screen->pipe_screen->texture_create(screen->pipe_screen, &templ);
+ screen->pipe_screen->resource_create(screen->pipe_screen, &templ);
}
}
diff --git a/src/gallium/state_trackers/dri/dri1_helper.c b/src/gallium/state_trackers/dri/dri1_helper.c
index 7eeb868d422..a0de868009b 100644
--- a/src/gallium/state_trackers/dri/dri1_helper.c
+++ b/src/gallium/state_trackers/dri/dri1_helper.c
@@ -84,7 +84,7 @@ dri1_swap_fences_clear(struct dri_drawable *drawable)
}
struct pipe_surface *
-dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_texture *ptex)
+dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_resource *ptex)
{
struct pipe_screen *pipe_screen = dri_screen(drawable->sPriv)->pipe_screen;
struct pipe_surface *psurf = drawable->dri1_surface;
diff --git a/src/gallium/state_trackers/dri/dri1_helper.h b/src/gallium/state_trackers/dri/dri1_helper.h
index 3254b7ff872..c98adf2df22 100644
--- a/src/gallium/state_trackers/dri/dri1_helper.h
+++ b/src/gallium/state_trackers/dri/dri1_helper.h
@@ -47,7 +47,7 @@ void
dri1_swap_fences_clear(struct dri_drawable *drawable);
struct pipe_surface *
-dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_texture *ptex);
+dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_resource *ptex);
void
dri1_destroy_pipe_surface(struct dri_drawable *drawable);
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 2c6a0621ae7..0b1f66842a3 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -77,7 +77,7 @@ dri2_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
{
struct dri_context *ctx = dri_context(pDRICtx);
struct dri_drawable *drawable = dri_drawable(dPriv);
- struct pipe_texture *pt;
+ struct pipe_resource *pt;
dri_st_framebuffer_validate_att(drawable->stfb, ST_ATTACHMENT_FRONT_LEFT);
@@ -235,7 +235,7 @@ dri_drawable_get_buffers(struct dri_drawable *drawable,
}
/**
- * Process __DRIbuffer and convert them into pipe_textures.
+ * Process __DRIbuffer and convert them into pipe_resources.
*/
static void
dri_drawable_process_buffers(struct dri_drawable *drawable,
@@ -243,7 +243,7 @@ dri_drawable_process_buffers(struct dri_drawable *drawable,
{
struct dri_screen *screen = dri_screen(drawable->sPriv);
__DRIdrawable *dri_drawable = drawable->dPriv;
- struct pipe_texture templ;
+ struct pipe_resource templ;
struct winsys_handle whandle;
boolean have_depth = FALSE;
unsigned i;
@@ -255,7 +255,7 @@ dri_drawable_process_buffers(struct dri_drawable *drawable,
return;
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
- pipe_texture_reference(&drawable->textures[i], NULL);
+ pipe_resource_reference(&drawable->textures[i], NULL);
memset(&templ, 0, sizeof(templ));
templ.tex_usage = PIPE_TEXTURE_USAGE_RENDER_TARGET;
@@ -311,7 +311,7 @@ dri_drawable_process_buffers(struct dri_drawable *drawable,
whandle.stride = buf->pitch;
drawable->textures[statt] =
- screen->pipe_screen->texture_from_handle(screen->pipe_screen,
+ screen->pipe_screen->resource_from_handle(screen->pipe_screen,
&templ, &whandle);
}
diff --git a/src/gallium/state_trackers/dri/dri_drawable.h b/src/gallium/state_trackers/dri/dri_drawable.h
index 98abeb9ec05..315b7781654 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.h
+++ b/src/gallium/state_trackers/dri/dri_drawable.h
@@ -55,7 +55,7 @@ struct dri_drawable
unsigned old_w;
unsigned old_h;
- struct pipe_texture *textures[ST_ATTACHMENT_COUNT];
+ struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
unsigned int texture_mask, texture_stamp;
struct pipe_fence_handle *swap_fences[DRI_SWAP_FENCES_MAX];
diff --git a/src/gallium/state_trackers/dri/dri_st_api.c b/src/gallium/state_trackers/dri/dri_st_api.c
index 2b98c487c84..e69b71e0711 100644
--- a/src/gallium/state_trackers/dri/dri_st_api.c
+++ b/src/gallium/state_trackers/dri/dri_st_api.c
@@ -44,7 +44,7 @@ static boolean
dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
- struct pipe_texture **out)
+ struct pipe_resource **out)
{
struct dri_drawable *drawable =
(struct dri_drawable *) stfbi->st_manager_private;
@@ -97,7 +97,7 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
for (i = 0; i < count; i++) {
out[i] = NULL;
- pipe_texture_reference(&out[i], drawable->textures[statts[i]]);
+ pipe_resource_reference(&out[i], drawable->textures[statts[i]]);
}
return TRUE;
@@ -154,7 +154,7 @@ dri_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
int i;
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
- pipe_texture_reference(&drawable->textures[i], NULL);
+ pipe_resource_reference(&drawable->textures[i], NULL);
FREE(stfbi);
}
diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c
index 73bc45d9060..aa1c9051ada 100644
--- a/src/gallium/state_trackers/dri/drisw.c
+++ b/src/gallium/state_trackers/dri/drisw.c
@@ -100,7 +100,7 @@ drisw_update_drawable_info(__DRIdrawable *dPriv)
static INLINE void
drisw_present_texture(__DRIdrawable *dPriv,
- struct pipe_texture *ptex)
+ struct pipe_resource *ptex)
{
struct dri_drawable *drawable = dri_drawable(dPriv);
struct dri_screen *screen = dri_screen(drawable->sPriv);
@@ -114,9 +114,9 @@ drisw_present_texture(__DRIdrawable *dPriv,
if (!pipe || !psurf)
return;
- ptrans = pipe->get_tex_transfer(pipe, ptex, 0, 0, 0,
- PIPE_TRANSFER_READ,
- 0, 0, dPriv->w, dPriv->h);
+ ptrans = pipe_get_transfer(pipe, ptex, 0, 0, 0,
+ PIPE_TRANSFER_READ,
+ 0, 0, dPriv->w, dPriv->h);
pmap = pipe->transfer_map(pipe, ptrans);
@@ -126,7 +126,7 @@ drisw_present_texture(__DRIdrawable *dPriv,
pipe->transfer_unmap(pipe, ptrans);
- pipe->tex_transfer_destroy(pipe, ptrans);
+ pipe->transfer_destroy(pipe, ptrans);
}
static INLINE void
@@ -144,7 +144,7 @@ drisw_invalidate_drawable(__DRIdrawable *dPriv)
static INLINE void
drisw_copy_to_front(__DRIdrawable * dPriv,
- struct pipe_texture *ptex)
+ struct pipe_resource *ptex)
{
drisw_present_texture(dPriv, ptex);
@@ -160,7 +160,7 @@ drisw_flush_frontbuffer(struct dri_drawable *drawable,
enum st_attachment_type statt)
{
struct dri_context *ctx = dri_get_current();
- struct pipe_texture *ptex;
+ struct pipe_resource *ptex;
if (!ctx)
return;
@@ -177,7 +177,7 @@ drisw_swap_buffers(__DRIdrawable *dPriv)
{
struct dri_context *ctx = dri_get_current();
struct dri_drawable *drawable = dri_drawable(dPriv);
- struct pipe_texture *ptex;
+ struct pipe_resource *ptex;
if (!ctx)
return;
@@ -207,7 +207,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
unsigned mask)
{
struct dri_screen *screen = dri_screen(drawable->sPriv);
- struct pipe_texture templ;
+ struct pipe_resource templ;
unsigned width, height;
boolean resized;
int i;
@@ -221,7 +221,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
/* remove outdated textures */
if (resized) {
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
- pipe_texture_reference(&drawable->textures[i], NULL);
+ pipe_resource_reference(&drawable->textures[i], NULL);
}
memset(&templ, 0, sizeof(templ));
@@ -263,7 +263,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
templ.tex_usage = tex_usage;
drawable->textures[i] =
- screen->pipe_screen->texture_create(screen->pipe_screen, &templ);
+ screen->pipe_screen->resource_create(screen->pipe_screen, &templ);
}
}