[PATCH 2/7] wined3d: Move srgb checks away from d3dfmt_get_conv.

Henri Verbeet hverbeet at gmail.com
Wed Dec 28 00:46:09 CST 2011


On 26 December 2011 05:32, Diego Nieto Cid <dnietoc at gmail.com> wrote:
> trace:d3d_surface:surface_allocate_surface (0x1a25f0) : Creating surface (target 0xde1)  level 0, d3d format WINED3DFMT_P8_UINT, internal format 0x80e5, width 1024, height 512, gl format 0x1908, gl type=0x1401
> err:d3d_surface:surface_allocate_surface >>>>>>>>>>>>>>>>> GL_INVALID_VALUE (0x501) from glTexImage2D @ surface.c / 2571
>
Does your hardware really support EXT_paletted_texture? That's somewhat unusual.

> It's located in d3dfmt_get_conv under the WINED3DFMT_P8_UINT case. For
> some reason only glInternal is updated by the conversion. In any case it
> didn't matter before the patch as none of the internal values were
> actually used in case a conversion was applied.
>
> Should the three internal values be updated by the conversion now that
> any of them could be used?
Probably, yeah. Not just for WINED3DFMT_P8_UINT, but for all the
formats in d3dfmt_get_conv(). I guess something like the following at
the end of d3dfmt_get_conv() should work:

if (*convert != NO_CONVERSION)
{
    format->glGammaInternal = format->glInternal;
    format->rtInternal = format->glInternal;
}

> Even if it would work I'm not sure how
> correct would be to do that.
>
The whole surface conversion code is pretty ugly and fragile, unfortunately.



More information about the wine-devel mailing list