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 <brianp@vmware.com>
This commit is contained in:
Charmaine Lee 2016-02-29 12:00:12 -08:00 committed by Brian Paul
parent 395c7b8fa1
commit 8366701f4c

View file

@ -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) {