8000 Vulkan: Ideas to reduce the number of unique pipelines further · Issue #16567 · hrydgard/ppsspp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Vulkan: Ideas to reduce the number of unique pipelines further #16567
Open
@hrydgard

Description

@hrydgard

One of the most common causes of proliferation of different vertex shaders, causing shader compilation stutters, now that we have reduced the lighting variants with the ubershader change, is different vertex formats. We create different vertex shaders for with and without color, with and without normal, with and without UV, causing what could be one pipeline balloon into up to eight.

We could avoid some shader variants by simply stuffing default values into the vertex data during decode instead of in the shader. I think it's very likely that the cost of that is minimal and the win of having less pipeline variants is worth it.

Also, texcoord generation (such as for environment mapping) could be part of the ubershader setup, I think the cost of that would also be absolutely minimal while reducing the number of pipelines further.

Then of course there are fragment shaders - they are generally shorter and simpler, but are also probably worth trying to reduce. Some stuff like the doubling flag really could be dynamic. Maybe even the modulation function?

A comment by me on parallelization, btw: #15589 (comment)

VK_EXT_extended_dynamic_state{1,2,3} can also be used to reduce the number of pipeline, probably quite considerably. Unfortunately, the platforms that support these are already not so bad at creating pipelines relatively quickly so will benefif the least, but supporting them might still be worthwhile - Android support for them is growing (mainly Qualcomm).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0