-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-08-22 10:25, schrieb Henri Verbeet:
Yeah, I'm not particularly happy about it either. The issue is that scratch resources allow some extra formats over sysmem resources, but can't be used for resource uploads. The idea is to eventually push the concept of pools out into d3d8 and d3d9, and just have access flags in wined3d, but we'd still need to be able to distinguish scratch resources from sysmem resources somehow. At the moment I'm thinking the better option would be to pass that through the creation flags instead, i.e. have a flag like WINED3D_SURFACE_SCRATCH, although ideally at the resource level.
I think it's best to check the pool in operations that accept a resource as parameter. We already do that in most places. Update_texture on volumes doesn't, but a later patch in my series fixes that.
And yeah, long-term we want pool and usage to go away from wined3d and stay in d3d8/9.
Wrt wined3d_volume_validate_location and wined3d_volume_invalidate_location: Should validate_location(LOCATION_X) just add LOCATION_X to the valid locations, or invalidate all others? (i.e., should it do a logical or or an assignment)? I currently implement it as logical or, so in some cases the caller is responsible for calling invalidate_location on the other locations.