freedreno: arb_sample_shading-builtin-gl-sample-id failure (works with FD_MESA_DEBUG=flush)
Failing tests:
arb_sample_shading-builtin-gl-sample-id 4 -auto
arb_sample_shading-builtin-gl-sample-mask 2 -auto
arb_sample_shading-builtin-gl-sample-mask 4 -auto
However they do pass with FD_MESA_DEBUG=flush
And a small patch to fix crash in fd_blitter_clear
with forced flush:
diff --git a/src/gallium/drivers/freedreno/freedreno_blitter.c b/src/gallium/drivers/freedreno/freedreno_blitter.c
index e8e2972c462..cfa0ef64453 100644
--- a/src/gallium/drivers/freedreno/freedreno_blitter.c
+++ b/src/gallium/drivers/freedreno/freedreno_blitter.c
@@ -175,7 +175,7 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers,
const union pipe_color_union *color, double depth, unsigned stencil)
{
struct fd_context *ctx = fd_context(pctx);
- struct pipe_framebuffer_state *pfb = &ctx->batch->framebuffer;
+ struct pipe_framebuffer_state *pfb = &ctx->framebuffer;
struct blitter_context *blitter = ctx->blitter;
/* Note: don't use discard=true, if there was something to
Essentially these tests are doing:
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, multisampled_fbo);
glClear(GL_COLOR_BUFFER_BIT);
draw
glBindFramebuffer(GL_READ_FRAMEBUFFER, multisampled_fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, multisampled_tex_fbo);
glBlitFramebuffer(..., GL_COLOR_BUFFER_BIT, ...);
glBindFramebuffer(GL_READ_FRAMEBUFFER, multisampled_tex_fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
draw, reading from the texture backing multisampled_tex
Without forcing flush the destination of blit does not contain what was drawn before. I'm unsure how to proceed in debugging the issue.