From: Charmaine Lee Date: Mon, 29 Feb 2016 20:00:12 +0000 (-0800) Subject: svga: fix an error in svga_texture_generate_mipmap X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8366701f4cb6d297623607e922d151dc05f69811;p=mesa.git svga: fix an error in svga_texture_generate_mipmap With this patch, make sure the shader resource view is properly created before referencing it in the generate mipmap command. Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 3f754c4d53e..e898ff2c4e6 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -1038,7 +1038,12 @@ svga_texture_generate_mipmap(struct pipe_context *pipe, return FALSE; sv = svga_pipe_sampler_view(psv); - svga_validate_pipe_sampler_view(svga, sv); + ret = svga_validate_pipe_sampler_view(svga, sv); + if (ret != PIPE_OK) { + svga_context_flush(svga, NULL); + ret = svga_validate_pipe_sampler_view(svga, sv); + assert(ret == PIPE_OK); + } ret = SVGA3D_vgpu10_GenMips(svga->swc, sv->id, tex->handle); if (ret != PIPE_OK) {