diff options
Diffstat (limited to 'src/gallium/state_trackers/dri/drm')
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri1.c | 24 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 23 |
2 files changed, 24 insertions, 23 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri1.c b/src/gallium/state_trackers/dri/drm/dri1.c index cca7cd8f0c..3cac1557ca 100644 --- a/src/gallium/state_trackers/dri/drm/dri1.c +++ b/src/gallium/state_trackers/dri/drm/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)); @@ -379,12 +379,12 @@ dri1_allocate_textures(struct dri_drawable *drawable, case ST_ATTACHMENT_FRONT_RIGHT: case ST_ATTACHMENT_BACK_RIGHT: format = drawable->stvis.color_format; - tex_usage = PIPE_TEXTURE_USAGE_DISPLAY_TARGET | - PIPE_TEXTURE_USAGE_RENDER_TARGET; + tex_usage = PIPE_BIND_DISPLAY_TARGET | + PIPE_BIND_RENDER_TARGET; break; case ST_ATTACHMENT_DEPTH_STENCIL: format = drawable->stvis.depth_stencil_format; - tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL; + tex_usage = PIPE_BIND_DEPTH_STENCIL; break; default: format = PIPE_FORMAT_NONE; @@ -393,10 +393,10 @@ dri1_allocate_textures(struct dri_drawable *drawable, if (format != PIPE_FORMAT_NONE) { templ.format = format; - templ.tex_usage = tex_usage; + templ.bind = 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/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index bd2517f2cd..c6655847e9 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/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); @@ -146,6 +146,7 @@ dri2_drawable_get_format(struct dri_drawable *drawable, return format; } + /** * Retrieve __DRIbuffer from the DRI loader. */ @@ -251,7 +252,7 @@ dri2_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 dri2_drawable_process_buffers(struct dri_drawable *drawable, @@ -259,7 +260,7 @@ dri2_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; @@ -271,10 +272,10 @@ dri2_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; + templ.bind = PIPE_BIND_RENDER_TARGET; templ.target = PIPE_TEXTURE_2D; templ.last_level = 0; templ.width0 = dri_drawable->w; @@ -327,7 +328,7 @@ dri2_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); } @@ -389,12 +390,12 @@ dri2_create_image_from_name(__DRIcontext *context, { struct dri_screen *screen = dri_screen(context->driScreenPriv); __DRIimage *img; - struct pipe_texture templ; + struct pipe_resource templ; struct winsys_handle whandle; unsigned tex_usage; enum pipe_format pf; - tex_usage = PIPE_TEXTURE_USAGE_RENDER_TARGET | PIPE_TEXTURE_USAGE_SAMPLER; + tex_usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW; switch (format) { case __DRI_IMAGE_FORMAT_RGB565: @@ -418,7 +419,7 @@ dri2_create_image_from_name(__DRIcontext *context, return NULL; memset(&templ, 0, sizeof(templ)); - templ.tex_usage = tex_usage; + templ.bind = tex_usage; templ.format = pf; templ.target = PIPE_TEXTURE_2D; templ.last_level = 0; @@ -430,7 +431,7 @@ dri2_create_image_from_name(__DRIcontext *context, whandle.handle = name; whandle.stride = pitch * util_format_get_blocksize(pf); - img->texture = screen->pipe_screen->texture_from_handle(screen->pipe_screen, + img->texture = screen->pipe_screen->resource_from_handle(screen->pipe_screen, &templ, &whandle); if (!img->texture) { FREE(img); @@ -461,7 +462,7 @@ dri2_create_image_from_renderbuffer(__DRIcontext *context, static void dri2_destroy_image(__DRIimage *img) { - pipe_texture_reference(&img->texture, NULL); + pipe_resource_reference(&img->texture, NULL); FREE(img); } |