Browse Source

Merge branch 'ihateqcom' of https://git.eden-emu.dev/Ribbit/ribbitvulkanadditions into ihateqcom

pull/2726/head
Ribbit 5 months ago
parent
commit
831d4d1dc6
  1. 6
      src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt
  2. 10
      src/video_core/renderer_vulkan/blit_image.cpp

6
src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt

@ -1039,7 +1039,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) :
scale /= 100f scale /= 100f
// Apply individual scale // Apply individual scale
scale *= overlayControlData.individualScale
scale *= overlayControlData.individualScale.let { if (it > 0f) it else 1f }
// Initialize the InputOverlayDrawableButton. // Initialize the InputOverlayDrawableButton.
val defaultStateBitmap = getBitmap(context, defaultResId, scale) val defaultStateBitmap = getBitmap(context, defaultResId, scale)
@ -1114,7 +1114,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) :
// Apply individual scale // Apply individual scale
if (dpadData != null) { if (dpadData != null) {
scale *= dpadData.individualScale
scale *= dpadData.individualScale.let { if (it > 0f) it else 1f }
} }
// Initialize the InputOverlayDrawableDpad. // Initialize the InputOverlayDrawableDpad.
@ -1191,7 +1191,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) :
scale /= 100f scale /= 100f
// Apply individual scale // Apply individual scale
scale *= overlayControlData.individualScale
scale *= overlayControlData.individualScale.let { if (it > 0f) it else 1f }
// Initialize the InputOverlayDrawableJoystick. // Initialize the InputOverlayDrawableJoystick.
val bitmapOuter = getBitmap(context, resOuter, scale) val bitmapOuter = getBitmap(context, resOuter, scale)

10
src/video_core/renderer_vulkan/blit_image.cpp

@ -1046,7 +1046,7 @@ void BlitImageHelper::ConvertDepthToColorPipeline(vk::Pipeline& pipeline, VkRend
if (pipeline) { if (pipeline) {
return; return;
} }
VkShaderModule frag_shader = *convert_float_to_depth_frag;
VkShaderModule frag_shader = *convert_depth_to_float_frag;
const std::array stages = MakeStages(*full_screen_vert, frag_shader); const std::array stages = MakeStages(*full_screen_vert, frag_shader);
const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci = GetPipelineInputAssemblyStateCreateInfo(device); const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci = GetPipelineInputAssemblyStateCreateInfo(device);
pipeline = device.GetLogical().CreateGraphicsPipeline({ pipeline = device.GetLogical().CreateGraphicsPipeline({
@ -1061,8 +1061,8 @@ void BlitImageHelper::ConvertDepthToColorPipeline(vk::Pipeline& pipeline, VkRend
.pViewportState = &PIPELINE_VIEWPORT_STATE_CREATE_INFO, .pViewportState = &PIPELINE_VIEWPORT_STATE_CREATE_INFO,
.pRasterizationState = &PIPELINE_RASTERIZATION_STATE_CREATE_INFO, .pRasterizationState = &PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
.pMultisampleState = &PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, .pMultisampleState = &PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
.pDepthStencilState = &PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
.pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_EMPTY_CREATE_INFO,
.pDepthStencilState = &nullptr,
.pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_GENERIC_CREATE_INFO,
.pDynamicState = &PIPELINE_DYNAMIC_STATE_CREATE_INFO, .pDynamicState = &PIPELINE_DYNAMIC_STATE_CREATE_INFO,
.layout = *one_texture_pipeline_layout, .layout = *one_texture_pipeline_layout,
.renderPass = renderpass, .renderPass = renderpass,
@ -1076,7 +1076,7 @@ void BlitImageHelper::ConvertColorToDepthPipeline(vk::Pipeline& pipeline, VkRend
if (pipeline) { if (pipeline) {
return; return;
} }
VkShaderModule frag_shader = *convert_depth_to_float_frag;
VkShaderModule frag_shader = *convert_float_to_depth_frag;
const std::array stages = MakeStages(*full_screen_vert, frag_shader); const std::array stages = MakeStages(*full_screen_vert, frag_shader);
const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci = GetPipelineInputAssemblyStateCreateInfo(device); const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci = GetPipelineInputAssemblyStateCreateInfo(device);
pipeline = device.GetLogical().CreateGraphicsPipeline({ pipeline = device.GetLogical().CreateGraphicsPipeline({
@ -1092,7 +1092,7 @@ void BlitImageHelper::ConvertColorToDepthPipeline(vk::Pipeline& pipeline, VkRend
.pRasterizationState = &PIPELINE_RASTERIZATION_STATE_CREATE_INFO, .pRasterizationState = &PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
.pMultisampleState = &PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, .pMultisampleState = &PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
.pDepthStencilState = &PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, .pDepthStencilState = &PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
.pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_GENERIC_CREATE_INFO,
.pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_EMPTY_CREATE_INFO,
.pDynamicState = &PIPELINE_DYNAMIC_STATE_CREATE_INFO, .pDynamicState = &PIPELINE_DYNAMIC_STATE_CREATE_INFO,
.layout = *one_texture_pipeline_layout, .layout = *one_texture_pipeline_layout,
.renderPass = renderpass, .renderPass = renderpass,

Loading…
Cancel
Save