diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 843905a..fa8d768 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1685,7 +1685,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment); checkGLcall("glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment);"); - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment); + gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ALIGNMENT, 1); checkGLcall("glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment);"); if (gl_info->supported[ARB_VERTEX_BLEND]) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d515a3a..c8e4cb1 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4238,7 +4238,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, format.byte_count = format.conv_byte_count; dst_pitch = wined3d_format_calculate_pitch(&format, width); - dst_pitch = (dst_pitch + device->surface_alignment - 1) & ~(device->surface_alignment - 1); if (!(mem = HeapAlloc(GetProcessHeap(), 0, dst_pitch * height))) { diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 0d13dd0..91325dc 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -84,7 +84,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine { UINT dst_row_pitch, dst_slice_pitch; UINT src_row_pitch, src_slice_pitch; - UINT alignment = volume->resource.device->surface_alignment; if (data->buffer_object) ERR("Loading a converted volume from a PBO.\n"); @@ -92,7 +91,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine ERR("Converting a block-based format.\n"); dst_row_pitch = width * format->conv_byte_count; - dst_row_pitch = (dst_row_pitch + alignment - 1) & ~(alignment - 1); dst_slice_pitch = dst_row_pitch * height; wined3d_volume_get_pitch(volume, &src_row_pitch, &src_slice_pitch);