boolean rebind;
void *map;
+ if (swc->force_coherent) {
+ flags |= PIPE_TRANSFER_PERSISTENT | PIPE_TRANSFER_COHERENT;
+ }
map = swc->surface_map(swc, sbuf->handle, flags, retry, &rebind);
if (map && rebind) {
enum pipe_error ret;
ret = SVGA3D_BindGBSurface(swc, sbuf->handle);
assert(ret == PIPE_OK);
}
- if (swc->force_coherent) {
- ret = SVGA3D_UpdateGBSurface(swc, sbuf->handle);
- if (ret != PIPE_OK) {
- /* flush and retry */
- svga_context_flush(svga, NULL);
- ret = SVGA3D_UpdateGBSurface(swc, sbuf->handle);
- assert(ret == PIPE_OK);
- }
- }
}
} else
sws->buffer_unmap(sws, sbuf->hwbuf);
unsigned offset, mip_width, mip_height;
struct svga_winsys_context *swc = svga->swc;
+ if (swc->force_coherent) {
+ usage |= PIPE_TRANSFER_PERSISTENT | PIPE_TRANSFER_COHERENT;
+ }
+
map = swc->surface_map(swc, surf, usage, &retry, &rebind);
if (map == NULL && retry) {
/*
ret = SVGA3D_BindGBSurface(swc, surf);
assert(ret == PIPE_OK);
}
- if (swc->force_coherent) {
- ret = SVGA3D_UpdateGBSurface(swc, surf);
- if (ret != PIPE_OK) {
- /* flush and retry */
- svga_context_flush(svga, NULL);
- ret = SVGA3D_UpdateGBSurface(swc, surf);
- assert(ret == PIPE_OK);
- }
- }
}
}