diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_init.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_program.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_run.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_dump_state.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_gen_mipmap.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_inlines.h | 9 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_surface.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_surface.h | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_surfaces.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_surfaces.h | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_idct.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 1 |
14 files changed, 15 insertions, 40 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index e059be6e9bc..d9552736f00 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -213,7 +213,7 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w, 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)) @@ -237,7 +237,7 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w, 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; diff --git a/src/gallium/auxiliary/postprocess/pp_program.c b/src/gallium/auxiliary/postprocess/pp_program.c index c25078df6f1..7044e3453df 100644 --- a/src/gallium/auxiliary/postprocess/pp_program.c +++ b/src/gallium/auxiliary/postprocess/pp_program.c @@ -133,7 +133,6 @@ pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe, p->framebuffer.nr_cbufs = 1; - p->surf.usage = PIPE_BIND_RENDER_TARGET; p->surf.format = PIPE_FORMAT_B8G8R8A8_UNORM; return p; diff --git a/src/gallium/auxiliary/postprocess/pp_run.c b/src/gallium/auxiliary/postprocess/pp_run.c index 112458f384e..0bed547bd44 100644 --- a/src/gallium/auxiliary/postprocess/pp_run.c +++ b/src/gallium/auxiliary/postprocess/pp_run.c @@ -166,7 +166,6 @@ void 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); } diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index e7baf3af767..49f01dec1ba 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -1083,12 +1083,6 @@ void util_blitter_default_dst_texture(struct pipe_surface *dst_templ, 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; @@ -1743,7 +1737,6 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, 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); diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index ee97b7adb81..ce472b0204e 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -537,8 +537,7 @@ void debug_dump_texture(struct pipe_context *pipe, 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); diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index f5d8b437399..09faffe73f3 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -661,8 +661,6 @@ util_dump_surface(FILE *stream, const struct pipe_surface *state) 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); diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index 90588a022df..e1f18f39c05 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1617,10 +1617,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, } 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; diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 469f95461fa..582aacdca1e 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -188,14 +188,12 @@ pipe_so_target_reference(struct pipe_stream_output_target **ptr, 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; @@ -203,12 +201,11 @@ pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps, 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. */ diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index bef002902ad..5e771c95095 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -49,14 +49,11 @@ */ 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; } /** @@ -110,7 +107,7 @@ util_create_rgba_texture(struct pipe_context *pipe, return FALSE; /* create surface */ - u_surface_default_template(&surf_templ, *textureOut, bind); + u_surface_default_template(&surf_templ, *textureOut); return TRUE; } diff --git a/src/gallium/auxiliary/util/u_surface.h b/src/gallium/auxiliary/util/u_surface.h index a39f677bdfc..fe950c818e3 100644 --- a/src/gallium/auxiliary/util/u_surface.h +++ b/src/gallium/auxiliary/util/u_surface.h @@ -42,8 +42,7 @@ extern "C" { 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, diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c index b0cfec2a826..c2f2b74c939 100644 --- a/src/gallium/auxiliary/util/u_surfaces.c +++ b/src/gallium/auxiliary/util/u_surfaces.c @@ -32,7 +32,7 @@ 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; @@ -65,7 +65,7 @@ util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size, 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); diff --git a/src/gallium/auxiliary/util/u_surfaces.h b/src/gallium/auxiliary/util/u_surfaces.h index 9581feda7c8..1605215cb88 100644 --- a/src/gallium/auxiliary/util/u_surfaces.h +++ b/src/gallium/auxiliary/util/u_surfaces.h @@ -46,14 +46,14 @@ struct util_surfaces 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)) @@ -67,7 +67,7 @@ util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size, } } - 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 * diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c index 5adc72f7db6..a0c243f809a 100644 --- a/src/gallium/auxiliary/vl/vl_idct.c +++ b/src/gallium/auxiliary/vl/vl_idct.c @@ -603,7 +603,6 @@ init_source(struct vl_idct *idct, struct vl_idct_buffer *buffer) 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; @@ -643,7 +642,6 @@ init_intermediate(struct vl_idct *idct, struct vl_idct_buffer *buffer) 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); diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 82d7386e644..511485f75d6 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -368,7 +368,6 @@ vl_video_buffer_surfaces(struct pipe_video_buffer *buffer) 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]) |