diff options
author | Eric Anholt <[email protected]> | 2015-04-09 12:12:20 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-04-13 23:20:45 -0700 |
commit | 43b20795b742b9f1608dd6f2dc586337408760ad (patch) | |
tree | b6e92875a9b9907c8b562f9124610bab522b08c2 /src/gallium/drivers/vc4/vc4_resource.c | |
parent | e214a596352e67c89ce379a1e5a060dbc1ce31e1 (diff) |
vc4: Move the blit code to a separate file.
There will be other blit code showing up, and it seems like the place
you'd look.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_resource.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index 10e1d6c34ed..f6ca0759012 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -26,7 +26,6 @@ #include "util/u_format.h" #include "util/u_inlines.h" #include "util/u_surface.h" -#include "util/u_blitter.h" #include "vc4_screen.h" #include "vc4_context.h" @@ -576,69 +575,6 @@ vc4_flush_resource(struct pipe_context *pctx, struct pipe_resource *resource) */ } -static bool -render_blit(struct pipe_context *ctx, struct pipe_blit_info *info) -{ - struct vc4_context *vc4 = vc4_context(ctx); - - if (!util_blitter_is_blit_supported(vc4->blitter, info)) { - fprintf(stderr, "blit unsupported %s -> %s", - util_format_short_name(info->src.resource->format), - util_format_short_name(info->dst.resource->format)); - return false; - } - - util_blitter_save_vertex_buffer_slot(vc4->blitter, vc4->vertexbuf.vb); - util_blitter_save_vertex_elements(vc4->blitter, vc4->vtx); - util_blitter_save_vertex_shader(vc4->blitter, vc4->prog.bind_vs); - util_blitter_save_rasterizer(vc4->blitter, vc4->rasterizer); - util_blitter_save_viewport(vc4->blitter, &vc4->viewport); - util_blitter_save_scissor(vc4->blitter, &vc4->scissor); - util_blitter_save_fragment_shader(vc4->blitter, vc4->prog.bind_fs); - util_blitter_save_blend(vc4->blitter, vc4->blend); - util_blitter_save_depth_stencil_alpha(vc4->blitter, vc4->zsa); - util_blitter_save_stencil_ref(vc4->blitter, &vc4->stencil_ref); - util_blitter_save_sample_mask(vc4->blitter, vc4->sample_mask); - util_blitter_save_framebuffer(vc4->blitter, &vc4->framebuffer); - util_blitter_save_fragment_sampler_states(vc4->blitter, - vc4->fragtex.num_samplers, - (void **)vc4->fragtex.samplers); - util_blitter_save_fragment_sampler_views(vc4->blitter, - vc4->fragtex.num_textures, vc4->fragtex.textures); - - util_blitter_blit(vc4->blitter, info); - - return true; -} - -/* Optimal hardware path for blitting pixels. - * Scaling, format conversion, up- and downsampling (resolve) are allowed. - */ -static void -vc4_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info) -{ - struct pipe_blit_info info = *blit_info; - - if (info.src.resource->nr_samples > 1 && - info.dst.resource->nr_samples <= 1 && - !util_format_is_depth_or_stencil(info.src.resource->format) && - !util_format_is_pure_integer(info.src.resource->format)) { - fprintf(stderr, "color resolve unimplemented"); - return; - } - - if (util_try_blit_via_copy_region(pctx, &info)) { - return; /* done */ - } - - if (info.mask & PIPE_MASK_S) { - fprintf(stderr, "cannot blit stencil, skipping"); - info.mask &= ~PIPE_MASK_S; - } - - render_blit(pctx, &info); -} - void vc4_update_shadow_baselevel_texture(struct pipe_context *pctx, struct pipe_sampler_view *view) |