{"action":"created","issue":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/1282","repository_url":"https://api.github.com/repos/bkaradzic/bgfx","labels_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/1282/labels{/name}","comments_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/1282/comments","events_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/1282/events","html_url":"https://github.com/bkaradzic/bgfx/issues/1282","id":277790317,"number":1282,"title":"New encoder API questions","user":{"login":"skhoroshavin","id":5670522,"avatar_url":"https://avatars3.githubusercontent.com/u/5670522?v=4","gravatar_id":"","url":"https://api.github.com/users/skhoroshavin","html_url":"https://github.com/skhoroshavin","followers_url":"https://api.github.com/users/skhoroshavin/followers","following_url":"https://api.github.com/users/skhoroshavin/following{/other_user}","gists_url":"https://api.github.com/users/skhoroshavin/gists{/gist_id}","starred_url":"https://api.github.com/users/skhoroshavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skhoroshavin/subscriptions","organizations_url":"https://api.github.com/users/skhoroshavin/orgs","repos_url":"https://api.github.com/users/skhoroshavin/repos","events_url":"https://api.github.com/users/skhoroshavin/events{/privacy}","received_events_url":"https://api.github.com/users/skhoroshavin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-11-29T15:12:02Z","updated_at":"2017-11-29T20:56:33Z","closed_at":null,"author_association":"NONE","body":"I see you implemented a new API in bgfx for multithreaded draw call submission, but there's very little documentation on how to use it. For example it's not clear if begin/end functions returning encoder object should be called from main thread or their respective render threads. Separate idiomatic usage example would be very helpful.\r\n\r\nAlso, while trying to understand limitations of this API by looking into source code I stumbled upon this:\r\nhttps://github.com/bkaradzic/bgfx/blob/master/src/bgfx.cpp#L894\r\nIt seems like there's still single render queue per frame with atomic counter, which can easily become contention point as number of thread increases. Why not separate renderqueue per thread, merged into one just before sorting and submission?"},"comment":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/comments/347993601","html_url":"https://github.com/bkaradzic/bgfx/issues/1282#issuecomment-347993601","issue_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/1282","id":347993601,"user":{"login":"bkaradzic","id":814772,"avatar_url":"https://avatars0.githubusercontent.com/u/814772?v=4","gravatar_id":"","url":"https://api.github.com/users/bkaradzic","html_url":"https://github.com/bkaradzic","followers_url":"https://api.github.com/users/bkaradzic/followers","following_url":"https://api.github.com/users/bkaradzic/following{/other_user}","gists_url":"https://api.github.com/users/bkaradzic/gists{/gist_id}","starred_url":"https://api.github.com/users/bkaradzic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkaradzic/subscriptions","organizations_url":"https://api.github.com/users/bkaradzic/orgs","repos_url":"https://api.github.com/users/bkaradzic/repos","events_url":"https://api.github.com/users/bkaradzic/events{/privacy}","received_events_url":"https://api.github.com/users/bkaradzic/received_events","type":"User","site_admin":false},"created_at":"2017-11-29T20:56:33Z","updated_at":"2017-11-29T20:56:33Z","author_association":"OWNER","body":"Keep in mind that there will be always overhead associated with calling `bgfx::begin` vs. just passing encoder argument to functions that are doing submission."}}
{"actor":{"display_login":"bkaradzic"}}