Commit 248c93cb authored by Keith Whitwell's avatar Keith Whitwell

st/mesa: fix old pipe_texture usages

parent a563b1c5
......@@ -78,7 +78,7 @@ st_egl_image_target_renderbuffer_storage(GLcontext *ctx,
struct pipe_surface *ps;
unsigned usage;
usage = PIPE_BUFFER_USAGE_GPU_READ | PIPE_BUFFER_USAGE_GPU_WRITE;
usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_BLIT_SOURCE | PIPE_BIND_BLIT_DESTINATION;
ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
if (ps) {
strb->Base.Width = ps->width;
......@@ -89,7 +89,7 @@ st_egl_image_target_renderbuffer_storage(GLcontext *ctx,
strb->Base.InternalFormat = strb->Base._BaseFormat;
pipe_surface_reference(&strb->surface, ps);
pipe_texture_reference(&strb->texture, ps->texture);
pipe_resource_reference(&strb->texture, ps->texture);
pipe_surface_reference(&ps, NULL);
}
......@@ -127,7 +127,7 @@ st_bind_surface(GLcontext *ctx, GLenum target,
stObj->pipe = ctx->st->pipe;
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_texture_reference(&stImage->pt, ps->texture);
pipe_resource_reference(&stImage->pt, ps->texture);
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
}
......@@ -142,7 +142,7 @@ st_egl_image_target_texture_2d(GLcontext *ctx, GLenum target,
struct pipe_surface *ps;
unsigned usage;
usage = PIPE_BUFFER_USAGE_GPU_READ | PIPE_BUFFER_USAGE_GPU_WRITE;
usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_BLIT_DESTINATION | PIPE_BIND_BLIT_SOURCE;
ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
if (ps) {
st_bind_surface(ctx, target, texObj, texImage, ps);
......
......@@ -743,7 +743,7 @@ st_manager_get_egl_image_surface(struct st_context *st,
ps = smapi->screen->get_tex_surface(smapi->screen,
stimg.texture, stimg.face, stimg.level, stimg.zslice, usage);
pipe_texture_reference(&stimg.texture, NULL);
pipe_resource_reference(&stimg.texture, NULL);
return ps;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment