mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-21 03:23:34 +00:00
feat: Add frame generation and enhance UE4 game compatibility
- Add frame generation settings (enabled/disabled, interpolation/extrapolation modes) - Add frame skipping settings (enabled/disabled, adaptive/fixed modes) - Implement frame skipping logic with adaptive and fixed modes - Enhance UE4 crash handling with recovery mechanisms - Add support for signed and float 32-bit image formats across shader backends - Update Vulkan Validation Layers to v1.4.321.0 - Fix duplicate frame skipping options in Qt UI - Improve memory handling for UE4 games (Hogwarts Legacy compatibility) - Add enhanced bindless texture handling with fallback approach - Update Android build configuration and dependencies Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -206,10 +206,22 @@ std::string_view FormatStorage(ImageFormat format) {
|
||||
return "S16";
|
||||
case ImageFormat::R32_UINT:
|
||||
return "U32";
|
||||
case ImageFormat::R32_SINT:
|
||||
return "S32";
|
||||
case ImageFormat::R32_SFLOAT:
|
||||
return "F32";
|
||||
case ImageFormat::R32G32_UINT:
|
||||
return "U32X2";
|
||||
case ImageFormat::R32G32_SINT:
|
||||
return "S32X2";
|
||||
case ImageFormat::R32G32_SFLOAT:
|
||||
return "F32X2";
|
||||
case ImageFormat::R32G32B32A32_UINT:
|
||||
return "U32X4";
|
||||
case ImageFormat::R32G32B32A32_SINT:
|
||||
return "S32X4";
|
||||
case ImageFormat::R32G32B32A32_SFLOAT:
|
||||
return "F32X4";
|
||||
}
|
||||
throw InvalidArgument("Invalid image format {}", format);
|
||||
}
|
||||
|
||||
@@ -145,10 +145,22 @@ std::string_view ImageFormatString(ImageFormat format) {
|
||||
return ",r16i";
|
||||
case ImageFormat::R32_UINT:
|
||||
return ",r32ui";
|
||||
case ImageFormat::R32_SINT:
|
||||
return ",r32i";
|
||||
case ImageFormat::R32_SFLOAT:
|
||||
return ",r32f";
|
||||
case ImageFormat::R32G32_UINT:
|
||||
return ",rg32ui";
|
||||
case ImageFormat::R32G32_SINT:
|
||||
return ",rg32i";
|
||||
case ImageFormat::R32G32_SFLOAT:
|
||||
return ",rg32f";
|
||||
case ImageFormat::R32G32B32A32_UINT:
|
||||
return ",rgba32ui";
|
||||
case ImageFormat::R32G32B32A32_SINT:
|
||||
return ",rgba32i";
|
||||
case ImageFormat::R32G32B32A32_SFLOAT:
|
||||
return ",rgba32f";
|
||||
default:
|
||||
throw NotImplementedException("Image format: {}", format);
|
||||
}
|
||||
|
||||
@@ -66,10 +66,22 @@ spv::ImageFormat GetImageFormat(ImageFormat format) {
|
||||
return spv::ImageFormat::R16i;
|
||||
case ImageFormat::R32_UINT:
|
||||
return spv::ImageFormat::R32ui;
|
||||
case ImageFormat::R32_SINT:
|
||||
return spv::ImageFormat::R32i;
|
||||
case ImageFormat::R32_SFLOAT:
|
||||
return spv::ImageFormat::R32f;
|
||||
case ImageFormat::R32G32_UINT:
|
||||
return spv::ImageFormat::Rg32ui;
|
||||
case ImageFormat::R32G32_SINT:
|
||||
return spv::ImageFormat::Rg32i;
|
||||
case ImageFormat::R32G32_SFLOAT:
|
||||
return spv::ImageFormat::Rg32f;
|
||||
case ImageFormat::R32G32B32A32_UINT:
|
||||
return spv::ImageFormat::Rgba32ui;
|
||||
case ImageFormat::R32G32B32A32_SINT:
|
||||
return spv::ImageFormat::Rgba32i;
|
||||
case ImageFormat::R32G32B32A32_SFLOAT:
|
||||
return spv::ImageFormat::Rgba32f;
|
||||
}
|
||||
throw InvalidArgument("Invalid image format {}", format);
|
||||
}
|
||||
|
||||
@@ -332,9 +332,25 @@ TextureInst MakeInst(Environment& env, IR::Block* block, IR::Inst& inst) {
|
||||
if (IsBindless(inst)) {
|
||||
const std::optional<ConstBufferAddr> track_addr{Track(inst.Arg(0), env)};
|
||||
if (!track_addr) {
|
||||
throw NotImplementedException("Failed to track bindless texture constant buffer");
|
||||
// Enhanced bindless texture handling for UE4 games like Hogwarts Legacy
|
||||
// Instead of throwing an exception, we'll use a fallback approach
|
||||
LOG_WARNING(Shader, "Failed to track bindless texture constant buffer, using fallback");
|
||||
|
||||
// Use a default constant buffer address as fallback
|
||||
addr = ConstBufferAddr{
|
||||
.index = env.TextureBoundBuffer(),
|
||||
.offset = 0,
|
||||
.shift_left = 0,
|
||||
.secondary_index = 0,
|
||||
.secondary_offset = 0,
|
||||
.secondary_shift_left = 0,
|
||||
.dynamic_offset = {},
|
||||
.count = 1,
|
||||
.has_secondary = false,
|
||||
};
|
||||
} else {
|
||||
addr = *track_addr;
|
||||
}
|
||||
addr = *track_addr;
|
||||
} else {
|
||||
addr = ConstBufferAddr{
|
||||
.index = env.TextureBoundBuffer(),
|
||||
|
||||
@@ -147,8 +147,14 @@ enum class ImageFormat : u32 {
|
||||
R16_UINT,
|
||||
R16_SINT,
|
||||
R32_UINT,
|
||||
R32_SINT,
|
||||
R32_SFLOAT,
|
||||
R32G32_UINT,
|
||||
R32G32_SINT,
|
||||
R32G32_SFLOAT,
|
||||
R32G32B32A32_UINT,
|
||||
R32G32B32A32_SINT,
|
||||
R32G32B32A32_SFLOAT,
|
||||
};
|
||||
|
||||
enum class Interpolation {
|
||||
|
||||
Reference in New Issue
Block a user