diff options
author | Francisco Jerez <[email protected]> | 2018-03-16 14:28:59 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2018-05-23 16:21:34 -0700 |
commit | 936cd3c87a212c28fe89a5c059fc4febd8b52ab7 (patch) | |
tree | cb4ced79006612cff000201acbfa14c7ce8dc6b5 /src/mesa/drivers/dri | |
parent | e989acb03ba802737f762627dd16ac1d0b9f0d13 (diff) |
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 <[email protected]>
Cc: [email protected]
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 39e898243db..73cae9ef7c5 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1520,14 +1520,16 @@ update_image_surface(struct brw_context *brw, const unsigned format = get_image_format(brw, u->_ActualFormat, access); if (obj->Target == GL_TEXTURE_BUFFER) { - struct intel_buffer_object *intel_obj = - intel_buffer_object(obj->BufferObject); const unsigned texel_size = (format == ISL_FORMAT_RAW ? 1 : _mesa_get_format_bytes(u->_ActualFormat)); const unsigned buffer_size = buffer_texture_range_size(brw, obj); + struct brw_bo *const bo = !obj->BufferObject ? NULL : + intel_bufferobj_buffer(brw, intel_buffer_object(obj->BufferObject), + obj->BufferOffset, buffer_size, + access != GL_READ_ONLY); brw_emit_buffer_surface_state( - brw, surf_offset, intel_obj->buffer, obj->BufferOffset, + brw, surf_offset, bo, obj->BufferOffset, format, buffer_size, texel_size, access != GL_READ_ONLY ? RELOC_WRITE : 0); |