util: clean the 24-bit unused field to avoid an issues
authorAndrii Simiklit <andrii.simiklit@globallogic.com>
Wed, 3 Apr 2019 13:51:14 +0000 (16:51 +0300)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 5 Apr 2019 21:33:53 +0000 (21:33 +0000)
commitcade9001b1758ee9b76f365b02822c97a414006a
treebf7519dbe90a18fbb15a25b765b26575f2981224
parentc037dbb0efad573aab1467befd35d2c4f4cdbbce
util: clean the 24-bit unused field to avoid an issues

This is a field of FLOAT_32_UNSIGNED_INT_24_8_REV texture pixel.
OpenGL spec "8.4.4.2 Special Interpretations" is saying:
   "the second word contains a packed 24-bit unused field,
    followed by an 8-bit index"
The spec doesn't require us to clear this unused field
however it make sense to do it to avoid some
undefined behavior in some apps.

Suggested-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110305
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
src/gallium/auxiliary/util/u_format_zs.c