mesa: allow GL_UNSIGNED_BYTE type for SNORM reads
authorTapani Pälli <tapani.palli@intel.com>
Mon, 27 Aug 2018 11:40:41 +0000 (14:40 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 29 Aug 2018 06:26:23 +0000 (09:26 +0300)
commita72dbc461bdb7714656e62cd8f4b00a404c2e6e0
treec08c98c39f112b88585da0df2d06f4bf9679f45c
parent5db981952ad65010dd140074ca15d4ee3d0686cc
mesa: allow GL_UNSIGNED_BYTE type for SNORM reads

OpenGL ES spec states:
   "For normalized fixed-point rendering surfaces, the combination format
    RGBA and type UNSIGNED_BYTE is accepted."

This fixes following failing VK-GL-CTS tests:

   KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
   KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
   KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
https://bugs.freedesktop.org/show_bug.cgi?id=107658
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Andres Gomez <agomez@igalia.com>
src/mesa/main/readpix.c