diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_buffer.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/virgl/virgl_texture.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c index d4bde39096e..f955b7c624b 100644 --- a/src/gallium/drivers/virgl/virgl_buffer.c +++ b/src/gallium/drivers/virgl/virgl_buffer.c @@ -53,6 +53,16 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx, vs->vws->transfer_get(vs->vws, vbuf->hw_res, box, trans->base.stride, trans->l_stride, trans->offset, level); + /* XXX Consider + * + * glBufferSubData(GL_ARRAY_BUFFER, 0, 12, data1); + * glDrawArrays(..); + * glFlush(); + * glBufferSubData(GL_ARRAY_BUFFER, 0, 12, data2) + * + * readback and flush are both false in the second glBufferSubData call. + * The draw call might end up seeing data2. + */ if (readback || flush) vs->vws->resource_wait(vs->vws, vbuf->hw_res); diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c index 19ae6ff1d3a..53cd038e500 100644 --- a/src/gallium/drivers/virgl/virgl_texture.c +++ b/src/gallium/drivers/virgl/virgl_texture.c @@ -143,6 +143,16 @@ static void *texture_transfer_map_plain(struct pipe_context *ctx, vws->transfer_get(vws, vtex->hw_res, box, trans->base.stride, trans->l_stride, trans->offset, level); + /* XXX Consider + * + * glTexImage2D(..., data1); + * glDrawArrays(); + * glFlush(); + * glTexImage2D(..., data2); + * + * readback and flush are both false in the second glTexImage2D call. The + * draw call might end up seeing data2. + */ if (readback || flush) vws->resource_wait(vws, vtex->hw_res); |