wined3d: Call wined3d_cs_emit_update_sub_resource() directly in wined3d_texture_create().
Fixes a regression introduced by commit
490c6d548a
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45996
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
63cd3de5e8
commit
94f499335a
|
@ -3645,6 +3645,8 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
unsigned int sub_count = level_count * layer_count;
|
unsigned int sub_count = level_count * layer_count;
|
||||||
|
unsigned int level, width, height, depth;
|
||||||
|
struct wined3d_box box;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < sub_count; ++i)
|
for (i = 0; i < sub_count; ++i)
|
||||||
|
@ -3660,8 +3662,14 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||||
|
|
||||||
for (i = 0; i < sub_count; ++i)
|
for (i = 0; i < sub_count; ++i)
|
||||||
{
|
{
|
||||||
wined3d_device_update_sub_resource(device, &object->resource,
|
level = i % object->level_count;
|
||||||
i, NULL, data[i].data, data[i].row_pitch, data[i].slice_pitch, 0);
|
width = wined3d_texture_get_level_width(object, level);
|
||||||
|
height = wined3d_texture_get_level_height(object, level);
|
||||||
|
depth = wined3d_texture_get_level_depth(object, level);
|
||||||
|
wined3d_box_set(&box, 0, 0, width, height, 0, depth);
|
||||||
|
|
||||||
|
wined3d_cs_emit_update_sub_resource(device->cs, &object->resource,
|
||||||
|
i, &box, data[i].data, data[i].row_pitch, data[i].slice_pitch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue