[PATCH 1/2] wined3d: Support stretching compressed format surfaces in surface_cpu_blt(). (original) (raw)

Henri Verbeet hverbeet at gmail.com
Mon Dec 2 06:59:10 CST 2019


On Fri, 29 Nov 2019 at 17:58, Paul Gofman <gofmanp at gmail.com> wrote:

release: - wined3dcontextunmapboaddress(context, &dstdata, 0, 1, &dstrange); + if (upload) + { + struct wined3dboaddress data; + + data.bufferobject = 0; + data.addr = dstmap.data; + + texturelevel = dstsubresourceidx % dsttexture->levelcount; + + wined3dtexturepreparelocation(dsttexture, texturelevel, context, WINED3DLOCATIONTEXTURERGB); + dsttexture->textureops->textureuploaddata(context, wined3dconstboaddress(&data), dstformat, + dstbox, dstmap.rowpitch, dstmap.slicepitch, dsttexture, texturelevel, + WINED3DLOCATIONTEXTURERGB, dstbox->left, dstbox->top, 0); + + wined3dtexturevalidatelocation(dsttexture, texturelevel, WINED3DLOCATIONTEXTURERGB); + wined3dtextureinvalidatelocation(dsttexture, texturelevel, ~WINED3DLOCATIONTEXTURERGB); + + heapfree(dstmap.data); + } + else + { + wined3dcontextunmapboaddress(context, &dstdata, 0, 1, &dstrange); + } + It probably works out in practice because we only jump to "release:" from error paths when "upload" is FALSE, but it doesn't seem right to depend on that. I.e., we should probably explicitly check for success before uploading here.



More information about the wine-devel mailing list