[VK] Rework SPIRV Shader Optimization (#238)
The actual SPIRV Shader Optimization option doesn't seem to do anything as long as it isn't vinculed, so let's rework it to make it work Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com> Co-authored-by: echosys <echosys@noreply.localhost> Reviewed-on: #238
This commit is contained in:
parent
c4a26be180
commit
a002730d68
30 changed files with 143 additions and 31 deletions
|
@ -127,14 +127,14 @@ object Settings {
|
|||
}
|
||||
}
|
||||
|
||||
enum class OptimizeSpirvOutput(val int: Int) {
|
||||
Never(0),
|
||||
OnLoad(1),
|
||||
Always(2);
|
||||
enum class OptimizeSpirvOutput(val int: Int) {
|
||||
Never(0),
|
||||
OnLoad(1),
|
||||
Always(2);
|
||||
|
||||
companion object {
|
||||
fun from(int: Int): OptimizeSpirvOutput =
|
||||
entries.firstOrNull { it.int == int } ?: OnLoad
|
||||
}
|
||||
}
|
||||
companion object {
|
||||
fun from(int: Int): OptimizeSpirvOutput =
|
||||
entries.firstOrNull { it.int == int } ?: OnLoad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -569,14 +569,14 @@ abstract class SettingsItem(
|
|||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT,
|
||||
titleId = R.string.renderer_optimize_spirv_output,
|
||||
descriptionId = R.string.renderer_optimize_spirv_output_description,
|
||||
choicesId = R.array.optimizeSpirvOutputEntries,
|
||||
valuesId = R.array.optimizeSpirvOutputValues
|
||||
)
|
||||
)
|
||||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT,
|
||||
titleId = R.string.renderer_optimize_spirv_output,
|
||||
descriptionId = R.string.renderer_optimize_spirv_output_description,
|
||||
choicesId = R.array.optimizeSpirvOutputEntries,
|
||||
valuesId = R.array.optimizeSpirvOutputValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue