On 12/5/22 16:07, Paul Gofman wrote:
On 12/5/22 16:06, Zebediah Figura wrote:
On 12/5/22 15:24, Paul Gofman (@gofman) wrote:
So for a general case syncing surfaces for software devices only is wrong (it still looks right for syncing render targets). Just always traversing all the bound textures in d3d_device_sync_surfaces() looks like a waste, while accurately tracking when there are bound textures requiring sync is possible while looks like an unnecessary complication. So triggering the sync by the fact a texture requiring a sync was ever bound (which is in fact not so common case) looks like a reasonable compromise to me.
From my armchair, it doesn't seem that complicated? I'd think you could do something like the attached patch (on top of this one).
I am afraid it won't work correctly with saved stateblocks?
Hmm, right.
It doesn't strike me as that bad to handle that in ApplyStateBlock too, much like we do for sysmem buffers in d3d8/9, but I suppose this patch is fine as-is too.