Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/texture.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index dadcd0323a0f..0b0545394cc7 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1919,15 +1919,20 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s target = wined3d_texture_get_sub_resource_target(texture, sub_resource_idx); level = sub_resource_idx % texture->level_count;
- if (target == GL_TEXTURE_1D_ARRAY) - { - dst_y = sub_resource_idx / texture->level_count; - update_h = 1; - } - else if (target == GL_TEXTURE_2D_ARRAY) + switch (target) { - dst_z = sub_resource_idx / texture->level_count; - update_d = 1; + case GL_TEXTURE_1D_ARRAY: + dst_y = sub_resource_idx / texture->level_count; + update_h = 1; + break; + case GL_TEXTURE_2D_ARRAY: + dst_z = sub_resource_idx / texture->level_count; + update_d = 1; + break; + case GL_TEXTURE_2D_MULTISAMPLE: + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + FIXME("Not supported for multisample textures.\n"); + return; }
bo.buffer_object = data->buffer_object;