Permalink
Browse files

Fixing incorrect hwc-comparator, which could cause too many GL contex…

…ts to be created in certain cases
  • Loading branch information...
pmh47 committed Sep 20, 2018
1 parent 6c61dd2 commit 7966f8138526e1c1c2a072a2f0cbc298fe5bcb9c
Showing with 6 additions and 2 deletions.
  1. +6 −2 csrc/hwc.h
View
@@ -6,11 +6,15 @@
struct HWC
{
// This captures the attributes that must be the same for two kernel-instances to share the same context / threads
// This captures the attributes (apart from cuda-context) that must be the same for two kernel-instances to share the same gl-context / threads
int height, width, channels;
bool operator <(HWC const &other) const {
return height < other.height || width < other.width || channels < other.channels;
return height < other.height || (
height == other.height && (width < other.width || (
width == other.width && channels < other.channels)
)
);
}
};

0 comments on commit 7966f81

Please sign in to comment.