OSDN Git Service

i965/screen: Allow modifiers on sRGB formats
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 28 Aug 2018 20:25:23 +0000 (15:25 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 30 Aug 2018 16:41:50 +0000 (11:41 -0500)
commitd9cf4308ceea3762c1aab48f9c48e12a72162b5a
tree959f5381a8ea710457ed2d46c42118f481a05d49
parent8c1b9882b2e0cde0b1ad9c6844fd5939d3bd4b24
i965/screen: Allow modifiers on sRGB formats

This effectively reverts a26693493570a9d0f0fba1be617e01ee7bfff4db which
was a misguided attempt at protecting intel_query_dma_buf_modifiers from
invalid formats.  Unfortunately, in some internal EGL cases, we can get
an SRGB format validly in this function.  Rejecting such formats caused
us to not allow CCS in some cases where we should have been allowing it.
This regressed the performance of some SynMark tests as well as GfxBench
ALU2, Tessellation and Manhattan 3.0 tests

There's some question of whether or not we really should be using SRGB
"fourcc" formats that aren't actually in drm_foucc.h but there's not
much harm in allowing them through here.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107223
Fixes: a26693493570 "i965/screen: Return false for unsupported..."
Tested-By: Eero Tamminen <eero.t.tamminen@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/mesa/drivers/dri/i965/intel_screen.c