Module: wine
Branch: master
Commit: c5bf229287b820b26f8fe9d7f5cbd7ec0b369f9d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5bf229287b820b26f8fe9d7f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Mon Oct 6 08:24:20 2014 +0200
wined3d: Print a FIXME for any unhandled format in d3dfmt_get_conv().
---
dlls/wined3d/surface.c | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9d41fef..f2be4c9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1625,24 +1625,18 @@ static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alp
dst_format_id = color_key_info[i].dst_format;
break;
}
- }
- if (texture->resource.format->id == WINED3DFMT_P8_UINT)
- {
- /* FIXME: This should check if the blitter backend can do P8
- * conversion, instead of checking for ARB_fragment_program. */
- if (!((gl_info->supported[ARB_FRAGMENT_PROGRAM] && texture->swapchain
- && texture == texture->swapchain->front_buffer)) || colorkey_active)
- {
- *conversion_type = WINED3D_CT_P8;
- dst_format_id = WINED3DFMT_B8G8R8A8_UNORM;
- }
+ FIXME("Color-keying not supported with format %s.\n", debug_d3dformat(texture->resource.format->id));
}
- else if (texture->resource.format->id == WINED3DFMT_B2G3R3_UNORM && colorkey_active)
+
+ /* FIXME: This should check if the blitter backend can do P8 conversion,
+ * instead of checking for ARB_fragment_program. */
+ if (texture->resource.format->id == WINED3DFMT_P8_UINT
+ && (!(gl_info->supported[ARB_FRAGMENT_PROGRAM] && texture->swapchain
+ && texture == texture->swapchain->front_buffer) || colorkey_active))
{
- /* This texture format will never be used... So do not care about
- * color-keying up until the point in time it will be needed. */
- FIXME("Color-keying not supported with WINED3DFMT_B2G3R3_UNORM.\n");
+ *conversion_type = WINED3D_CT_P8;
+ dst_format_id = WINED3DFMT_B8G8R8A8_UNORM;
}
if (*conversion_type != WINED3D_CT_NONE)
Module: wine
Branch: master
Commit: b0ce89d81015fe23ecc4584e1e2dea17960e5c33
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0ce89d81015fe23ecc4584e1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Mon Oct 6 08:24:18 2014 +0200
wined3d: Just use glGammaInternal/rtInternal from the destination format in d3dfmt_get_conv().
Using glGammaInternal or rtInternal should do the right thing in principle,
although in practice they should never get used either way.
---
dlls/wined3d/surface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a8e0f51..41dc2ac 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1649,8 +1649,8 @@ static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alp
{
dst_format = wined3d_get_format(gl_info, dst_format_id);
format->glInternal = dst_format->glInternal;
- format->glGammaInternal = format->glInternal;
- format->rtInternal = format->glInternal;
+ format->glGammaInternal = dst_format->glGammaInternal;
+ format->rtInternal = dst_format->rtInternal;
format->glFormat = dst_format->glFormat;
format->glType = dst_format->glType;
format->conv_byte_count = dst_format->byte_count;