Not really used by anybody now.
Reviewed-by: Brian Paul <brianp@vmware.com>
tmp_res.depth0 = 1;
tmp_res.array_size = 1;
tmp_res.last_level = 0;
- tmp_res.bind = p->surf.usage = PIPE_BIND_RENDER_TARGET;
+ tmp_res.bind = PIPE_BIND_RENDER_TARGET;
if (!p->screen->is_format_supported(p->screen, tmp_res.format,
tmp_res.target, 1, tmp_res.bind))
goto error;
}
- tmp_res.bind = p->surf.usage = PIPE_BIND_DEPTH_STENCIL;
+ tmp_res.bind = PIPE_BIND_DEPTH_STENCIL;
tmp_res.format = p->surf.format = PIPE_FORMAT_S8_UINT_Z24_UNORM;
p->framebuffer.nr_cbufs = 1;
- p->surf.usage = PIPE_BIND_RENDER_TARGET;
p->surf.format = PIPE_FORMAT_B8G8R8A8_UNORM;
return p;
pp_filter_setup_out(struct program *p, struct pipe_resource *out)
{
p->surf.format = out->format;
- p->surf.usage = PIPE_BIND_RENDER_TARGET;
p->framebuffer.cbufs[0] = p->pipe->create_surface(p->pipe, out, &p->surf);
}
const struct pipe_box *srcbox)
{
memset(dst_templ, 0, sizeof(*dst_templ));
- dst_templ->format = dst->format;
- if (util_format_is_depth_or_stencil(dst->format)) {
- dst_templ->usage = PIPE_BIND_DEPTH_STENCIL;
- } else {
- dst_templ->usage = PIPE_BIND_RENDER_TARGET;
- }
dst_templ->format = util_format_linear(dst->format);
dst_templ->u.tex.level = dstlevel;
dst_templ->u.tex.first_layer = dstz;
surf_tmpl.u.tex.level = dst_level;
surf_tmpl.u.tex.first_layer = dst_layer;
surf_tmpl.u.tex.last_layer = dst_layer;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
dstsurf = pipe->create_surface(pipe, dst, &surf_tmpl);
return;
/* XXX for now, just dump image for layer=0, level=0 */
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, texture, 0 /* no bind flag - not a surface */);
+ u_surface_default_template(&surf_tmpl, texture);
surface = pipe->create_surface(pipe, texture, &surf_tmpl);
if (surface) {
debug_dump_surface(pipe, prefix, surface);
util_dump_member(stream, uint, state, width);
util_dump_member(stream, uint, state, height);
- util_dump_member(stream, uint, state, usage);
-
util_dump_member(stream, ptr, state, texture);
util_dump_member(stream, uint, state, u.tex.level);
util_dump_member(stream, uint, state, u.tex.first_layer);
} else
layer = face;
- memset(&surf_templ, 0, sizeof(surf_templ));
- u_surface_default_template(&surf_templ, pt,
- is_depth ? PIPE_BIND_DEPTH_STENCIL :
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_templ, pt);
surf_templ.u.tex.level = dstLevel;
surf_templ.u.tex.first_layer = layer;
surf_templ.u.tex.last_layer = layer;
static INLINE void
pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
- struct pipe_resource *pt, unsigned level, unsigned layer,
- unsigned flags)
+ struct pipe_resource *pt, unsigned level, unsigned layer)
{
pipe_resource_reference(&ps->texture, pt);
ps->format = pt->format;
ps->width = u_minify(pt->width0, level);
ps->height = u_minify(pt->height0, level);
- ps->usage = flags;
ps->u.tex.level = level;
ps->u.tex.first_layer = ps->u.tex.last_layer = layer;
ps->context = ctx;
static INLINE void
pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
- struct pipe_resource *pt, unsigned level, unsigned layer,
- unsigned flags)
+ struct pipe_resource *pt, unsigned level, unsigned layer)
{
ps->texture = 0;
pipe_reference_init(&ps->reference, 1);
- pipe_surface_reset(ctx, ps, pt, level, layer, flags);
+ pipe_surface_reset(ctx, ps, pt, level, layer);
}
/* Return true if the surfaces are equal. */
*/
void
u_surface_default_template(struct pipe_surface *surf,
- const struct pipe_resource *texture,
- unsigned bind)
+ const struct pipe_resource *texture)
{
memset(surf, 0, sizeof(*surf));
surf->format = texture->format;
- /* XXX should filter out all non-rt/ds bind flags ? */
- surf->usage = bind;
}
/**
return FALSE;
/* create surface */
- u_surface_default_template(&surf_templ, *textureOut, bind);
+ u_surface_default_template(&surf_templ, *textureOut);
return TRUE;
}
extern void
u_surface_default_template(struct pipe_surface *view,
- const struct pipe_resource *texture,
- unsigned bind);
+ const struct pipe_resource *texture);
extern boolean
util_create_rgba_texture(struct pipe_context *ctx,
boolean
util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
struct pipe_context *ctx, struct pipe_resource *pt,
- unsigned level, unsigned layer, unsigned flags,
+ unsigned level, unsigned layer,
struct pipe_surface **res)
{
struct pipe_surface *ps;
return FALSE;
}
- pipe_surface_init(ctx, ps, pt, level, layer, flags);
+ pipe_surface_init(ctx, ps, pt, level, layer);
if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)
cso_hash_insert(us->u.hash, (layer << 8) | level, ps);
boolean
util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size,
struct pipe_context *ctx, struct pipe_resource *pt,
- unsigned level, unsigned layer, unsigned flags,
+ unsigned level, unsigned layer,
struct pipe_surface **res);
/* fast inline path for the very common case */
static INLINE boolean
util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size,
struct pipe_context *ctx, struct pipe_resource *pt,
- unsigned level, unsigned layer, unsigned flags,
+ unsigned level, unsigned layer,
struct pipe_surface **res)
{
if(likely((pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT) && us->u.array))
}
}
- return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, flags, res);
+ return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, res);
}
static INLINE struct pipe_surface *
surf_templ.format = tex->format;
surf_templ.u.tex.first_layer = 0;
surf_templ.u.tex.last_layer = 0;
- surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
buffer->fb_state_mismatch.cbufs[0] = idct->pipe->create_surface(idct->pipe, tex, &surf_templ);
buffer->viewport_mismatch.scale[0] = tex->width0;
surf_templ.format = tex->format;
surf_templ.u.tex.first_layer = i;
surf_templ.u.tex.last_layer = i;
- surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
buffer->fb_state.cbufs[i] = idct->pipe->create_surface(
idct->pipe, tex, &surf_templ);
if (!buf->surfaces[surf]) {
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = vl_video_buffer_surface_format(buf->resources[j]->format);
- surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
surf_templ.u.tex.first_layer = surf_templ.u.tex.last_layer = i;
buf->surfaces[surf] = pipe->create_surface(pipe, buf->resources[j], &surf_templ);
if (!buf->surfaces[surf])
ps->u.tex.level = surf_tmpl->u.tex.level;
ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
ps->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
- ps->usage = surf_tmpl->usage;
ps->context = ctx;
}
return ps;
ps->format = surf_tmpl->format;
ps->width = u_minify(pt->width0, surf_tmpl->u.tex.level);
ps->height = u_minify(pt->height0, surf_tmpl->u.tex.level);
- ps->usage = surf_tmpl->usage;
ps->u.tex.level = surf_tmpl->u.tex.level;
ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
surface->format = surf_tmpl->format;
surface->width = texture->width0;
surface->height = texture->height0;
- surface->usage = surf_tmpl->usage;
surface->texture = texture;
surface->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
surface->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
if (!buf->surfaces[i]) {
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = buf->resources[i]->format;
- surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
buf->surfaces[i] = pipe->create_surface(pipe, buf->resources[i], &surf_templ);
if (!buf->surfaces[i])
goto error;
pipe_resource_reference(&ps->texture, pt);
ps->context = pipe;
ps->format = tmpl->format;
- ps->usage = tmpl->usage;
ps->u.tex.level = tmpl->u.tex.level;
ps->u.tex.first_layer = tmpl->u.tex.first_layer;
ps->u.tex.last_layer = tmpl->u.tex.last_layer;
pipe_resource_reference(&ps->texture, &mt->base.base);
ps->format = templ->format;
- ps->usage = templ->usage;
ps->u.tex.level = templ->u.tex.level;
ps->u.tex.first_layer = templ->u.tex.first_layer;
ps->u.tex.last_layer = templ->u.tex.last_layer;
pipe_resource_reference(&sf->base.texture, pbuf);
sf->base.format = templ->format;
- sf->base.usage = templ->usage;
sf->base.u.buf.first_element = templ->u.buf.first_element;
sf->base.u.buf.last_element = templ->u.buf.last_element;
else
templ.format = format;
- templ.usage = PIPE_USAGE_STREAM;
templ.u.tex.level = level;
templ.u.tex.first_layer = templ.u.tex.last_layer = layer;
else
templ.format = format;
- templ.usage = PIPE_USAGE_STREAM;
templ.u.tex.level = level;
templ.u.tex.first_layer = templ.u.tex.last_layer = layer;
surface->base.format = surf_tmpl->format;
surface->base.width = u_minify(width0_override, level);
surface->base.height = u_minify(height0_override, level);
- surface->base.usage = surf_tmpl->usage;
surface->base.u.tex.level = level;
surface->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
/* Create the RAT surface */
memset(&rat_templ, 0, sizeof(rat_templ));
- rat_templ.usage = RADEON_USAGE_READWRITE;
rat_templ.format = PIPE_FORMAT_R32_UINT;
rat_templ.u.tex.level = 0;
rat_templ.u.tex.first_layer = 0;
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = layer;
surf_tmpl.u.tex.last_layer = layer;
- surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
zsurf = ctx->create_surface(ctx, &texture->resource.b.b, &surf_tmpl);
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = layer;
surf_tmpl.u.tex.last_layer = layer;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
cbsurf = ctx->create_surface(ctx,
&flushed_depth_texture->resource.b.b, &surf_tmpl);
rctx->db_misc_state.atom.dirty = true;
surf_tmpl.format = texture->resource.b.b.format;
- surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
for (level = first_level; level <= last_level; level++) {
if (!(texture->dirty_level_mask & (1 << level)))
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = layer;
surf_tmpl.u.tex.last_layer = layer;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
cbsurf = ctx->create_surface(ctx, &rtex->resource.b.b, &surf_tmpl);
r600_blitter_begin(ctx, R600_DECOMPRESS);
surface->base.format = templ->format;
surface->base.width = width;
surface->base.height = height;
- surface->base.usage = templ->usage;
surface->base.u = templ->u;
return &surface->base;
}
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = layer;
surf_tmpl.u.tex.last_layer = layer;
- surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
zsurf = ctx->create_surface(ctx, &texture->resource.b.b, &surf_tmpl);
surf_tmpl.format = texture->flushed_depth_texture->real_format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
cbsurf = ctx->create_surface(ctx,
(struct pipe_resource*)texture->flushed_depth_texture, &surf_tmpl);
surface->base.format = surf_tmpl->format;
surface->base.width = rtex->surface.level[level].npix_x;
surface->base.height = rtex->surface.level[level].npix_y;
- surface->base.usage = surf_tmpl->usage;
surface->base.texture = texture;
surface->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
ps->format = surf_tmpl->format;
ps->width = u_minify(pt->width0, level);
ps->height = u_minify(pt->height0, level);
- ps->usage = surf_tmpl->usage;
ps->u.tex.level = level;
ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
s->base.format = surf_tmpl->format;
s->base.width = u_minify(pt->width0, surf_tmpl->u.tex.level);
s->base.height = u_minify(pt->height0, surf_tmpl->u.tex.level);
- s->base.usage = surf_tmpl->usage;
s->base.u.tex.level = surf_tmpl->u.tex.level;
s->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
s->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
trace_dump_member(uint, state, width);
trace_dump_member(uint, state, height);
- trace_dump_member(uint, state, usage);
-
trace_dump_member_begin("u");
trace_dump_struct_begin(""); /* anonymous */
if (target == PIPE_BUFFER) {
unsigned width; /**< logical width in pixels */
unsigned height; /**< logical height in pixels */
- unsigned usage; /**< bitmask of PIPE_BIND_x */
unsigned writable:1; /**< writable shader resource */
union {
if(!formats_compatible || src->width0 != dst_w || src->height0 != dst_h) {
struct pipe_surface templat;
- templat.usage = PIPE_BIND_RENDER_TARGET;
templat.format = dst->format;
templat.u.tex.level = 0;
templat.u.tex.first_layer = 0;
templat.format = (desc->Format == DXGI_FORMAT_UNKNOWN) ? resource->format : dxgi_to_pipe_format[desc->Format];
if(!templat.format)
return E_NOTIMPL;
- templat.usage = PIPE_BIND_RENDER_TARGET;
templat.texture = ((GalliumD3D11Resource<>*)iresource)->resource;
switch(desc->ViewDimension)
templat.format = (desc->Format == DXGI_FORMAT_UNKNOWN) ? resource->format : dxgi_to_pipe_format[desc->Format];
if(!templat.format)
return E_NOTIMPL;
- templat.usage = PIPE_BIND_DEPTH_STENCIL;
templat.texture = ((GalliumD3D11Resource<>*)iresource)->resource;
switch(desc->ViewDimension)
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = res->format;
- surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
vlsurface->surface = pipe->create_surface(pipe, res, &surf_templ);
if (!vlsurface->surface) {
pipe_resource_reference(&res, NULL);
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = tex->format;
- surf_templ.usage = PIPE_BIND_RENDER_TARGET;
surf_draw = pipe->create_surface(pipe, tex, &surf_templ);
surf->timestamp = (vlVdpTime)earliest_presentation_time;
struct pipe_surface *surf, surf_tmpl;
/* get the destination surface */
- u_surface_default_template(&surf_tmpl, dst, PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, dst);
surf = ctx->pipe->create_surface(ctx->pipe, dst, &surf_tmpl);
if (surf && renderer_copy_begin(ctx->renderer, surf, VG_TRUE, src)) {
renderer_copy(ctx->renderer,
struct pipe_surface *surf, surf_tmpl;
struct st_renderbuffer *strb = ctx->draw_buffer->strb;
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, image_texture(src),
- 0 /* no bind flag - not a surface*/);
+ u_surface_default_template(&surf_tmpl, image_texture(src));
surf = pipe->create_surface(pipe, image_texture(src), &surf_tmpl);
vg_copy_surface(ctx, strb->surface, dx, dy,
/* flip the y coordinates */
/*dy = dst->height - dy - height;*/
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, image_texture(dst),
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, image_texture(dst));
surf = pipe->create_surface(pipe, image_texture(dst), &surf_tmpl);
vg_copy_surface(ctx, surf, dst->x + dx, dst->y + dy,
struct pipe_surface *surf, surf_tmpl;
/* get the destination surface */
- u_surface_default_template(&surf_tmpl, layer->sampler_view->texture,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, layer->sampler_view->texture);
surf = ctx->pipe->create_surface(ctx->pipe, layer->sampler_view->texture,
&surf_tmpl);
if (surf && renderer_copy_begin(ctx->renderer, surf, VG_FALSE, src)) {
struct pipe_sampler_view *view = vg_get_surface_mask(ctx);
struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
struct pipe_surface *surf, surf_tmpl;
- u_surface_default_template(&surf_tmpl, view->texture,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, view->texture);
surf = pipe->create_surface(pipe, view->texture, &surf_tmpl);
renderer_validate_for_mask_rendering(ctx->renderer, surf, mat);
if (!renderer_can_support(renderer, dst, PIPE_BIND_RENDER_TARGET))
return VG_FALSE;
- u_surface_default_template(&surf_tmpl, dst,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, dst);
surf = renderer->pipe->create_surface(renderer->pipe, dst, &surf_tmpl);
if (!surf)
return VG_FALSE;
if (!dsrb->texture)
return TRUE;
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, dsrb->texture,
- PIPE_BIND_DEPTH_STENCIL);
+ u_surface_default_template(&surf_tmpl, dsrb->texture);
dsrb->surface = pipe->create_surface(pipe,
dsrb->texture,
&surf_tmpl);
vg_context_update_blend_texture_view(ctx, stfb->width, stfb->height);
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, stfb->blend_texture_view->texture,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, stfb->blend_texture_view->texture);
surf = ctx->pipe->create_surface(ctx->pipe,
stfb->blend_texture_view->texture,
&surf_tmpl);
strb->texture = pt;
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, strb->texture,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, strb->texture);
strb->surface = pipe->create_surface(pipe, strb->texture, &surf_tmpl);
if (!strb->surface) {
PIPE_BIND_RENDER_TARGET))
return -XA_ERR_INVAL;
- u_surface_default_template(&srf_templ, dst->tex,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&srf_templ, dst->tex);
ctx->srf = ctx->pipe->create_surface(ctx->pipe, dst->tex, &srf_templ);
if (!ctx->srf)
return -XA_ERR_NORES;
xorg_gpu_surface(struct pipe_context *pipe, struct exa_pixmap_priv *priv)
{
struct pipe_surface surf_tmpl;
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- u_surface_default_template(&surf_tmpl, priv->tex,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, priv->tex);
return pipe->create_surface(pipe, priv->tex, &surf_tmpl);
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = tex->format;
- surf_templ.usage = PIPE_BIND_RENDER_TARGET;
surf = pipe->create_surface(pipe, tex, &surf_templ);
if (!surf)
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
/* create color surface */
surface_temp.format = resource_temp.format;
- surface_temp.usage = PIPE_BIND_RENDER_TARGET;
surface_temp.u.tex.level = 0;
surface_temp.u.tex.first_layer = 0;
surface_temp.u.tex.last_layer = 0;
/* create z surface */
surface_temp.format = resource_temp.format;
- surface_temp.usage = PIPE_BIND_DEPTH_STENCIL;
surface_temp.u.tex.level = 0;
surface_temp.u.tex.first_layer = 0;
surface_temp.u.tex.last_layer = 0;
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
}
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
exit(4);
surf_tmpl.format = templat.format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
p->sampler.normalized_coords = 1;
surf_tmpl.format = PIPE_FORMAT_B8G8R8A8_UNORM; /* All drivers support this */
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
p->rasterizer.depth_clip = 1;
surf_tmpl.format = PIPE_FORMAT_B8G8R8A8_UNORM;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = 0;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
struct pipe_surface surf_tmpl;
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
surf_tmpl.format = format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
surf_tmpl.u.tex.last_layer = strb->rtt_face + strb->rtt_slice;
struct st_context *st = st_context(ctx);
struct st_renderbuffer *strb = st_renderbuffer(rb);
struct pipe_surface *ps;
- unsigned usage;
- usage = PIPE_BIND_RENDER_TARGET;
- ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
+ ps = st_manager_get_egl_image_surface(st, (void *) image_handle);
if (ps) {
strb->Base.Width = ps->width;
strb->Base.Height = ps->height;
{
struct st_context *st = st_context(ctx);
struct pipe_surface *ps;
- unsigned usage;
- usage = PIPE_BIND_SAMPLER_VIEW;
- ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
+ ps = st_manager_get_egl_image_surface(st, (void *) image_handle);
if (ps) {
st_bind_surface(ctx, target, texObj, texImage, ps);
pipe_surface_reference(&ps, NULL);
if (!strb->texture)
return FALSE;
- u_surface_default_template(&surf_tmpl, strb->texture, templ.bind);
+ u_surface_default_template(&surf_tmpl, strb->texture);
strb->surface = pipe->create_surface(pipe,
strb->texture,
&surf_tmpl);
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
surf_tmpl.format = ctx->Color.sRGBEnabled
? strb->texture->format : util_format_linear(strb->texture->format);
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = strb->rtt_level;
surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
surf_tmpl.u.tex.last_layer = strb->rtt_face + strb->rtt_slice;
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
surf_tmpl.format = util_format_linear(stImage->pt->format);
- surf_tmpl.usage = dst_usage;
surf_tmpl.u.tex.level = stImage->base.Level;
surf_tmpl.u.tex.first_layer = stImage->base.Face + destZ;
surf_tmpl.u.tex.last_layer = stImage->base.Face + destZ;
continue;
}
- u_surface_default_template(&surf_tmpl, textures[i],
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, textures[i]);
ps = st->pipe->create_surface(st->pipe, textures[i], &surf_tmpl);
if (ps) {
pipe_surface_reference(&strb->surface, ps);
* FIXME: I think this should operate on resources, not surfaces
*/
struct pipe_surface *
-st_manager_get_egl_image_surface(struct st_context *st,
- void *eglimg, unsigned usage)
+st_manager_get_egl_image_surface(struct st_context *st, void *eglimg)
{
struct st_manager *smapi =
(struct st_manager *) st->iface.st_context_private;
if (!smapi->get_egl_image(smapi, eglimg, &stimg))
return NULL;
- u_surface_default_template(&surf_tmpl, stimg.texture, usage);
+ u_surface_default_template(&surf_tmpl, stimg.texture);
surf_tmpl.u.tex.level = stimg.level;
surf_tmpl.u.tex.first_layer = stimg.layer;
surf_tmpl.u.tex.last_layer = stimg.layer;
struct st_context;
struct pipe_surface *
-st_manager_get_egl_image_surface(struct st_context *st,
- void *eglimg, unsigned usage);
+st_manager_get_egl_image_surface(struct st_context *st, void *eglimg);
void
st_manager_flush_frontbuffer(struct st_context *st);