On 08/18/2016 04:45 PM, Ilia Mirkin wrote:
Since it *is* a hash, you could just use a much simpler hash function like
int hash(int val) {
int ret = val + 1000;
if (ret == 0) ret = 1;
return ret;
}
That way everything will map to a unique integer, except for -1000
which will map to the s
On 08/18/2016 09:08 PM, Eric Anholt wrote:
Tapani Pälli writes:
Implementation previously used case value itself as the key, however
afterhash implementation change by ee02a5e we cannot use 0 as key.
Patch uses _mesa_hash_data to formulate a suitable key for this hash.
Signed-off-by: Tapani
Tapani Pälli writes:
> Implementation previously used case value itself as the key, however
> afterhash implementation change by ee02a5e we cannot use 0 as key.
> Patch uses _mesa_hash_data to formulate a suitable key for this hash.
>
> Signed-off-by: Tapani Pälli
> Bugzilla: https://bugs.freede
Since it *is* a hash, you could just use a much simpler hash function like
int hash(int val) {
int ret = val + 1000;
if (ret == 0) ret = 1;
return ret;
}
That way everything will map to a unique integer, except for -1000
which will map to the same thing as -999. I posit that this should be
Can the hash value not be 0?
On Aug 18, 2016 4:57 AM, "Tapani Pälli" wrote:
> Implementation previously used case value itself as the key, however
> afterhash implementation change by ee02a5e we cannot use 0 as key.
> Patch uses _mesa_hash_data to formulate a suitable key for this hash.
>
> Sign
On Thu, 2016-08-18 at 14:25 +0300, Tapani Pälli wrote:
> On 08/18/2016 01:08 PM, Iago Toral wrote:
> >
> > On Thu, 2016-08-18 at 11:57 +0300, Tapani Pälli wrote:
> > >
> > > Implementation previously used case value itself as the key,
> > > however
> > > afterhash implementation change by ee02a5e
On 08/18/2016 01:08 PM, Iago Toral wrote:
On Thu, 2016-08-18 at 11:57 +0300, Tapani Pälli wrote:
Implementation previously used case value itself as the key, however
afterhash implementation change by ee02a5e we cannot use 0 as key.
Patch uses _mesa_hash_data to formulate a suitable key for this
On Thu, 2016-08-18 at 11:57 +0300, Tapani Pälli wrote:
> Implementation previously used case value itself as the key, however
> afterhash implementation change by ee02a5e we cannot use 0 as key.
> Patch uses _mesa_hash_data to formulate a suitable key for this hash.
>
> Signed-off-by: Tapani Pälli
Implementation previously used case value itself as the key, however
afterhash implementation change by ee02a5e we cannot use 0 as key.
Patch uses _mesa_hash_data to formulate a suitable key for this hash.
Signed-off-by: Tapani Pälli
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97309
--