[PATCH 5/5] wined3d: Make sure the correct texture is bound in device_update_volume.

Matteo Bruni mbruni at codeweavers.com
Wed Feb 18 07:20:49 CST 2015


This avoids GL errors like:

err:d3d:wined3d_debug_callback 0x177708: "GL_INVALID_VALUE error
generated. Size and/or offset out of range.".
err:d3d_surface:wined3d_volume_upload_data >>>>>>>>>>>>>>>>>
GL_INVALID_VALUE (0x501) from glTexSubImage3D @ volume.c / 115

As an optimization we could potentially avoid the double bind at texture
creation time. The same applies to the 2D textures codepath though.
---
 dlls/wined3d/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 649f324..8cab927 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3501,6 +3501,7 @@ static HRESULT device_update_volume(struct wined3d_device *device,
 
     /* Only a prepare, since we're uploading the entire volume. */
     wined3d_texture_prepare_texture(dst_volume->container, context, FALSE);
+    wined3d_texture_bind(dst_volume->container, context, FALSE);
 
     data.buffer_object = 0;
     data.addr = src.data;
-- 
2.0.5




More information about the wine-patches mailing list