diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index 6c9d3bb16e8..9f42b22668e 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -12,6 +12,7 @@ #include "svga_resource_buffer.h" #include "svga_resource_texture.h" #include "svga_surface.h" +#include "svga_resource_buffer_upload.h" //#include "util/u_blit_sw.h" #include "util/format/u_format.h" @@ -807,6 +808,13 @@ is_texture_valid_to_copy(struct svga_context *svga, struct svga_buffer *buf = svga_buffer(resource); struct svga_buffer_surface *bufsurf = buf->bufsurf; + if (!bufsurf) { + if (svga_buffer_validate_host_surface(svga, buf, buf->bind_flags) + != PIPE_OK) + return false; + bufsurf = buf->bufsurf; + } + return (bufsurf && bufsurf->surface_state >= SVGA_SURFACE_STATE_UPDATED); } else {