[PATCH 3/8] wined3d: Keep track of renderbuffer capabilities.

Henri Verbeet hverbeet at gmail.com
Tue May 26 07:15:40 CDT 2015


On 26 May 2015 at 13:33, Stefan Dösinger <stefandoesinger at gmail.com> wrote:
> I'd have to move or duplicate the power of two size calculation
> (texture.c lines 1092 - 1123) to resource_init, and I don't think the
> generic resource code should have to deal with this functionality that
> is very specific to 2D textures. Passing a "this is a np2 texture"
> flag to resource_init is a possible option, but it would still take
> quite a bit of 2D texture specific code along with it (in particular
> the switch between true NP2, faked WINED3D_GL_NORMALIZED_TEXRECT NP2,
> ARB_texture_rectangle and 2D texture emulated NP2).
>
You don't really need pow2_width/pow2_height itself though, you just
need to determine if the resource dimensions are powers of two, which
is much easier. (I.e., "!(desc->width & desc->width - 1)", etc.)



More information about the wine-devel mailing list