wined3d: Remove call to d3dfmt_get_conv from read_from_framebuffer_texture.
This commit is contained in:
parent
1a61f46bbb
commit
2a949ec323
|
@ -1487,13 +1487,9 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
|
||||||
IWineD3DDeviceImpl *device = This->resource.device;
|
IWineD3DDeviceImpl *device = This->resource.device;
|
||||||
const struct wined3d_gl_info *gl_info;
|
const struct wined3d_gl_info *gl_info;
|
||||||
struct wined3d_context *context;
|
struct wined3d_context *context;
|
||||||
struct wined3d_format_desc desc;
|
|
||||||
CONVERT_TYPES convert;
|
|
||||||
GLint prevRead;
|
GLint prevRead;
|
||||||
BOOL alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED;
|
BOOL alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED;
|
||||||
|
|
||||||
d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &desc, &convert);
|
|
||||||
|
|
||||||
/* Activate the surface to read from. In some situations it isn't the currently active target(e.g. backbuffer
|
/* Activate the surface to read from. In some situations it isn't the currently active target(e.g. backbuffer
|
||||||
* locking during offscreen rendering). RESOURCELOAD is ok because glCopyTexSubImage2D isn't affected by any
|
* locking during offscreen rendering). RESOURCELOAD is ok because glCopyTexSubImage2D isn't affected by any
|
||||||
* states in the stateblock, and no driver was found yet that had bugs in that regard.
|
* states in the stateblock, and no driver was found yet that had bugs in that regard.
|
||||||
|
@ -1535,7 +1531,7 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
|
||||||
|
|
||||||
if (!(This->Flags & alloc_flag))
|
if (!(This->Flags & alloc_flag))
|
||||||
{
|
{
|
||||||
surface_allocate_surface(This, gl_info, &desc, srgb, This->pow2Width, This->pow2Height);
|
surface_allocate_surface(This, gl_info, This->resource.format_desc, srgb, This->pow2Width, This->pow2Height);
|
||||||
This->Flags |= alloc_flag;
|
This->Flags |= alloc_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue