VKVG_STATUS_DEVICE_ERROR, /*!< vkvg device initialization error */
VKVG_STATUS_INVALID_IMAGE, /*!< */
VKVG_STATUS_INVALID_SURFACE, /*!< */
- VKVG_STATUS_INVALID_FONT /*!< Unresolved font name*/
+ VKVG_STATUS_INVALID_FONT, /*!< Unresolved font name*/
+ VKVG_STATUS_ENUM_MAX = 0x7FFFFFFF
}vkvg_status_t;
typedef enum {
* @{ */
/**
- * @brief vkvg_device_set_thread_aware
+ * @brief Set device ready for multithreading.
+ *
+ * If thread aware mode is set to true,
+ *
+ * This method should be called only once on device creation. If this method is called while some surfaces or patterns are
+ * in use, this could have unexpected results.
+ *
+ *
* @param dev
* @param thread_awayre
*/
if (ctx->cmdStarted){//transition of img without appropriate dependencies in subpass must be done outside renderpass.
_end_render_pass (ctx);
_flush_vertices_caches (ctx);
- }else {
+ } else {
vkh_cmd_begin (ctx->cmd,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT);
ctx->cmdStarted = true;
}
if (!_wait_ctx_flush_end (ctx))
return;
- ctx->source = surf->img;
-
VkSamplerAddressMode addrMode = 0;
VkFilter filter = VK_FILTER_NEAREST;
switch (pat->extend) {
filter = VK_FILTER_NEAREST;
break;
}
- vkh_image_create_sampler (ctx->source, filter, filter,
+ vkh_image_create_sampler (surf->img, filter, filter,
VK_SAMPLER_MIPMAP_MODE_NEAREST, addrMode);
- _update_descriptor_set (ctx, ctx->source, ctx->dsSrc);
+ _update_descriptor_set (ctx, surf->img, ctx->dsSrc);
if (pat->hasMatrix) {
#else
VkFence flushFence; //context fence
#endif
- VkhImage source; //source of painting operation
+ //VkDescriptorImageInfo sourceDescriptor; //Store view/sampler in context
VkCommandPool cmdPool; //local pools ensure thread safety
VkCommandBuffer cmdBuffers[2]; //double cmd buff for context operations