mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-24 08:55:10 +00:00
Implement sample shading option
This commit is contained in:
parent
0dd6c15343
commit
9458e12f5a
@ -46,6 +46,7 @@ namespace skyline {
|
||||
useDirectMemoryImport = ktSettings.GetBool("useDirectMemoryImport");
|
||||
forceMaxGpuClocks = ktSettings.GetBool("forceMaxGpuClocks");
|
||||
disableShaderCache = ktSettings.GetBool("disableShaderCache");
|
||||
enableSampleShading = ktSetting.GetBool("enableSampleShading");
|
||||
freeGuestTextureMemory = ktSettings.GetBool("freeGuestTextureMemory");
|
||||
enableFastGpuReadbackHack = ktSettings.GetBool("enableFastGpuReadbackHack");
|
||||
enableFastReadbackWrites = ktSettings.GetBool("enableFastReadbackWrites");
|
||||
|
@ -84,6 +84,7 @@ namespace skyline {
|
||||
Setting<bool> useDirectMemoryImport; //!< If buffer emulation should be done by importing guest buffer mappings
|
||||
Setting<bool> forceMaxGpuClocks; //!< If the GPU should be forced to run at maximum clocks
|
||||
Setting<bool> freeGuestTextureMemory; //!< If guest textrue memory should be freed when the owning texture is GPU dirty
|
||||
Setting<bool> enableSampleShading;
|
||||
|
||||
// Hacks
|
||||
Setting<bool> enableFastGpuReadbackHack; //!< If the CPU texture readback skipping hack should be used
|
||||
|
@ -70,7 +70,7 @@ namespace skyline::gpu {
|
||||
|
||||
constexpr static vk::PipelineMultisampleStateCreateInfo multisampleState{
|
||||
.rasterizationSamples = vk::SampleCountFlagBits::e1,
|
||||
.sampleShadingEnable = false,
|
||||
.sampleShadingEnable = *state.settings->enableSampleShading,
|
||||
.minSampleShading = 1.0f,
|
||||
.alphaToCoverageEnable = false,
|
||||
.alphaToOneEnable = false
|
||||
|
@ -59,6 +59,7 @@ class EmulationSettings private constructor(context : Context, prefName : String
|
||||
var freeGuestTextureMemory by sharedPreferences(context, true, prefName = prefName)
|
||||
var disableShaderCache by sharedPreferences(context, false, prefName = prefName)
|
||||
var enableDynamicResolution by sharedPreferences(context, false, prefName = prefName)
|
||||
var enableSampleShading by sharedPreferences(context, false, prefName = prefName)
|
||||
|
||||
// Hacks
|
||||
var enableFastGpuReadbackHack by sharedPreferences(context, false, prefName = prefName)
|
||||
|
@ -38,6 +38,7 @@ data class NativeSettings(
|
||||
var forceMaxGpuClocks : Boolean,
|
||||
var freeGuestTextureMemory : Boolean,
|
||||
var disableShaderCache : Boolean,
|
||||
var enableSampleShading : Boolean,
|
||||
|
||||
// Hacks
|
||||
var enableFastGpuReadbackHack : Boolean,
|
||||
@ -66,6 +67,7 @@ data class NativeSettings(
|
||||
pref.forceMaxGpuClocks,
|
||||
pref.freeGuestTextureMemory,
|
||||
pref.disableShaderCache,
|
||||
pref.enableSampleShading,
|
||||
pref.enableFastGpuReadbackHack,
|
||||
pref.enableFastReadbackWrites,
|
||||
pref.disableSubgroupShuffle,
|
||||
|
@ -162,8 +162,10 @@
|
||||
<string name="shader_cache_disabled">Cached shaders won\'t be loaded, will cause stutters</string>
|
||||
<string name="shader_cache_enabled">Cached shaders will be loaded, can heavily reduce stuttering</string>
|
||||
<string name="enable_dynamic_resolution">Enable Dynamic Resolution</string>
|
||||
<string name="enable_dynamic_resolution_enabled">the emulator will allow the GPU to dynamically adjust the resolution based on the current load. This can help maintain performance by lowering the resolution during high-load scenarios</string>
|
||||
<string name="enable_dynamic_resolution_disabled">the emulator will report less elapsed GPU time than actually passed. This prevents the GPU from lowering the resolution, maintaining a consistent resolution regardless of load. This can result in smoother and more consistent visuals at the cost of potentially higher performance requirements</string>
|
||||
<string name="enable_dynamic_resolution_enabled">The emulator will allow the GPU to dynamically adjust the resolution based on the current load. This can help maintain performance by lowering the resolution during high-load scenarios</string>
|
||||
<string name="enable_dynamic_resolution_disabled">The emulator will report less elapsed GPU time than actually passed. This prevents the GPU from lowering the resolution, maintaining a consistent resolution regardless of load. This can result in smoother and more consistent visuals at the cost of potentially higher performance requirements</string>
|
||||
<string name="enable_sample_shading">Enable Sample Shading</string>
|
||||
<string name="enable_sample_shading_desc">May improve the quality of rendering at the cost of performance</string>
|
||||
<!-- Settings - Hacks -->
|
||||
<string name="hacks">Hacks</string>
|
||||
<string name="enable_fast_gpu_readback">Enable Fast GPU Readback</string>
|
||||
|
@ -173,14 +173,17 @@
|
||||
android:summaryOn="@string/shader_cache_disabled"
|
||||
app:key="disable_shader_cache"
|
||||
app:title="@string/shader_cache" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:summaryOff="@string/enable_dynamic_resolution_disabled"
|
||||
android:summaryOn="@string/enable_dynamic_resolution_enabled"
|
||||
app:key="enable_dynamic_resolution"
|
||||
app:title="@string/enable_dynamic_resolution" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/enable_sample_shading_desc"
|
||||
app:key="enable_sample_shading"
|
||||
app:title="@string/enable_sample_shading" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="category_hacks"
|
||||
|
Loading…
x
Reference in New Issue
Block a user