{"action":"created","issue":{"url":"https://api.github.com/repos/RPCS3/rpcs3/issues/1631","repository_url":"https://api.github.com/repos/RPCS3/rpcs3","labels_url":"https://api.github.com/repos/RPCS3/rpcs3/issues/1631/labels{/name}","comments_url":"https://api.github.com/repos/RPCS3/rpcs3/issues/1631/comments","events_url":"https://api.github.com/repos/RPCS3/rpcs3/issues/1631/events","html_url":"https://github.com/RPCS3/rpcs3/issues/1631","id":143853539,"number":1631,"title":"List of tasks on graphic components.","user":{"login":"vlj","id":6413475,"avatar_url":"https://avatars.githubusercontent.com/u/6413475?v=3","gravatar_id":"","url":"https://api.github.com/users/vlj","html_url":"https://github.com/vlj","followers_url":"https://api.github.com/users/vlj/followers","following_url":"https://api.github.com/users/vlj/following{/other_user}","gists_url":"https://api.github.com/users/vlj/gists{/gist_id}","starred_url":"https://api.github.com/users/vlj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlj/subscriptions","organizations_url":"https://api.github.com/users/vlj/orgs","repos_url":"https://api.github.com/users/vlj/repos","events_url":"https://api.github.com/users/vlj/events{/privacy}","received_events_url":"https://api.github.com/users/vlj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RPCS3/rpcs3/labels/bugfix","name":"bugfix","color":"80ff80"},{"url":"https://api.github.com/repos/RPCS3/rpcs3/labels/dx12","name":"dx12","color":"cc6699"},{"url":"https://api.github.com/repos/RPCS3/rpcs3/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/RPCS3/rpcs3/labels/opengl","name":"opengl","color":"88cc00"},{"url":"https://api.github.com/repos/RPCS3/rpcs3/labels/rsx","name":"rsx","color":"eb6420"},{"url":"https://api.github.com/repos/RPCS3/rpcs3/labels/vulkan","name":"vulkan","color":"ff6699"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2016-03-27T22:02:58Z","updated_at":"2016-06-09T11:48:12Z","closed_at":null,"body":"I gathered a list of TODO related to graphic code. This is likely not exhaustif and not ranked by priority or difficulty. \r\n\r\n- [ ]  Fix Vulkan shadow in Hitman 2. For some reasons with Vulkan Hitman 2 shadows appear correctly but are surrounded by a black texture. I guess it's a sampler parameter not properly set but I can be wrong.\r\n- [ ] Fix Silent Hills 3 missing shadows in OpenGL.\r\n- [ ] Also fix SH3 shadows on character in DX12.\r\n- [ ] Implement Queries (called \"REPORT\" in RSX terminology) support for all backend.\r\n- [ ] Implement MSAA for all backend. I have some code working in d3d12-branch which require some cleaning. Issue is that there is not a lot of game with MSAA (so far I only found Super Puzzle Fighter 2 turbo).\r\n- [ ] Support RGBA4/16 sampling of depth buffer. RSX sometimes interpret depth texture as RGBA4 (for z16) or RGBA8(for z24u8) and use a dot operation to read them (since depth texture is an unsigned 16 or 24 bits integer one it's mathematically correct). However API doesn't accept that and requires a conversion step. Again in d3d12-wip branch there's a working implementation of this but it needs some works.\r\n- [ ] Avoid buffer extra copy in GL/Vulkan. Both backend store vertex and index data to a std::vector<u8> structure which is then copied into gpu visible memory. Such copies could be avoided by directly writing into gpu visible memory which what happens with dx12. The difficulty here is that OpenGL glMap() function is really transparent and can create a stall in the gpu. glMapRange() may help with correct flag.\r\n- [ ] Factorize DX12/GL/Vulkan vertex/index handling code. The three backends manages vertex in the same way at a high level but they don't share code except for the upload function.\r\n- [x] ~~Implement texture cube/texture 3d for GL and Vulkan. GL doesn't support texture 3d atm (there is no glTex3dStorage call). Some code exists in Vulkan but a lots of function use a default VK_IMAGE_DIMENSION_2D by default. So far After Burner Climax has cubemap texture for the reflection effect and Resogun has 3d textures likely for smoke effect.~~\r\n- [ ] Implement render target extraction for Vulkan to see what happens in RSX Debugger.\r\n- [ ] Make a common pipelineProperties structure filled by RSXThread. Currently DX12 and Vulkan have their own structure but the same parameters are set. Using a common structure may allow to reduce memory footprint and make pipeline lookup faster.\r\n- [ ] Implement vertex buffer and index buffer caching. This one can be really difficult : contrary to texture the backend doesn't know in advance how big a vertex buffer can be if there is an index buffer. At RSX level buffer boundaries are also not that clear since several draw call can use the same buffers internally but we only can access subbuffers used for draw call. On the other hand implementing this correctly may bring a huge performance boost, it's common that backends spend several ms uploading vertex buffers that barely change between frame.\r\n- [ ] Unify texture cache code. DX12 has a texture cache implementation that uses hashtable for O(1) address to texture mapping and that can reuse texture objects if a texture was modified but kept the same size. GL and Vulkan implementation use an std::vector<> and parse it when looking for a texture which can be very costly if there are hundreds of them...\r\n- [ ] Optimise invalidate_texture() call. DX12/Vulkan/GL uses the same algorithm here : they parse a std::vector<> of range when an access violation is encountered. I suspect we loose a lot of time here that isn't reported by d3d12 overlay. To improve things I think having a mixed hashtable/vector implementation can fasten things a lot : for instance an array of 512 std::vector<texture*> , one for every MB of rsx memory, holding a pointer to textures using the corresponding Mb block. This way invalidate_address only has to parse a std::vector of maybe 1 or 2 textures at every access violation instead of every created texture.\r\n- [ ] Try to make all backend file structure and backend member closer. This way working on the 3 backends is easier.\r\n- [ ] Support non 0 offset in viewport (see Scarygirls and maybe Disgaea 3 loading screen).\r\n- [ ] Avoid unecessary descriptor binding/update in GL/Vulkan (see m_dirty* in d3d12 backend)\r\n- [ ] Support Alpha testing in Vulkan/GL.\r\n- [ ] Support separate front/back diffuse and specular color for Vulkan and GL (see Outrun Online)\r\n- [ ] Support mirrored gl_Position (see After Burner Climax) in GL and Vulkan."},"comment":{"url":"https://api.github.com/repos/RPCS3/rpcs3/issues/comments/224872181","html_url":"https://github.com/RPCS3/rpcs3/issues/1631#issuecomment-224872181","issue_url":"https://api.github.com/repos/RPCS3/rpcs3/issues/1631","id":224872181,"user":{"login":"raven02","id":3000282,"avatar_url":"https://avatars.githubusercontent.com/u/3000282?v=3","gravatar_id":"","url":"https://api.github.com/users/raven02","html_url":"https://github.com/raven02","followers_url":"https://api.github.com/users/raven02/followers","following_url":"https://api.github.com/users/raven02/following{/other_user}","gists_url":"https://api.github.com/users/raven02/gists{/gist_id}","starred_url":"https://api.github.com/users/raven02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raven02/subscriptions","organizations_url":"https://api.github.com/users/raven02/orgs","repos_url":"https://api.github.com/users/raven02/repos","events_url":"https://api.github.com/users/raven02/events{/privacy}","received_events_url":"https://api.github.com/users/raven02/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T11:48:12Z","updated_at":"2016-06-09T11:48:12Z","body":"Having https://github.com/RPCS3/rpcs3/pull/1760 , all backends should have Logic Op implemented"}}
{"actor":{"display_login":"raven02"}}