OSDN Git Service

i965/fs: Fix hang on IVB and VLV with image format mismatch.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 26 Aug 2015 18:59:46 +0000 (21:59 +0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 Oct 2015 13:43:49 +0000 (14:43 +0100)
commit7b8b044ee47a70303a5bcc93c58e61ca71bdcba5
tree5b7dc3d4876100af731c76f41ece3fee4947ac0b
parentec7cda29b6581a7626a051f76fd28d0bd024899c
i965/fs: Fix hang on IVB and VLV with image format mismatch.

IVB and VLV hang sporadically when an untyped surface read or write
message is used to access a surface of format other than RAW, as may
happen when there is a mismatch between the format qualifier of the
image uniform and the format of the actual image bound to the
pipeline.  According to the spec this condition gives undefined
results but may not lead to program termination (which is one of the
possible outcomes of the hang).  Fix it by checking at runtime whether
the surface is of the right type.

Fixes the "arb_shader_image_load_store.invalid/format mismatch" piglit
subtest.

Reported-by: Mark Janes <mark.a.janes@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91718
CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit b61292296bd7e1876fdb64725a783a7e96f6c4c1)
src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp