Instead, these APIs have queries that only count a smaller section such as a single draw or multiple draws. Second, in the guest (Switch’s) GPU, counters can be reset at any time or not at all.īut this behaviour is not exposed in graphics APIs such as OpenGL and Vulkan. Turn the camera around and the whole city magically disappears (SUPER MARIO ODYSSEY) This allows for efficient batching, and for GPU commands which occur after the wait to utilize the counter values. To prevent this from happening, Blinkhawk synchronises memory whenever the game requests the GPU to wait for commands to finish rendering. So, if we tried to run all those queries and write the results on the host (user’s) GPU in the same way, it would stall the GPU heavily after drawing each scene element to write back the counters. Normally, the results are obtained by the Switch’s GPU immediately after counting is done - when the rendering is done.īut games like SUPER MARIO ODYSSEY, which use occlusion culling, make a lot of queries. This leads to the question: when do we need to perform the queries and sync the memory?Īs soon as you start a game, the game begins making queries to get GPU counters. We need to batch them in order to get any reasonable level of speed. Recall that the query cache works by running queries on the host GPU.Īs it turns out, figuring out how to make it work on the host GPU was actually the hardest part of the entire rewrite, due to significant differences between what the Switch GPU does and what host graphics APIs like Vulkan expose.ĭuring development, Blinkhawk ran into two big challenges with Host GPU queries.įirst, for performance reasons, we can’t submit commands to the host GPU immediately upon processing them. Our resident GPU dev, Blinkhawk, set out to rework the query cache to fix these issues and modernise the code.īut, as he would later come to figure out, it wasn’t going to be easy. It didn’t invalidate queries that were later overwritten by other query types.It failed to write to memory in the correct order.It could not hold any queries except pixel counts.However, this implementation was not perfect and had many issues. Yuzu already had a query cache which was developed many years ago. Medium-well (Splatoon 2) Development & Challenges The game tests for both ally ink and enemy ink and if both tests fail, then the character is not standing in any ink. Similarly, Splatoon games use pixel counts to check whose ink a given character is touching. It then queries the number of pixels rendered to each box, and only renders the real objects whose corresponding boxes had any pixels rendered. In SUPER MARIO ODYSSEY, the game first renders simple boundary boxes that cover all objects that will be rendered on the screen. Occlusion culling is a feature that disables rendering of objects when they are not currently seen by the camera because they are offscreen or obscured (occluded) by other objects. For example, SUPER MARIO ODYSSEY optimises the amount of triangles it renders using a commonly used technique called occlusion culling. Some games can make use of this fetched data to further optimise their rendering. Yuzu’s query cache is responsible for tracking the values of GPU counters for Switch games and services query requests from the game. Games use queries to fetch and load these counters into memory whenever they need to use them. Many GPUs expose counters, which are used to gather data from the various commands that GPU executes - things like how many pixels were drawn or how many triangles were generated. But before we start, we must explain a few things. Of Project Y.F.C., the Query Cache Rewrite, and the implementation of Host Conditional Rendering. Did you feel that the last report was too short? Well, August was at full throttle! This month offers important graphical fixes, developers working around GPU limitations, several long overdue file system fixes, Skyline framework support, some Android and Apple love, and more! yuzu Fried Chicken Forever
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |