티스토리 뷰

카테고리 없음

Vulkan 19: stardust

newpolaris 2018. 12. 19. 22:12

인텔쪽인데 먼가 좋은 코드 많다

https://software.intel.com/en-us/articles/using-vulkan-graphics-api-to-render-a-cloud-of-animated-particles-in-stardust-application

Each worker thread records one command buffer that includes a subset of all draw calls and other commands. After all worker threads complete, the main thread submits all of the command buffers with one API call

    VkSubmitInfo submit_info;
    submit_info.commandBufferCount = cmdbuf_count;
    submit_info.pCommandBuffers = cmdbuf;
    VKU_VR(vkQueueSubmit(s_gpu_queue, 1, &submit_info, s_fence[s_res_idx]));

그냥 command buffer만 채운다; 그것도 쓰던거 계속 뜨는 듯?

    do {
        SDL_SemWait(s_cmdgen_sem[thrd->tid]);
        Update_Particle_Thread(thrd);
        SDL_SemPost(thrd->sem);
    } while (s_exit_code == STARDUST_CONTINUE);

command buffer는 계속 쓰는 것 같은데;

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크