wined3d: Use the texture dimension helpers in texture2d_prepare_texture().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-04-19 18:34:06 +02:00 committed by Alexandre Julliard
parent a4fa702488
commit 70f1d0efdc
1 changed files with 3 additions and 2 deletions

View File

@ -1345,9 +1345,10 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
for (i = 0; i < sub_count; ++i)
{
struct wined3d_surface *surface = texture->sub_resources[i].u.surface;
GLsizei height = surface->pow2Height;
GLsizei width = surface->pow2Width;
GLsizei width, height;
width = wined3d_texture_get_level_pow2_width(texture, surface->texture_level);
height = wined3d_texture_get_level_pow2_height(texture, surface->texture_level);
if (texture->resource.format_flags & WINED3DFMT_FLAG_HEIGHT_SCALE)
{
height *= format->height_scale.numerator;