aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-25 17:56:10 +0100
committermarha <marha@users.sourceforge.net>2014-03-25 17:56:10 +0100
commitba6115f56f066621a20fa545ddd67721afd35523 (patch)
tree418b724d4f318d24dc8e5183e6b252922f85f149 /mesalib/src/mesa/state_tracker/st_atom_texture.c
parenteb71c0f23999d1cc156e1821d73634ec79621fc2 (diff)
parente0927d908a12c9c140458c355b29b884a7705f2d (diff)
downloadvcxsrv-ba6115f56f066621a20fa545ddd67721afd35523.tar.gz
vcxsrv-ba6115f56f066621a20fa545ddd67721afd35523.tar.bz2
vcxsrv-ba6115f56f066621a20fa545ddd67721afd35523.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/hw/xwin/InitInput.c xorg-server/hw/xwin/InitOutput.c xorg-server/hw/xwin/winglobals.c xorg-server/hw/xwin/winglobals.h xorg-server/hw/xwin/winmsgwindow.c xorg-server/hw/xwin/winmultiwindowwm.c xorg-server/hw/xwin/winmultiwindowwndproc.c
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index 3557a3fbe..75e6face4 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -198,6 +198,16 @@ st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj,
if (!stObj->sampler_view) {
stObj->sampler_view =
st_create_texture_sampler_view_from_stobj(pipe, stObj, samp, format);
+
+ } else if (stObj->sampler_view->context != pipe) {
+ /* Recreate view in correct context, use existing view as template */
+ /* XXX: This isn't optimal, we should try to use more than one view.
+ Otherwise we create/destroy the view all the time
+ */
+ struct pipe_sampler_view *sv =
+ pipe->create_sampler_view(pipe, stObj->pt, stObj->sampler_view);
+ pipe_sampler_view_reference(&stObj->sampler_view, NULL);
+ stObj->sampler_view = sv;
}
return stObj->sampler_view;