On Wed, 29 Sept 2021 at 18:04, Zebediah Figura (she/her) zfigura@codeweavers.com wrote:
On 9/29/21 10:48, Henri Verbeet wrote:
On Tue, 28 Sept 2021 at 23:28, Zebediah Figura zfigura@codeweavers.com wrote:
@@ -2749,6 +2751,7 @@ void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_conte op->box = *box; op->bo.addr.buffer_object = 0; op->bo.addr.addr = data;
- op->bo.flags = UPLOAD_BO_UPLOAD_ON_UNMAP; op->row_pitch = row_pitch; op->slice_pitch = slice_pitch;
Do we need UPLOAD_BO_UPLOAD_ON_UNMAP here? It seems a little out of place, and wined3d_cs_exec_update_sub_resource() doesn't appear to use it.
No, I suppose we don't. Thinking too far ahead...
Although if we obsolesce UPLOAD_BO_UPLOAD_ON_UNMAP entirely, which is possible, that does mean we can't use it for deferred contexts as you suggest below. (And if we don't, it's mildly weird not to pass it here.)
Is it? My understanding was that UPLOAD_ON_UNMAP was primarily for wined3d_device_context_emit_unmap(), to distinguish the case where we got a reference to the original buffer object. (As is the case with NOOVERWRITE maps on deferred contexts, but we could conceivably do that on immediate contexts as well in some cases.)