mesa: Don't lose track of the shader image layer originally specified by the user.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 16 Aug 2015 22:53:48 +0000 (01:53 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 20 Aug 2015 09:26:53 +0000 (12:26 +0300)
commitb97d8c95a91773dc002e3ba42bd02e84a00eada3
tree59bca617dba2a9a513b5d9827338813d8c5ad1bb
parent47e0d5b9b28b0753adda70cbfb3ad111ba6169a8
mesa: Don't lose track of the shader image layer originally specified by the user.

The spec requires that all layers of the image starting from the 0-th
are bound to the image unit regardless of the Layer parameter when
Layered is true, so I was setting gl_image_unit::Layer to zero in that
case for the convenience of the driver back-end.  However the
ES31-CTS.shader_image_load_store.basic-api-bind conformance test
checks that the layer value returned by glGetInteger is the same that
was originally specified, regardless of the value of layered.  Rename
Layer to _Layer as is usual for other derived state and keep track of
the original layer value as gl_image_unit::Layer.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/main/mtypes.h
src/mesa/main/shaderimage.c