Commit feca9c3c authored by Keith Whitwell's avatar Keith Whitwell

gallium: update new merges to pipe_resource

parent 1cad983e
......@@ -13,7 +13,7 @@ struct pipe_screen;
struct pipe_winsys;
struct pipe_buffer;
struct pipe_context;
struct pipe_texture;
struct pipe_resource;
struct dri1_api_version
{
......
......@@ -8,7 +8,7 @@ struct pipe_screen;
struct pipe_winsys;
struct pipe_buffer;
struct pipe_context;
struct pipe_texture;
struct pipe_resource;
enum drm_create_screen_mode {
DRM_CREATE_NORMAL = 0,
......
......@@ -119,7 +119,7 @@ enum st_context_resource_type {
typedef void (*st_proc_t)(void);
struct pipe_context;
struct pipe_texture;
struct pipe_resource;
struct pipe_fence_handle;
/**
......@@ -132,7 +132,7 @@ struct st_context_resource
void *resource;
/* this is owned by the caller */
struct pipe_texture *texture;
struct pipe_resource *texture;
};
/**
......@@ -145,7 +145,7 @@ struct st_egl_image
void *egl_image;
/* this is owned by the caller */
struct pipe_texture *texture;
struct pipe_resource *texture;
unsigned face;
unsigned level;
......@@ -239,7 +239,7 @@ struct st_framebuffer_iface
boolean (*validate)(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
struct pipe_texture **out);
struct pipe_resource **out);
};
/**
......@@ -292,7 +292,7 @@ struct st_context_iface
*/
boolean (*teximage)(struct st_context_iface *stctxi, enum st_texture_type target,
int level, enum pipe_format internal_format,
struct pipe_texture *tex, boolean mipmap);
struct pipe_resource *tex, boolean mipmap);
/**
* Used to implement glXCopyContext.
......
......@@ -47,7 +47,7 @@ extern "C" {
struct winsys_handle;
struct pipe_screen;
struct pipe_context;
struct pipe_texture;
struct pipe_resource;
/**
......@@ -97,7 +97,7 @@ struct sw_winsys
*/
struct sw_displaytarget *
(*displaytarget_from_handle)( struct sw_winsys *ws,
const struct pipe_texture *templat,
const struct pipe_resource *template,
struct winsys_handle *whandle,
unsigned *stride );
......
......@@ -39,7 +39,7 @@ struct xmesa_st_framebuffer {
struct st_visual stvis;
unsigned texture_width, texture_height, texture_mask;
struct pipe_texture *textures[ST_ATTACHMENT_COUNT];
struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
struct pipe_surface *display_surface;
};
......@@ -58,7 +58,7 @@ xmesa_st_framebuffer_display(struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
struct pipe_texture *ptex = xstfb->textures[statt];
struct pipe_resource *ptex = xstfb->textures[statt];
struct pipe_surface *psurf;
if (!ptex)
......@@ -93,8 +93,8 @@ xmesa_st_framebuffer_copy_textures(struct st_framebuffer_iface *stfbi,
unsigned width, unsigned height)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
struct pipe_texture *src_ptex = xstfb->textures[src_statt];
struct pipe_texture *dst_ptex = xstfb->textures[dst_statt];
struct pipe_resource *src_ptex = xstfb->textures[src_statt];
struct pipe_resource *dst_ptex = xstfb->textures[dst_statt];
struct pipe_surface *src, *dst;
struct pipe_context *pipe;
......@@ -130,13 +130,13 @@ xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
unsigned mask)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
struct pipe_texture templ;
struct pipe_resource templ;
unsigned i;
/* remove outdated textures */
if (xstfb->texture_width != width || xstfb->texture_height != height) {
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_texture_reference(&xstfb->textures[i], NULL);
pipe_resource_reference(&xstfb->textures[i], NULL);
}
memset(&templ, 0, sizeof(templ));
......@@ -181,7 +181,7 @@ xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
templ.tex_usage = tex_usage;
xstfb->textures[i] =
xstfb->screen->texture_create(xstfb->screen, &templ);
xstfb->screen->resource_create(xstfb->screen, &templ);
}
}
......@@ -194,7 +194,7 @@ static boolean
xmesa_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 xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
unsigned statt_mask, new_mask, i;
......@@ -231,7 +231,7 @@ xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
for (i = 0; i < count; i++) {
out[i] = NULL;
pipe_texture_reference(&out[i], xstfb->textures[statts[i]]);
pipe_resource_reference(&out[i], xstfb->textures[statts[i]]);
}
return TRUE;
......@@ -291,7 +291,7 @@ xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
pipe_surface_reference(&xstfb->display_surface, NULL);
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_texture_reference(&xstfb->textures[i], NULL);
pipe_resource_reference(&xstfb->textures[i], NULL);
FREE(xstfb);
FREE(stfbi);
......@@ -305,7 +305,7 @@ xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi)
ret = xmesa_st_framebuffer_display(stfbi, ST_ATTACHMENT_BACK_LEFT);
if (ret) {
struct pipe_texture **front, **back, *tmp;
struct pipe_resource **front, **back, *tmp;
front = &xstfb->textures[ST_ATTACHMENT_FRONT_LEFT];
back = &xstfb->textures[ST_ATTACHMENT_BACK_LEFT];
......
......@@ -172,7 +172,7 @@ no_gdt:
static struct sw_displaytarget *
gdi_sw_displaytarget_from_handle(struct sw_winsys *winsys,
const struct pipe_texture *templet,
const struct pipe_resource *templet,
struct winsys_handle *whandle,
unsigned *stride)
{
......
......@@ -91,7 +91,7 @@ null_sw_displaytarget_create(struct sw_winsys *winsys,
static struct sw_displaytarget *
null_sw_displaytarget_from_handle(struct sw_winsys *winsys,
const struct pipe_texture *templet,
const struct pipe_resource *templet,
struct winsys_handle *whandle,
unsigned *stride)
{
......
......@@ -410,7 +410,7 @@ no_xm_dt:
static struct sw_displaytarget *
xm_displaytarget_from_handle(struct sw_winsys *winsys,
const struct pipe_texture *templet,
const struct pipe_resource *templet,
struct winsys_handle *whandle,
unsigned *stride)
{
......
......@@ -847,7 +847,7 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
/* blit/render/decompress */
util_blit_pixels_tex(ctx->st->blit,
src_view, /* pipe_texture (src) */
src_view, /* pipe_resource (src) */
0, 0, /* src x0, y0 */
width, height, /* src x1, y1 */
dst_surface, /* pipe_surface (dst) */
......@@ -900,7 +900,7 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
_mesa_unmap_pbo_dest(ctx, &ctx->Pack);
pipe->tex_transfer_destroy(pipe, tex_xfer);
pipe->transfer_destroy(pipe, tex_xfer);
/* destroy the temp / dest surface */
util_destroy_rgba_surface(dst_texture, dst_surface);
......
......@@ -147,7 +147,7 @@ static void
st_framebuffer_validate(struct st_framebuffer *stfb, struct st_context *st)
{
struct pipe_screen *screen = st->pipe->screen;
struct pipe_texture *textures[ST_ATTACHMENT_COUNT];
struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
uint width, height;
unsigned i;
boolean changed = FALSE;
......@@ -172,14 +172,14 @@ st_framebuffer_validate(struct st_framebuffer *stfb, struct st_context *st)
idx = attachment_to_buffer_index(stfb->statts[i]);
if (idx >= BUFFER_COUNT) {
pipe_texture_reference(&textures[i], NULL);
pipe_resource_reference(&textures[i], NULL);
continue;
}
strb = st_renderbuffer(stfb->Base.Attachment[idx].Renderbuffer);
assert(strb);
if (strb->texture == textures[i]) {
pipe_texture_reference(&textures[i], NULL);
pipe_resource_reference(&textures[i], NULL);
continue;
}
......@@ -187,7 +187,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb, struct st_context *st)
PIPE_BUFFER_USAGE_GPU_READ | PIPE_BUFFER_USAGE_GPU_WRITE);
if (ps) {
pipe_surface_reference(&strb->surface, ps);
pipe_texture_reference(&strb->texture, ps->texture);
pipe_resource_reference(&strb->texture, ps->texture);
/* ownership transfered */
pipe_surface_reference(&ps, NULL);
......@@ -200,7 +200,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb, struct st_context *st)
height = strb->Base.Height;
}
pipe_texture_reference(&textures[i], NULL);
pipe_resource_reference(&textures[i], NULL);
}
if (changed) {
......@@ -495,7 +495,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
static boolean
st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target,
int level, enum pipe_format internal_format,
struct pipe_texture *tex, boolean mipmap)
struct pipe_resource *tex, boolean mipmap)
{
struct st_context *st = (struct st_context *) stctxi;
GLcontext *ctx = st->ctx;
......@@ -553,7 +553,7 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target
_mesa_clear_texture_image(ctx, texImage);
}
pipe_texture_reference(&stImage->pt, tex);
pipe_resource_reference(&stImage->pt, tex);
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
_mesa_unlock_texture(ctx, texObj);
......
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