si_decompress_textures(sctx, 1 << PIPE_SHADER_COMPUTE);
}
- if (sctx->bo_list_add_all_compute_resources)
- si_compute_resources_add_all_to_bo_list(sctx);
-
/* Add buffer sizes for memory checking in need_cs_space. */
si_context_add_resource_size(sctx, &program->shader.bo->b.b);
/* TODO: add the scratch buffer */
si_need_gfx_cs_space(sctx);
+ if (sctx->bo_list_add_all_compute_resources)
+ si_compute_resources_add_all_to_bo_list(sctx);
+
if (!sctx->cs_shader_state.initialized)
si_initialize_compute(sctx);
si_decompress_textures(sctx, u_bit_consecutive(0, SI_NUM_GRAPHICS_SHADERS));
- if (sctx->bo_list_add_all_gfx_resources)
- si_gfx_resources_add_all_to_bo_list(sctx);
-
/* Set the rasterization primitive type.
*
* This must be done after si_decompress_textures, which can call
si_need_gfx_cs_space(sctx);
+ if (sctx->bo_list_add_all_gfx_resources)
+ si_gfx_resources_add_all_to_bo_list(sctx);
+
/* Since we've called si_context_add_resource_size for vertex buffers,
* this must be called after si_need_cs_space, because we must let
* need_cs_space flush before we add buffers to the buffer list.