diff options
author | Kristian H. Kristensen <[email protected]> | 2019-02-01 14:44:17 -0800 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-02-11 12:26:21 -0800 |
commit | 8cf130369811643b7432ef6c4d8de6e45a4f4ce4 (patch) | |
tree | c5b701a955ce843f949d98f8e1c86e8c9a76356f /src/gallium/drivers/freedreno/freedreno_resource.c | |
parent | 701d30dda805c96614bcb9ff86fad02722b0fe28 (diff) |
freedreno: Consolidate u_blitter functions in freedreno_blitter.c
Reviewed-by: Rob Clark <[email protected]>
Signed-off-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 835de9f93ee..5f99a7ca60c 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -1109,81 +1109,6 @@ fd_render_condition_check(struct pipe_context *pctx) return true; } -/** - * Optimal hardware path for blitting pixels. - * Scaling, format conversion, up- and downsampling (resolve) are allowed. - */ -static void -fd_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info) -{ - struct fd_context *ctx = fd_context(pctx); - struct pipe_blit_info info = *blit_info; - - if (info.render_condition_enable && !fd_render_condition_check(pctx)) - return; - - if (info.mask & PIPE_MASK_S) { - DBG("cannot blit stencil, skipping"); - info.mask &= ~PIPE_MASK_S; - } - - if (!util_blitter_is_blit_supported(ctx->blitter, &info)) { - DBG("blit unsupported %s -> %s", - util_format_short_name(info.src.resource->format), - util_format_short_name(info.dst.resource->format)); - return; - } - - if (!(ctx->blit && ctx->blit(ctx, &info))) - fd_blitter_blit(ctx, &info); -} - -void -fd_blitter_pipe_begin(struct fd_context *ctx, bool render_cond, bool discard, - enum fd_render_stage stage) -{ - fd_fence_ref(ctx->base.screen, &ctx->last_fence, NULL); - - util_blitter_save_fragment_constant_buffer_slot(ctx->blitter, - ctx->constbuf[PIPE_SHADER_FRAGMENT].cb); - util_blitter_save_vertex_buffer_slot(ctx->blitter, ctx->vtx.vertexbuf.vb); - util_blitter_save_vertex_elements(ctx->blitter, ctx->vtx.vtx); - util_blitter_save_vertex_shader(ctx->blitter, ctx->prog.vp); - util_blitter_save_so_targets(ctx->blitter, ctx->streamout.num_targets, - ctx->streamout.targets); - util_blitter_save_rasterizer(ctx->blitter, ctx->rasterizer); - util_blitter_save_viewport(ctx->blitter, &ctx->viewport); - util_blitter_save_scissor(ctx->blitter, &ctx->scissor); - util_blitter_save_fragment_shader(ctx->blitter, ctx->prog.fp); - util_blitter_save_blend(ctx->blitter, ctx->blend); - util_blitter_save_depth_stencil_alpha(ctx->blitter, ctx->zsa); - util_blitter_save_stencil_ref(ctx->blitter, &ctx->stencil_ref); - util_blitter_save_sample_mask(ctx->blitter, ctx->sample_mask); - util_blitter_save_framebuffer(ctx->blitter, &ctx->framebuffer); - util_blitter_save_fragment_sampler_states(ctx->blitter, - ctx->tex[PIPE_SHADER_FRAGMENT].num_samplers, - (void **)ctx->tex[PIPE_SHADER_FRAGMENT].samplers); - util_blitter_save_fragment_sampler_views(ctx->blitter, - ctx->tex[PIPE_SHADER_FRAGMENT].num_textures, - ctx->tex[PIPE_SHADER_FRAGMENT].textures); - if (!render_cond) - util_blitter_save_render_condition(ctx->blitter, - ctx->cond_query, ctx->cond_cond, ctx->cond_mode); - - if (ctx->batch) - fd_batch_set_stage(ctx->batch, stage); - - ctx->in_blit = discard; -} - -void -fd_blitter_pipe_end(struct fd_context *ctx) -{ - if (ctx->batch) - fd_batch_set_stage(ctx->batch, FD_STAGE_NULL); - ctx->in_blit = false; -} - static void fd_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *prsc) { |