On 5/17/22 10:27, Stefan Dösinger wrote:
Signed-off-by: Stefan Dösinger stefan@codeweavers.com
dlls/wined3d/resource.c | 6 ++++++ dlls/wined3d/texture.c | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-)
The subject here isn't as specific as it could be. Note that there's basically two patches to this, anyway:
* avoid clearing block formats,
* use wined3d_resource_memory_colour_fill() to clear sysmem in wined3d_texture_load_location().
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index fe77923f778..3b76e7ab0cf 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -632,6 +632,12 @@ void wined3d_resource_memory_colour_fill(struct wined3d_resource *resource, return; }
- if (resource->format_flags & WINED3DFMT_FLAG_BLOCKS)
- {
FIXME("Not implemented for format %s.\n", debug_d3dformat(resource->format->id));
return;
- }
w = box->right - box->left; h = box->bottom - box->top; d = box->back - box->front;
Isn't this already covered in wined3d_format_convert_from_float(), though? And if we do implement clearing block formats, we'd want to implement it there.
If we want to avoid touching sysmem in that case, assuming we even care, I'd advocate for returning bool from that function instead.