st/mesa: Fix GL_MAP_COLOR with glDrawPixels GL_COLOR_INDEX
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Wed, 3 Apr 2019 15:09:24 +0000 (18:09 +0300)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 4 Apr 2019 14:38:32 +0000 (10:38 -0400)
commit3fdfface3ece93b55ba39dd987dd0962ac37bcdf
tree054c4e53e41d2129189611dcbffb8e4f00091ecb
parentf6ceed205c23164b20d07d30dbd1a4d2451220ac
st/mesa: Fix GL_MAP_COLOR with glDrawPixels GL_COLOR_INDEX

Documentation for glDrawPixels with GL_COLOR_INDEX says:
 "If the GL is in color index mode, and if GL_MAP_COLOR is true,
  the index is replaced with the value that it references in
  lookup table GL_PIXEL_MAP_I_TO_I"

We are always in RGBA mode and there is nothing in documentation
about GL_MAP_COLOR in RGBA mode for GL_COLOR_INDEX.

Scale and bias are also only applicable for RGBA format and not
mentioned for GL_COLOR_INDEX.

Thus the behaviour will be on par with i965.

Fixes: gl-1.0-drawpixels-color-index
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_drawpixels.c