freedreno: Don't bypass fd_draw_vbo() in clear fallback

Otherwise we bypass all the resource-usage tacking.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
This commit is contained in:
Rob Clark
2020-09-08 16:27:54 -07:00
committed by Marge Bot
parent 97e49b223c
commit 74f1c50dc3
4 changed files with 13 additions and 16 deletions

View File

@@ -4,16 +4,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip
dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center
dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner
dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z
dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_rbo_rgb565_depth_component16
dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_rbo_rgb5_a1_depth_component16
dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_rbo_rgba4_depth_component16
dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_tex2d_rgba_depth_component16
dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_tex2d_rgb_depth_component16
dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_rbo_rgb565_stencil_index8
dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_rbo_rgb5_a1_stencil_index8
dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_rbo_rgba4_stencil_index8
dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_tex2d_rgba_stencil_index8
dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_tex2d_rgb_stencil_index8
dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units
dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_l8_npot
dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgb888_npot
@@ -124,7 +114,6 @@ dEQP-GLES3.functional.fbo.msaa.4_samples.rgba8
dEQP-GLES3.functional.fbo.msaa.4_samples.srgb8_alpha8
dEQP-GLES3.functional.fbo.msaa.4_samples.stencil_index8
dEQP-GLES3.functional.fbo.render.recreate_depth_stencil.tex2d_rgba8_depth_rbo_depth_component16
dEQP-GLES3.functional.fbo.render.recreate_depth_stencil.tex2d_rgba8_depth_rbo_depth_component24
dEQP-GLES3.functional.fbo.render.recreate_depth_stencil.tex2d_rgba8_depth_rbo_depth_component32f
dEQP-GLES3.functional.fbo.render.recreate_depth_stencil.tex2d_rgba8_depth_stencil_rbo_depth24_stencil8
dEQP-GLES3.functional.fbo.render.recreate_depth_stencil.tex2d_rgba8_depth_stencil_rbo_depth32f_stencil8

View File

@@ -178,7 +178,10 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers,
struct pipe_framebuffer_state *pfb = &ctx->batch->framebuffer;
struct blitter_context *blitter = ctx->blitter;
fd_blitter_pipe_begin(ctx, false, true, FD_STAGE_CLEAR);
/* Note: don't use discard=true, if there was something to
* discard, that would have been already handled in fd_clear().
*/
fd_blitter_pipe_begin(ctx, false, false, FD_STAGE_CLEAR);
util_blitter_common_clear_setup(blitter, pfb->width, pfb->height,
buffers, NULL, NULL);
@@ -228,7 +231,10 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers,
.max_index = 1,
.instance_count = 1,
};
ctx->draw_vbo(ctx, &info, 0);
pctx->draw_vbo(pctx, &info);
/* We expect that this should not have triggered a change in pfb: */
assert(util_framebuffer_state_equal(pfb, &ctx->framebuffer));
util_blitter_restore_constant_buffer_state(blitter);
util_blitter_restore_vertex_states(blitter);

View File

@@ -413,7 +413,7 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen,
ctx->primtypes = primtypes;
ctx->primtype_mask = 0;
for (i = 0; i < PIPE_PRIM_MAX; i++)
for (i = 0; i <= PIPE_PRIM_MAX; i++)
if (primtypes[i])
ctx->primtype_mask |= (1 << i);

View File

@@ -223,7 +223,8 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
return;
}
if (!info->count_from_stream_output && !info->indirect &&
if (info->mode != PIPE_PRIM_MAX &&
!info->count_from_stream_output && !info->indirect &&
!info->primitive_restart &&
!u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
return;
@@ -287,7 +288,8 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
* so keep the count accurate for non-patch geometry.
*/
unsigned prims;
if (info->mode != PIPE_PRIM_PATCHES)
if ((info->mode != PIPE_PRIM_PATCHES) &&
(info->mode != PIPE_PRIM_MAX))
prims = u_reduced_prims_for_vertices(info->mode, info->count);
else
prims = 0;