Henri Verbeet : wined3d: Bind the texture before calling wined3d_volume_upload_data() in wined3d_volume_load_location().
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 16 07:56:28 CDT 2015
Module: wine
Branch: master
Commit: 52478e38095e8d1c70fcdbcfb091dee419c37bc6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=52478e38095e8d1c70fcdbcfb091dee419c37bc6
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Apr 16 11:26:33 2015 +0200
wined3d: Bind the texture before calling wined3d_volume_upload_data() in wined3d_volume_load_location().
---
dlls/wined3d/volume.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 91325dc..357608f 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -64,6 +64,8 @@ void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pit
TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
}
+/* This call just uploads data, the caller is responsible for binding the
+ * correct texture. */
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data)
@@ -273,11 +275,15 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
else if (volume->locations & WINED3D_LOCATION_SYSMEM)
{
struct wined3d_const_bo_address data = {0, volume->resource.heap_memory};
+ wined3d_texture_bind_and_dirtify(volume->container, context,
+ location == WINED3D_LOCATION_TEXTURE_SRGB);
wined3d_volume_upload_data(volume, context, &data);
}
else if (volume->locations & WINED3D_LOCATION_BUFFER)
{
struct wined3d_const_bo_address data = {volume->pbo, NULL};
+ wined3d_texture_bind_and_dirtify(volume->container, context,
+ location == WINED3D_LOCATION_TEXTURE_SRGB);
wined3d_volume_upload_data(volume, context, &data);
}
else if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB)
More information about the wine-cvs
mailing list