OSDN Git Service

i965/gen9: Configure rbc buffers as plain for non-rbc tex views
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 31 May 2016 07:36:12 +0000 (10:36 +0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 2 Jun 2016 12:27:53 +0000 (13:27 +0100)
commit2d483256d52eb67ff378b173ef14527fbfe6c9ef
tree531227fda0f2521657ff669c6615fc63f943c0e3
parent8c627af1f0d6fdcbddc9bf44ad66e7dd69884941
i965/gen9: Configure rbc buffers as plain for non-rbc tex views

Fixes rendering in Shadow of Mordor with rbc. Application writes
RGBA_UNORM texture filling it with values the application wants to
later on treat as SRGB_ALPHA.
Intel driver enables lossless compression for the buffer by the time
of writing. However, the driver fails to make sure the buffer can be
sampled as something else later on and unfortunately there is
restriction in the hardware for using lossless compression for srgb
formats which looks to extend itself to the sampling engine also.
Requesting srgb to linear conversion on top of compressed buffer
results the color values to be pretty much garbage.

Fortunately none of tracked benchmarks showed a regression with
this.

v2 (Matt): Add missing space

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 30e9e6bd071097fd602a15f488b7eead45460885)
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/gen8_surface_state.c