mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-25 18:48:51 -04:00
Triforce v0.8.0
Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
@@ -21,6 +21,9 @@ FIXTURE = r'''
|
||||
|
||||
enum VkShaderStageFlagBits : uint32_t {
|
||||
VK_SHADER_STAGE_VERTEX_BIT = 1,
|
||||
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 2,
|
||||
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 4,
|
||||
VK_SHADER_STAGE_GEOMETRY_BIT = 8,
|
||||
VK_SHADER_STAGE_FRAGMENT_BIT = 16,
|
||||
VK_SHADER_STAGE_COMPUTE_BIT = 32,
|
||||
VK_SHADER_STAGE_TASK_BIT_EXT = 64,
|
||||
@@ -29,10 +32,32 @@ enum VkShaderStageFlagBits : uint32_t {
|
||||
VK_SHADER_STAGE_ALL = 0x7fffffff,
|
||||
};
|
||||
using VkShaderStageFlags = uint32_t;
|
||||
using VkBool32 = uint32_t;
|
||||
constexpr VkBool32 VK_FALSE = 0;
|
||||
enum VkShaderFloatControlsIndependence { VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL = 1, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE = 2 };
|
||||
constexpr uint32_t VK_DRIVER_ID_AMD_PROPRIETARY = 1;
|
||||
constexpr uint32_t VK_DRIVER_ID_MESA_RADV = 3; // (make_profile: RADV before Mesa 26.2.5 keeps NumWorkgroups live)
|
||||
#define VK_MAKE_VERSION(major, minor, patch) ((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
|
||||
struct {
|
||||
uint32_t sg32_stages = 0, subgroup_size = 32, subgroup_max = 32, driver_id = 0;
|
||||
struct { struct { uint64_t minStorageBufferOffsetAlignment = 16; } limits; } props;
|
||||
uint32_t max_workgroup_subgroups = 32; // (pins_32: 32-lane subgroups cover the 64 invocations profile_pinned assumes)
|
||||
VkShaderStageFlags subgroup_stages = 0xff; // (make_profile: subgroups in every stage, float modes and 64-bit atomics on)
|
||||
struct {
|
||||
VkShaderFloatControlsIndependence denormBehaviorIndependence = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL,
|
||||
roundingModeIndependence = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL;
|
||||
VkBool32 shaderSignedZeroInfNanPreserveFloat16 = 1, shaderSignedZeroInfNanPreserveFloat32 = 1,
|
||||
shaderDenormPreserveFloat32 = 1, shaderDenormFlushToZeroFloat32 = 1;
|
||||
} float_controls;
|
||||
struct {
|
||||
bool shaderFloat16 = true; // (f16 lowered where the GPU has none; here it has)
|
||||
// (make_profile: storage image and texel buffer arrays indexed nonuniformly where the GPU can)
|
||||
bool shaderStorageImageArrayNonUniformIndexing = true, shaderUniformTexelBufferArrayNonUniformIndexing = true,
|
||||
shaderStorageTexelBufferArrayNonUniformIndexing = true;
|
||||
VkBool32 shaderBufferInt64Atomics = 1;
|
||||
} vk12;
|
||||
bool float_atomic_add = false;
|
||||
bool mesh_shader = true;
|
||||
struct { struct { uint64_t minStorageBufferOffsetAlignment = 16; } limits; uint32_t driverVersion = 0; } props;
|
||||
struct { bool gather_offset = false; } fixes; // (vk_vendor.h: make_profile reads the gather offset from it)
|
||||
} dev;
|
||||
|
||||
@@ -120,7 +145,8 @@ void check_stamp(uint32_t size, uint32_t pinned, bool workaround, bool forced) {
|
||||
}
|
||||
'''
|
||||
internal = (VK / "vk_internal.h").read_text(encoding="utf-8")
|
||||
fixture = (FIXTURE + section(internal, "inline uint64_t storage_binding_align()", "/// A range of guest memory")
|
||||
fixture = (FIXTURE + section(internal, "inline bool pins_32(", "/// (hookshot) Where a storage buffer binding starts")
|
||||
+ section(internal, "inline uint64_t storage_binding_align()", "/// A range of guest memory")
|
||||
+ section(shader, "Shader::Profile make_profile(", "Shader::HostTranslateInfo host_info()")
|
||||
+ section(shader, "const Shader::Profile& profile()", "const std::vector<Code>& codes_of(")
|
||||
+ section(warp, "Id HostThreadId(", "Id GuestLane(")
|
||||
@@ -149,7 +175,7 @@ void check_stamp(uint32_t size, uint32_t pinned, bool workaround, bool forced) {
|
||||
env = {k: v for k, v in os.environ.items() if k not in ("RX_VK_WARP64", "RX_VK_FRAG_SHUFFLE_FALLBACK")}
|
||||
for device, expected, overrides in cases:
|
||||
subprocess.run([str(exe), *map(str, device + expected)], env=env | overrides, check=True, timeout=10)
|
||||
assert "EmitSPIRV(profile_pinned(), rt, t->program, bindings)" in shader
|
||||
assert "EmitSPIRV(profile_pinned(uint64_t(wg[0]) * wg[1] * wg[2]), rt, t->program, bindings)" in shader
|
||||
for stage in ("TASK", "MESH"):
|
||||
assert f"fallback ? profile_pinned() : profile_graphics(VK_SHADER_STAGE_{stage}_BIT_EXT)" in shader
|
||||
for start, end in (("Id ShuffleRelative(", "Id BroadcastLane("), ("Id EmitShuffleIndex(", "Id EmitShuffleUp("),
|
||||
|
||||
Reference in New Issue
Block a user