better logic
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
7e9c84899e
commit
b985942b87
2 changed files with 10 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <vulkan/vulkan_core.h>
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
|
@ -58,7 +59,8 @@ std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device, VkFormat fram
|
||||||
|
|
||||||
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format, VkCubicFilterWeightsQCOM qcom_weights) {
|
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format, VkCubicFilterWeightsQCOM qcom_weights) {
|
||||||
// No need for handrolled shader -- if the VK impl can do it for us ;)
|
// No need for handrolled shader -- if the VK impl can do it for us ;)
|
||||||
if (device.IsExtFilterCubicSupported()) {
|
// Catmull-Rom is default bicubic for all implementations...
|
||||||
|
if (device.IsExtFilterCubicSupported() && (device.IsQcomFilterCubicWeightsSupported() || qcom_weights == VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM)) {
|
||||||
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateCubicSampler(device,
|
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateCubicSampler(device,
|
||||||
qcom_weights), BuildShader(device, VULKAN_PRESENT_FRAG_SPV));
|
qcom_weights), BuildShader(device, VULKAN_PRESENT_FRAG_SPV));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -89,7 +89,8 @@ VK_DEFINE_HANDLE(VmaAllocator)
|
||||||
EXTENSION(NV, VIEWPORT_ARRAY2, viewport_array2) \
|
EXTENSION(NV, VIEWPORT_ARRAY2, viewport_array2) \
|
||||||
EXTENSION(NV, VIEWPORT_SWIZZLE, viewport_swizzle) \
|
EXTENSION(NV, VIEWPORT_SWIZZLE, viewport_swizzle) \
|
||||||
EXTENSION(EXT, DESCRIPTOR_INDEXING, descriptor_indexing) \
|
EXTENSION(EXT, DESCRIPTOR_INDEXING, descriptor_indexing) \
|
||||||
EXTENSION(EXT, FILTER_CUBIC, filter_cubic)
|
EXTENSION(EXT, FILTER_CUBIC, filter_cubic) \
|
||||||
|
EXTENSION(QCOM, FILTER_CUBIC_WEIGHTS, filter_cubic_weights)
|
||||||
|
|
||||||
// Define extensions which must be supported.
|
// Define extensions which must be supported.
|
||||||
#define FOR_EACH_VK_MANDATORY_EXTENSION(EXTENSION_NAME) \
|
#define FOR_EACH_VK_MANDATORY_EXTENSION(EXTENSION_NAME) \
|
||||||
|
@ -558,6 +559,11 @@ public:
|
||||||
return extensions.filter_cubic;
|
return extensions.filter_cubic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the device supports VK_QCOM_filter_cubic_weights
|
||||||
|
bool IsQcomFilterCubicWeightsSupported() const {
|
||||||
|
return extensions.filter_cubic_weights;
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true if the device supports VK_EXT_line_rasterization.
|
/// Returns true if the device supports VK_EXT_line_rasterization.
|
||||||
bool IsExtLineRasterizationSupported() const {
|
bool IsExtLineRasterizationSupported() const {
|
||||||
return extensions.line_rasterization;
|
return extensions.line_rasterization;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue