From f08d10705482907e94c9a3768013f6072db6f0c9 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 22 Nov 2018 19:00:03 +0100 Subject: i965: Set the FBO error state INCOMPLETE_ATTACHMENT only for SRGB_R8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally the driver reported GL_FRAMEBUFFER_UNSUPPORTED in all cases, adding more specific error messages was not correct and broke many tests. Mostly revert this and only report GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT for MESA_FORMAT_R_SRGB8. Fixes: ebcde3454552adc6d3fea8af2207aafaba857796 i965: be more specific about FBO completeness errors Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108805 Signed-off-by: Gert Wollny Reviewed-by: Tapani Pälli --- src/mesa/drivers/dri/i965/intel_fbo.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 7e40d61a470..5bcd846a1bc 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -719,7 +719,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) "FBO incomplete: separate stencil unsupported\n"); } if (stencil_mt->format != MESA_FORMAT_S_UINT8) { - fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, + fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED, "FBO incomplete: separate stencil is %s " "instead of S8\n", _mesa_get_format_name(stencil_mt->format)); @@ -750,7 +750,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) */ rb = fb->Attachment[i].Renderbuffer; if (rb == NULL) { - fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT, + fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED, "FBO incomplete: attachment without " "renderbuffer\n"); continue; @@ -771,8 +771,15 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) continue; } + if (rb->Format == MESA_FORMAT_R_SRGB8) { + fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, + "FBO incomplete: Format not color renderable: %s\n", + _mesa_get_format_name(rb->Format)); + continue; + } + if (!brw_render_target_supported(brw, rb)) { - fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, + fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED, "FBO incomplete: Unsupported HW " "texture/renderbuffer format attached: %s\n", _mesa_get_format_name(intel_rb_format(irb))); -- cgit v1.2.3