Mesa (gallium-resources): gallium: more pipe_texture/ resource fixes after merge

Roland Scheidegger sroland at kemper.freedesktop.org
Fri Apr 9 15:45:10 UTC 2010


Module: Mesa
Branch: gallium-resources
Commit: 41f00a32ee5be91512c048bacb89ede0e04bc08d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=41f00a32ee5be91512c048bacb89ede0e04bc08d

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Fri Apr  9 17:44:30 2010 +0200

gallium: more pipe_texture/resource fixes after merge

---

 src/gallium/state_trackers/dri/common/dri_st_api.c |    2 +-
 src/gallium/state_trackers/dri/drm/dri2.c          |    2 +-
 src/gallium/state_trackers/egl/common/egl_g3d_st.c |   12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/gallium/state_trackers/dri/common/dri_st_api.c b/src/gallium/state_trackers/dri/common/dri_st_api.c
index 63f92a2..070ebb3 100644
--- a/src/gallium/state_trackers/dri/common/dri_st_api.c
+++ b/src/gallium/state_trackers/dri/common/dri_st_api.c
@@ -241,7 +241,7 @@ dri_st_manager_get_egl_image(struct st_manager *smapi,
       return FALSE;
 
    stimg->texture = NULL;
-   pipe_texture_reference(&stimg->texture, img->texture);
+   pipe_resource_reference(&stimg->texture, img->texture);
    stimg->face = img->face;
    stimg->level = img->level;
    stimg->zslice = img->zslice;
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index a7e27a3..e98b6dc 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -462,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);
 }
 
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
index 2a078db..7b44678 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
@@ -106,7 +106,7 @@ egl_g3d_st_manager_get_egl_image(struct st_manager *smapi,
    gimg = egl_g3d_image(img);
 
    stimg->texture = NULL;
-   pipe_texture_reference(&stimg->texture, gimg->texture);
+   pipe_resource_reference(&stimg->texture, gimg->texture);
    stimg->face = gimg->face;
    stimg->level = gimg->level;
    stimg->zslice = gimg->zslice;
@@ -151,11 +151,11 @@ static boolean
 egl_g3d_st_framebuffer_validate_pbuffer(struct st_framebuffer_iface *stfbi,
                                         const enum st_attachment_type *statts,
                                         unsigned count,
-                                        struct pipe_texture **out)
+                                        struct pipe_resource **out)
 {
    _EGLSurface *surf = (_EGLSurface *) stfbi->st_manager_private;
    struct egl_g3d_surface *gsurf = egl_g3d_surface(surf);
-   struct pipe_texture templ;
+   struct pipe_resource templ;
    unsigned i;
 
    for (i = 0; i < count; i++) {
@@ -176,12 +176,12 @@ egl_g3d_st_framebuffer_validate_pbuffer(struct st_framebuffer_iface *stfbi,
          templ.height0 = gsurf->base.Height;
          templ.depth0 = 1;
          templ.format = gsurf->stvis.color_format;
-         templ.tex_usage = PIPE_TEXTURE_USAGE_RENDER_TARGET;
+         templ.bind = PIPE_BIND_RENDER_TARGET;
 
-         gsurf->render_texture = screen->texture_create(screen, &templ);
+         gsurf->render_texture = screen->resource_create(screen, &templ);
       }
 
-      pipe_texture_reference(&out[i], gsurf->render_texture);
+      pipe_resource_reference(&out[i], gsurf->render_texture);
    }
 
    return TRUE;




More information about the mesa-commit mailing list