[PATCH 3/5] wined3d: Surfaces always have a container in surface_prepare_texture().
Henri Verbeet
hverbeet at codeweavers.com
Tue Nov 19 03:28:48 CST 2013
---
dlls/wined3d/surface.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 20b5c5f..f054b43 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3940,24 +3940,19 @@ static void surface_prepare_texture_internal(struct wined3d_surface *surface,
/* Context activation is done by the caller. */
void surface_prepare_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb)
{
- if (surface->container)
- {
- struct wined3d_texture *texture = surface->container;
- UINT sub_count = texture->level_count * texture->layer_count;
- UINT i;
-
- TRACE("surface %p is a subresource of texture %p.\n", surface, texture);
+ struct wined3d_texture *texture = surface->container;
+ UINT sub_count = texture->level_count * texture->layer_count;
+ UINT i;
- for (i = 0; i < sub_count; ++i)
- {
- struct wined3d_surface *s = surface_from_resource(texture->sub_resources[i]);
- surface_prepare_texture_internal(s, context, srgb);
- }
+ TRACE("surface %p is a subresource of texture %p.\n", surface, texture);
- return;
+ for (i = 0; i < sub_count; ++i)
+ {
+ struct wined3d_surface *s = surface_from_resource(texture->sub_resources[i]);
+ surface_prepare_texture_internal(s, context, srgb);
}
- surface_prepare_texture_internal(surface, context, srgb);
+ return;
}
void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample)
--
1.7.10.4
More information about the wine-patches
mailing list