On Wed, Oct 3, 2018 at 11:11 AM Henri Verbeet <hverbeet@gmail.com> wrote:
On Wed, 3 Oct 2018 at 19:33, Andrew Wesie <awesie@gmail.com> wrote:
> The problem I was trying to solve is that blit_op = WINED3D_BLIT_OP_RAW_BLIT still needs to happen if we cannot do the download for some reason (e.g. texture sizes don't match). I agree that the change is not obviously correct.
>
> How about moving the upload / download to after the conditionals and verifying blit_op == WINED3D_BLIT_OP_RAW_BLIT?

Yeah, I think that makes sense, and I think it would actually slightly
simplify the upload/download branches.

After testing, one issue is that we need to use wined3d_texture_upload_from_texture in some cases where resolve == 1 otherwise d3d9:test_multisample_init fails on my machine. Currently, we only set blit_op = WINED3D_BLIT_OP_RAW_BLIT when resolve == 0.

In the interest of solving one problem at a time, I'll avoid this for now and do it a different way in v2, though I agree that these branches could use some clean-up.