mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-20 18:59:26 +02:00
Following the philosophy on the previous Vulkan maintenance PR's, this one is reviewing the video_core to resolve VUID's related to the missing handling/ safechecks (UBO's case on missing StorageBufferAccess 8/16 bits on QCOM drivers, resulting on bad compute pipeline compiled), wiring topology representative to EDS2 configuration (following #4117), refactored the sampled image access via new memeber function for type "typeless" which adds a handling on the integer mistmatch (uint to sint, float to uint) + fixing bugs on current texture sampling (int) including the depth/stencil path resolve, maintenance to previous changes on query cache (resolving bugs from #3853), reduced the amount of binding BindVertexBufferEXT2 when a new tick/ frame is presented (with this being a reason for performance reduction on games where vertex polutes the stage, like BOTW/TOTK where grass is draw with vertex); implemented color border swizzle and color write enable for future improvements on EDS3, added initial implementation on Synchronization2 starting a path to ensure an access to VK 1.3 features safely and other smaller fixes along the road. Special Thanks: -> Mr. Smolio Gidolard (@gidoly) Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4189
56 lines
1.9 KiB
C++
56 lines
1.9 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "common/bit_field.h"
|
|
#include "common/common_types.h"
|
|
#include "shader_recompiler/shader_info.h"
|
|
|
|
namespace Shader::IR {
|
|
|
|
enum class FmzMode : u8 {
|
|
DontCare, // Not specified for this instruction
|
|
FTZ, // Flush denorms to zero, NAN is propagated (D3D11, NVN, GL, VK)
|
|
FMZ, // Flush denorms to zero, x * 0 == 0 (D3D9)
|
|
None, // Denorms are not flushed, NAN is propagated (nouveau)
|
|
};
|
|
|
|
enum class FpRounding : u8 {
|
|
DontCare, // Not specified for this instruction
|
|
RN, // Round to nearest even,
|
|
RM, // Round towards negative infinity
|
|
RP, // Round towards positive infinity
|
|
RZ, // Round towards zero
|
|
};
|
|
|
|
struct FpControl {
|
|
bool no_contraction{false};
|
|
FpRounding rounding{FpRounding::DontCare};
|
|
FmzMode fmz_mode{FmzMode::DontCare};
|
|
};
|
|
static_assert(sizeof(FpControl) <= sizeof(u32));
|
|
|
|
union TextureInstInfo {
|
|
u32 raw;
|
|
BitField<0, 16, u32> descriptor_index;
|
|
BitField<16, 3, TextureType> type;
|
|
BitField<19, 1, u32> is_depth;
|
|
BitField<20, 1, u32> has_bias;
|
|
BitField<21, 1, u32> has_lod_clamp;
|
|
BitField<22, 1, u32> relaxed_precision;
|
|
BitField<23, 2, u32> gather_component;
|
|
BitField<25, 2, u32> num_derivatives;
|
|
BitField<27, 3, ImageFormat> image_format;
|
|
BitField<30, 1, u32> ndv_is_active;
|
|
/// Only meaningful for the sampled-texture family (ImageSampleImplicitLod, ImageFetch,
|
|
/// ImageGather, etc.); unused/zero for storage-image opcodes, which carry their own
|
|
/// is_integer via ImageDescriptor/ImageBufferDescriptor instead.
|
|
BitField<31, 1, u32> is_integer;
|
|
};
|
|
static_assert(sizeof(TextureInstInfo) <= sizeof(u32));
|
|
|
|
} // namespace Shader::IR
|