[Mesa-dev] [PATCH 2/2] i965: Set the FBO error state INCOMPLETE_ATTACHMENT only for SRGB_R8
Tapani Pälli
tapani.palli at intel.com
Wed Nov 28 06:48:02 UTC 2018
On 11/22/18 8:00 PM, Gert Wollny wrote:
> 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
Like with patch 1, fix 'Fixes', with that
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
> Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
> ---
> src/mesa/drivers/dri/i965/intel_fbo.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
> index 7e40d61a47..5bcd846a1b 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)));
>
More information about the mesa-dev
mailing list