Skip to content

Commit

Permalink
workaround buggy program compare
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@5157 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 9, 2014
1 parent f3df745 commit b0be14c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/xpra/codecs/csc_opencl/colorspace_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,14 @@ def convert_image(self, image, retry=0):
debug("old context=%s, new context=%s", self.context, context)
log.info("using new OpenCL context (context changed)")
self.init_with_device()
elif self.program!=program:
debug("old program=%s, new program=%s", self.program, program)
#we should be able to compare program!=self.program
#but it has been reported that this does not work in some cases
#so the code below is a more obscure way of doing the same thing
#which unfortunately only works on PyOpenCL versions 2013.2 and later
#Note: at the moment, program only changes when the context does,
#so this will probably *never* even fire, for now at least.
elif hasattr(self.program, "int_ptr") and self.program.int_ptr!=program.int_ptr:
debug("old program=%s (int_ptr=%s), new program=%s (int_ptr=%s)", self.program, self.program.int_ptr, program, program.int_ptr)
log.info("using new OpenCL context (program changed)")
self.init_with_device()
try:
Expand Down

0 comments on commit b0be14c

Please sign in to comment.