i965: Use intel_bufferobj_buffer() wrapper in image surface state setup.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 16 Mar 2018 21:28:59 +0000 (14:28 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 23 May 2018 23:21:34 +0000 (16:21 -0700)
commit936cd3c87a212c28fe89a5c059fc4febd8b52ab7
treecb4ced79006612cff000201acbfa14c7ce8dc6b5
parente989acb03ba802737f762627dd16ac1d0b9f0d13
i965: Use intel_bufferobj_buffer() wrapper in image surface state setup.

Instead of directly using intel_obj->buffer.  Among other things
intel_bufferobj_buffer() will update intel_buffer_object::
gpu_active_start/end, which are used by glBufferSubData() to decide
which path to take.  Fixes a failure in the Piglit
ARB_shader_image_load_store-host-mem-barrier Buffer Update/WaW tests,
which could be reproduced with a non-standard glGetTexSubImage
implementation (see bug report).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105351
Reported-by: Nanley Chery <nanleychery@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c