=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Always provide P8 GL texture information.
Alexandre Julliard
julliard at winehq.org
Wed May 14 15:39:06 CDT 2014
Module: wine
Branch: master
Commit: 7b049245f532d355ea0541c9a970d3459144aaf3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b049245f532d355ea0541c9a970d3459144aaf3
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue May 13 16:21:51 2014 +0200
wined3d: Always provide P8 GL texture information.
---
dlls/wined3d/surface.c | 23 ++---------------------
dlls/wined3d/utils.c | 2 +-
2 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e0ba375..8e4b88b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1457,12 +1457,6 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
int src_pitch = 0;
int dst_pitch = 0;
- if (format->id == WINED3DFMT_P8_UINT)
- {
- gl_format = GL_ALPHA;
- gl_type = GL_UNSIGNED_BYTE;
- }
-
if (surface->flags & SFLAG_NONPOW2)
{
unsigned char alignment = surface->resource.device->surface_alignment;
@@ -3211,8 +3205,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
BYTE *mem;
- GLint fmt;
- GLint type;
BYTE *row, *top, *bottom;
int i;
BOOL srcIsUpsideDown;
@@ -3246,18 +3238,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
srcIsUpsideDown = FALSE;
}
- switch (surface->resource.format->id)
- {
- case WINED3DFMT_P8_UINT:
- fmt = GL_ALPHA;
- type = GL_UNSIGNED_BYTE;
- break;
-
- default:
- fmt = surface->resource.format->glFormat;
- type = surface->resource.format->glType;
- }
-
if (data.buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data.buffer_object));
@@ -3270,7 +3250,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
surface->resource.width, surface->resource.height,
- fmt, type, data.addr);
+ surface->resource.format->glFormat,
+ surface->resource.format->glType, data.addr);
checkGLcall("glReadPixels");
/* Reset previous pixel store pack state */
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 044eed0..c077567 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -743,7 +743,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
{WINED3DFMT_P8_UINT, GL_RGBA, GL_RGBA, 0,
GL_ALPHA, GL_UNSIGNED_BYTE, 0,
0,
- ARB_FRAGMENT_PROGRAM, NULL},
+ 0, NULL},
/* Standard ARGB formats */
{WINED3DFMT_B8G8R8_UNORM, GL_RGB8, GL_RGB8, 0,
GL_BGR, GL_UNSIGNED_BYTE, 0,
More information about the wine-cvs
mailing list