[PATCH 1/8] wined3d: Retrieve FBO attachments from GL in context_check_fbo_status.

Henri Verbeet hverbeet at gmail.com
Tue Feb 16 08:04:30 CST 2016


On 14 February 2016 at 21:33, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> +        if (gl_info->supported[EXT_FRAMEBUFFER_MULTISAMPLE])
> +            gl_info->fbo_ops.glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_SAMPLES, &samples);
> +        else
> +            samples = 1;
I don't think this will do the right thing in core contexts, or if
only ARB_framebuffer_object is supported.

> +        gl_info->fbo_ops.glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_INTERNAL_FORMAT, &fmt);
> +        FIXME("\t%s: renderbuffer %d, %dx%d, %d samples, format %x.\n",
> +                debug_fboattachment(attachment), name, width, height, samples, fmt);
The '\t' is from the original code of course, but please just replace
it with spaces.

> +        FIXME("\t%s: %s texture %d, %dx%d, format %x.\n", debug_fboattachment(attachment),
> +                tex_type_str, name, width, height, fmt);
%#x for hexadecimal, please.

> +#define FBOATTACHMENT_TO_STR(u) case u: return #u
The existing functions are a bit of a mess in this regard, but I'd
prefer "WINED3D_TO_STR" for new functions.

> +            FIXME("Unrecognied FBO status 0x%08x\n", attachment);
> +            return "unrecognized";
The FIXME has room for improvement. You could also consider doing
something like "return wine_dbg_sprintf("unknown attachment %#x",
attachment);"



More information about the wine-devel mailing list