mesa/src
Xiong, James f23b45dce3 i965: return the fourcc saved in __DRIimage when possible
When creating a image from a texture, the image's dri_format is
set to the first plane's format, and used to look up for the
fourcc. e.g. for FOURCC_NV12 texture, the dri_format is set to
__DRI_IMAGE_FORMAT_R8, we end up with a wrong entry in function
intel_lookup_fourcc():
   { __DRI_IMAGE_FOURCC_R8, __DRI_IMAGE_COMPONENTS_R, 1,
     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, } },
instead of the correct one:
   { __DRI_IMAGE_FOURCC_NV12, __DRI_IMAGE_COMPONENTS_Y_UV, 2,
     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
       { 1, 1, 1, __DRI_IMAGE_FORMAT_GR88, 2 } } },
as a result, a wrong fourcc __DRI_IMAGE_FOURCC_R8 was returned.

To fix this bug, the image inherits the texture's planar_format that
has the original fourcc; Upon querying, if planar_format is set,
return the saved fourcc; Otherwise fall back to the old way.

v3: add a bug description and "cc mesa-stable" tag (Jason)
  remove redundant null pointer check (Tapani)
  squash 2 patches into one (James)
v2: fall back to intel_lookup_fourcc() when planar_format is NULL
  (Dongwon & Matt Roper)

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Xiong, James <james.xiong@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-04-09 18:16:59 +03:00
..
amd radv: fix prefetching of vertex shader and VBOs on SI 2018-04-09 16:14:12 +02:00
broadcom util: Move util_is_power_of_two to bitscan.h and rename to util_is_power_of_two_or_zero 2018-03-29 14:09:23 -07:00
compiler nir: Fix a typo in src/compiler/Makefile.nir.am 2018-04-09 08:32:45 -06:00
egl x11: Only report supported DRI3/Present versions 2018-03-30 16:53:51 +01:00
gallium st/nine: Do not use scratch for face register 2018-04-08 22:49:43 +02:00
gbm gbm: remove never-implemented function 2018-03-28 16:25:52 +01:00
getopt
glx meson: fix warnings about comparing unlike types 2018-04-06 15:29:53 -07:00
gtest autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
hgl meson: Add Haiku platform support v4 2018-02-16 16:56:34 -06:00
intel intel/compiler: Explicitly cast register type in switch 2018-04-06 15:22:10 -07:00
loader dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
mapi glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2) 2018-03-30 14:33:33 -06:00
mesa i965: return the fourcc saved in __DRIimage when possible 2018-04-09 18:16:59 +03:00
util util: Include bitscan.h directly 2018-03-29 14:09:30 -07:00
vulkan vulkan: Update the XML and headers to 1.1.72 2018-04-09 14:28:13 +02:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
meson.build meson: fix building without GL 2018-02-26 09:32:14 -08:00
SConscript buildsys: move file regeneration logic to the script itself 2017-10-27 13:38:37 +01:00