From: Lionel Landwerlin Date: Thu, 17 Jan 2019 18:19:59 +0000 (+0000) Subject: anv: fix invalid binding table index computation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4149d41f2e4ea02ca86975d25ab160e69bf0f8e5;p=mesa.git anv: fix invalid binding table index computation The ++ operator strikes again. Fixes: f92c5bc8f3f517 ("anv/device: fix maximum number of images supported") Signed-off-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 0bf46db0a5e..abba55cf84f 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -2178,8 +2178,6 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, surface_state = sstate.state; assert(surface_state.alloc_size); add_surface_state_relocs(cmd_buffer, sstate); - image++; - if (devinfo->gen < 9) { assert(image < MAX_GEN8_IMAGES); struct brw_image_param *image_param = @@ -2188,6 +2186,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, *image_param = desc->image_view->planes[binding->plane].storage_image_param; } + image++; break; } @@ -2232,8 +2231,6 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, assert(surface_state.alloc_size); add_surface_reloc(cmd_buffer, surface_state, desc->buffer_view->address); - image++; - if (devinfo->gen < 9) { assert(image < MAX_GEN8_IMAGES); struct brw_image_param *image_param = @@ -2241,6 +2238,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, *image_param = desc->buffer_view->storage_image_param; } + image++; break; default: